Fix Bug 2336: Manual Healing option in Ui
[osm/NG-UI.git] / src / models / NSDModel.ts
1 /*
2  Copyright 2020 TATA ELXSI
3
4  Licensed under the Apache License, Version 2.0 (the 'License');
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15
16  Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
17  */
18 /**
19  * @file  Model for NSD related information.
20  */
21 import { VNFDAdminDetails } from './VNFDModel';
22
23 /** Interface for NSData */
24 export interface NSData {
25     id?: string;
26     identifier?: string;
27     description?: string;
28     version: string;
29     name?: string;
30     designer?: string;
31 }
32
33 /** Interface for the nscompose descriptors content */
34 export interface NSDDetails {
35     'connection-point': CONNECTIONPOINT[];
36     description: string;
37     id: string;
38     logo: string;
39     name: string;
40     version: string;
41     vld: VLD[];
42     _admin: VNFDAdminDetails;
43     _id: string;
44     _links?: string;
45     'constituent-vnfr-ref': string[];
46     'virtual-link-desc': VLD[];
47     df: DF[];
48     'vnfd-id': string[];
49     designer?: string;
50 }
51
52 /** Interface for the connection-point */
53 export interface CONNECTIONPOINT {
54     name: string;
55     'vld-id-ref': string;
56 }
57
58 /** Interface for the vld */
59 export interface VLD {
60     id: string;
61     'mgmt-network'?: boolean;
62 }
63
64 /** Interface Nodes Creation */
65 export interface COMPOSERNODES {
66     id: string;
67     reflexive: Boolean;
68     'type': string;
69     name?: string;
70     nodeIndex?: string;
71     selectorId?: string;
72     x?: number;
73     y?: number;
74     fx?: number;
75     fy?: number;
76 }
77
78 /** Interface for the Tick */
79 export interface Tick {
80     target: TickPath;
81     source: TickPath;
82     left: boolean;
83     right: boolean;
84 }
85
86 /** Interface for the Path */
87 export interface TickPath {
88     x: number;
89     y: number;
90     id: string;
91     'type'?: string;
92     name?: string;
93     nodeIndex?: string;
94 }
95 /** Interface for the GRAPHDETAILS */
96 export interface GRAPHDETAILS {
97     width: number;
98     height: number;
99     nodeHeight: number;
100     nodeWidth: number;
101     textX: number;
102     textY: number;
103     radius: number;
104     distance: number;
105     strength: number;
106     forcex: number;
107     forcey: number;
108     sourcePaddingYes: number;
109     sourcePaddingNo: number;
110     targetPaddingYes: number;
111     targetPaddingNo: number;
112     alphaTarget: number;
113     imageX: number;
114     imageY: number;
115     shiftKeyCode: number;
116 }
117
118 /** Interface for the NS Create params */
119 export interface NSCREATEPARAMS {
120     nsName: string;
121     nsDescription: string;
122     nsdId: string;
123     vimAccountId: string;
124     vld: string;
125     ssh_keys: string[];
126 }
127
128 /** Interface for the NSI Create params */
129 export interface NSICREATEPARAMS {
130     nsName: string;
131     nsDescription: string;
132     nstId: string;
133     vimAccountId: string;
134     'netslice-vld': string;
135     ssh_keys: string[];
136 }
137
138 /** Interface for the VDU Primitive Levels */
139 export interface VDUPRIMITIVELEVEL {
140     id: string;
141     name: string;
142     'vdu-configuration': {};
143 }
144
145 /** Interface for the KDU Primitive Levels */
146 export interface KDUPRIMITIVELEVEL {
147     name: string;
148     'juju-bundle': string;
149     'kdu-configuration': {};
150 }
151
152 /** Interface for the DF */
153 export interface DF {
154     id: string;
155     'vnf-profile': VNFPROFILE[];
156 }
157
158 /** Interface for the DF */
159 export interface VNFPROFILE {
160     id: string;
161     'virtual-link-connectivity': VLC[];
162     'vnfd-id': string;
163 }
164
165 /** Interface for the VLC */
166 export interface VLC {
167     'constituent-cpd-id': CCI[];
168     'virtual-link-profile-id': string;
169 }
170
171 /** Interface for the CCI */
172 export interface CCI {
173     'constituent-base-element-id': string;
174     'constituent-cpd-id': string;
175 }
176 /** Interface for NSDATACREATION */
177 export interface NSDATACREATION {
178     nsd: NSDETAILDATA;
179 }
180 /** Interface for NSDETAILDATA */
181 export interface NSDETAILDATA {
182     nsd: NSDDetails[];
183 }