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