12ce97781d1b976484b0b4d56aad6ed32089c52b
[osm/NG-UI.git] / src / models / NSInstanceModel.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 NS Instance related information.
20  */
21 /* eslint-disable */
22 import { DF, VLD } from 'NSDModel';
23 import { VNFDAdminDetails } from 'VNFDModel';
24
25 /** Interface for NSInstanceDetails */
26 export interface NSInstanceDetails {
27     'orchestration-progress': JSON;
28     'constituent-vnfr-ref': string[];
29     'operational-events': string[];
30     admin: Admin;
31     'ssh-authorized-key': string;
32     _admin: _Admin;
33     'admin-status': string;
34     'operational-status': string;
35     'datacenter': string;
36     nsd: NSD;
37     'nsd-id': string;
38     name: string;
39     'name-ref': string;
40     id: string;
41     'nsd-name-ref': string;
42     description: string;
43     'detailed-status': string;
44     'config-status': string;
45     'resource-orchestrator': string;
46     'nsd-ref': string;
47     vld: VLD[];
48     instantiate_params: InstantiateParam;
49     additionalParamsForNs: AdditionalParamForN;
50     _id?: string;
51     vcaStatus?: object;
52 }
53
54 /** Interface for Admin */
55 interface Admin {
56     deployed: DeployedAdmin;
57 }
58
59 /** Interface for DeployedAdmin */
60 interface DeployedAdmin {
61     RO: ROAdmin;
62 }
63
64 /** Interface for ROAdmin */
65 interface ROAdmin {
66     'nsr_status': string;
67 }
68
69 /** Interface for _Admin */
70 interface _Admin {
71     'projects_write': string[];
72     deployed: DeployedAdmin;
73     nslcmop: string;
74     nsState: string;
75     modified: number;
76     projects_read: string[];
77     created: string;
78 }
79
80 /** Interface for Deployed_Admin */
81 interface DeployedAdmin {
82     VCA: string[];
83     RO: ROAdmin;
84 }
85
86 /** Interface for RO_Admin */
87 interface ROAdmin {
88     'nsr_status': string;
89     'nsr_id': string;
90     'nsd_id': string;
91     vnfd: VNFD[];
92 }
93
94 /** Interface for VNFD */
95 interface VNFD {
96     'member-vnf-index': number;
97     id: string;
98 }
99
100 /** Interface for NSD */
101 export interface NSD {
102     description: string;
103     _admin: VNFDAdminDetails;
104     name: string;
105     version: string;
106     _id: string;
107     id: string;
108     vendor: string;
109     vdur: string[];
110     'connection-point': CONNECTIONPOINT[];
111     'virtual-link-desc': NSDVLD[];
112     df: DF[];
113 }
114
115 /** Interface for _AdminDetails */
116 export interface _AdminDetails {
117     usageState: string;
118     projects_write: string[];
119     projects_read: string[];
120     operationalState: string;
121     modified: string;
122     storage: Storage;
123     onboardingState: string;
124     userDefinedData: JSON;
125     created: number;
126 }
127
128 /** Interface for Storage */
129 interface Storage {
130     path: string;
131     'pkg-dir': string;
132     zipfile: string;
133     folder: string;
134     descriptor: string;
135     fs: string;
136 }
137
138 /** Interface for NSDVLD */
139 export interface NSDVLD {
140     'vim-id': string;
141     'status-detailed': string;
142     name: string;
143     status: string;
144     'vim-network-name': string;
145     id: string;
146     'type': string;
147     df: DF[];
148 }
149
150 /** Interface for Vm Migration */
151 export interface VMMIGRATION {
152     lcmOperationType: string;
153     vnfInstanceId: string;
154     migrateToHost?: string;
155     vdu?: VDUPARAM;
156 }
157
158 /** Interface for vdu for Vm Migration */
159 export interface VDUPARAM {
160     vduId?: string;
161     vduCountIndex?: string;
162 }
163
164 /** Interface for Ns Update */
165 export interface NSUPDATE {
166     lcmOperationType: string;
167     updateType: string;
168     nsInstanceId: string;
169     changeVnfPackageData: CHANGEVNFDATA;
170 }
171
172 /** Interface for changeVnfPackageData in Ns Update */
173 export interface CHANGEVNFDATA {
174     vnfdId: string;
175     vnfInstanceId: string;
176 }
177
178 /** Interface for terminate vnf in Ns Update */
179 export interface TERMINATEVNF {
180     lcmOperationType: string;
181     updateType: string;
182     nsInstanceId: string;
183     removeVnfInstanceId: string;
184 }
185
186 /** Interface for Start, Stop & Rebuild */
187 export interface StartStopRebuild {
188     updateType: string;
189     operateVnfData: OPERATEVNFDATA;
190 }
191
192 /** Interface for operateVnfData  in Start, Stop and Rebuild */
193 export interface OPERATEVNFDATA {
194     additionalParam: ADDITIONALPARAMS;
195     vnfInstanceId: string;
196     changeStateTo: string;
197 }
198
199 /** Interface for additionalParam in Start, Stop and Rebuild */
200 export interface ADDITIONALPARAMS {
201     'run-day1': boolean;
202     'vdu_id': string;
203     'count-index': string;
204 }
205
206 /** Interface for VerticalScaling */
207 export interface VerticalScaling {
208     lcmOperationType: string;
209     verticalScale: string;
210     nsInstanceId: string;
211     changeVnfFlavorData: CHANGEVNFFLAVORDATAPARAM;
212 }
213
214 /** Interface for changeVnfFlavorData in Vertical Scaling */
215 export interface CHANGEVNFFLAVORDATAPARAM {
216     vnfInstanceId: string;
217     additionalParams: ADDITIONALPARAM;
218
219 }
220
221 /** Interface for additionalParam in Vertical Scaling */
222 export interface ADDITIONALPARAM {
223     vduid: string;
224     vduCountIndex: string;
225     virtualMemory: number;
226     sizeOfStorage: number;
227     numVirtualCpu: number;
228
229 }
230
231 /** Interface for InstantiateParam */
232 interface InstantiateParam {
233     nsdId: string;
234     nsName: string;
235     nsDescription: string;
236     vimAccountId: string;
237 }
238
239 /** Interface for AdditionalParamForN */
240 interface AdditionalParamForN {
241     _id: string;
242     'ns-instance-config-ref': string;
243     'crete-time': string;
244 }
245
246 /** interface for the History nsdInstanceData */
247 export interface NSDInstanceData {
248     id?: string;
249     lcmOperationType?: string;
250     operationState?: string;
251     startTime?: number;
252     statusEnteredTime?: number;
253     identifier: string;
254     name: string;
255     NsdName: string;
256     OperationalStatus: string;
257     ConfigStatus: string;
258     DetailedStatus: string;
259     state?: string;
260     memberIndex?: DF[];
261     nsConfig?: object;
262     vcaStatus?: object;
263     adminDetails?: object;
264     vnfID?: string[];
265     nsd?: NSD;
266     operationParams?: OPERATIONPARAMS;
267     'nsd-id': string;
268     constituent: string[];
269 }
270
271 /** Interface for the operationparams */
272 export interface OPERATIONPARAMS {
273     scaleType?: string;
274     scaleVnfData?: SCALEVNFDATA;
275 }
276
277 /** Interface for the scaleVnfData */
278 export interface SCALEVNFDATA {
279     scaleVnfType?: string;
280     scaleByStepData?: SCALEBYSTEPDATA;
281 }
282
283 /** Interface for the scaleByStepData */
284 export interface SCALEBYSTEPDATA {
285     'scaling-group-descriptor'?: string;
286     'member-vnf-index'?: string;
287 }
288
289 /** Interface for the nsInfo */
290 export interface NSINFO {
291     nsInstanceID: string;
292     nsName: string;
293     nsOperationalStatus: string;
294     nsConfigStatus: string;
295     nsDetailedStatus: string;
296     nsResourceOrchestrator: string;
297 }
298
299 /** Interface for the NSINSTANCENODES */
300 export interface NSINSTANCENODES {
301     id?: string;
302     nodeTypeRef?: string;
303     name?: string;
304     'type'?: string;
305     vnfdCP?: DF[];
306     vimNetworkName?: string;
307     shortName?: string;
308     cp?: CONNECTIONPOINT[];
309     vdur?: string[];
310     vld?: NSDVLD[];
311     nsID?: string;
312     vnfdID?: string;
313     vimID?: string;
314     vndfrID?: string;
315     ipAddress?: string;
316     memberIndex?: string;
317     vnfdRef?: string;
318     vndfCPRef?: string;
319     selectorId?: string;
320     reflexive?: Boolean;
321     nodeIndex?: number;
322 }
323
324 /** Interface for the connection-point */
325 export interface CONNECTIONPOINT {
326     'connection-point-id': string;
327     name: string;
328     id: string;
329 }
330
331 /** Interface for Exec NS Primitive */
332 export interface NSPrimitive {
333     'primitive': string;
334     'primitive_params': NSPrimitiveParams[];
335     'member_vnf_index': string;
336 }
337
338 /** Interface for Exec NS Primitive Params */
339 export interface NSPrimitiveParams {
340     primitive_params_name: string;
341     primitive_params_value: string;
342 }
343
344 /** Interface Nodes Creation */
345 export interface COMPOSERNODES {
346     id: string;
347     reflexive: Boolean;
348     nodeTypeRef: string;
349     name?: string;
350     nodeIndex?: number;
351     selectorId?: string;
352     x?: number;
353     y?: number;
354     fx?: number;
355     fy?: number;
356     shortName?: string;
357     vimNetworkName?: string;
358     'type'?: string;
359     vnfdRef?: string;
360     memberIndex?: string;
361     vimID?: string;
362     vndfrID?: string;
363     ipAddress?: string;
364     nsID?: string;
365     vnfdID?: string;
366 }
367
368 /** Interface for the Virtual Link Info */
369 export interface VLINFO {
370     id: string;
371     name: string;
372     'type': string;
373     shortName: string;
374     vimNetworkName: string;
375 }
376
377 /** Interface for the VNFR Info */
378 export interface VNFRINFO {
379     vimID: string;
380     _id: string;
381     ip: string;
382     nsrID: string;
383     id: string;
384     vnfdRef: string;
385     vnfdId: string;
386     memberIndex: string;
387 }