Feature 11038: Enhancement of Vertical Scale Feature and merge in update API
[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     verticalScaleVnf?: VERTICALSCALEDATA;
173 }
174
175 /** Interface for changeVnfPackageData in Ns Update */
176 export interface CHANGEVNFDATA {
177     vnfdId: string;
178     vnfInstanceId: string;
179 }
180
181 /** Interface for vertical scaling */
182 export interface VERTICALSCALEDATA {
183     vnfdId: string;
184     vnfInstanceId: string;
185     vduId: string;
186     countIndex: number;
187 }
188 /** Interface for terminate vnf in Ns Update */
189 export interface TERMINATEVNF {
190     lcmOperationType: string;
191     updateType: string;
192     nsInstanceId: string;
193     removeVnfInstanceId: string;
194 }
195
196 /** Interface for Start, Stop & Rebuild */
197 export interface StartStopRebuild {
198     updateType: string;
199     operateVnfData: OPERATEVNFDATA;
200 }
201
202 /** Interface for operateVnfData  in Start, Stop and Rebuild */
203 export interface OPERATEVNFDATA {
204     additionalParam: ADDITIONALPARAMS;
205     vnfInstanceId: string;
206     changeStateTo: string;
207 }
208
209 /** Interface for additionalParam in Start, Stop and Rebuild */
210 export interface ADDITIONALPARAMS {
211     'run-day1': boolean;
212     'vdu_id': string;
213     'count-index': string;
214 }
215
216 /** Interface for VerticalScaling */
217 export interface VerticalScaling {
218     lcmOperationType: string;
219     verticalScale: string;
220     nsInstanceId: string;
221     changeVnfFlavorData: CHANGEVNFFLAVORDATAPARAM;
222 }
223
224 /** Interface for changeVnfFlavorData in Vertical Scaling */
225 export interface CHANGEVNFFLAVORDATAPARAM {
226     vnfInstanceId: string;
227     additionalParams: ADDITIONALPARAM;
228
229 }
230
231 /** Interface for additionalParam in Vertical Scaling */
232 export interface ADDITIONALPARAM {
233     vduid: string;
234     vduCountIndex: string;
235     virtualMemory: number;
236     sizeOfStorage: number;
237     numVirtualCpu: number;
238
239 }
240
241 /** Interface for InstantiateParam */
242 interface InstantiateParam {
243     nsdId: string;
244     nsName: string;
245     nsDescription: string;
246     vimAccountId: string;
247 }
248
249 /** Interface for AdditionalParamForN */
250 interface AdditionalParamForN {
251     _id: string;
252     'ns-instance-config-ref': string;
253     'crete-time': string;
254 }
255
256 /** interface for the History nsdInstanceData */
257 export interface NSDInstanceData {
258     id?: string;
259     lcmOperationType?: string;
260     operationState?: string;
261     startTime?: number;
262     statusEnteredTime?: number;
263     identifier: string;
264     name: string;
265     NsdName: string;
266     OperationalStatus: string;
267     ConfigStatus: string;
268     DetailedStatus: string;
269     state?: string;
270     memberIndex?: DF[];
271     nsConfig?: object;
272     vcaStatus?: object;
273     adminDetails?: object;
274     vnfID?: string[];
275     nsd?: NSD;
276     operationParams?: OPERATIONPARAMS;
277     'nsd-id': string;
278     constituent: string[];
279     'create-time'?: string;
280 }
281
282 /** Interface for the operationparams */
283 export interface OPERATIONPARAMS {
284     scaleType?: string;
285     scaleVnfData?: SCALEVNFDATA;
286 }
287
288 /** Interface for the scaleVnfData */
289 export interface SCALEVNFDATA {
290     scaleVnfType?: string;
291     scaleByStepData?: SCALEBYSTEPDATA;
292 }
293
294 /** Interface for the scaleByStepData */
295 export interface SCALEBYSTEPDATA {
296     'scaling-group-descriptor'?: string;
297     'member-vnf-index'?: string;
298 }
299
300 /** Interface for the nsInfo */
301 export interface NSINFO {
302     nsInstanceID: string;
303     nsName: string;
304     nsOperationalStatus: string;
305     nsConfigStatus: string;
306     nsDetailedStatus: string;
307     nsResourceOrchestrator: string;
308 }
309
310 /** Interface for the NSINSTANCENODES */
311 export interface NSINSTANCENODES {
312     id?: string;
313     nodeTypeRef?: string;
314     name?: string;
315     'type'?: string;
316     vnfdCP?: DF[];
317     vimNetworkName?: string;
318     shortName?: string;
319     cp?: CONNECTIONPOINT[];
320     vdur?: string[];
321     vld?: NSDVLD[];
322     nsID?: string;
323     vnfdID?: string;
324     vimID?: string;
325     vndfrID?: string;
326     ipAddress?: string;
327     memberIndex?: string;
328     vnfdRef?: string;
329     vndfCPRef?: string;
330     selectorId?: string;
331     reflexive?: Boolean;
332     nodeIndex?: number;
333 }
334
335 /** Interface for the connection-point */
336 export interface CONNECTIONPOINT {
337     'connection-point-id': string;
338     name: string;
339     id: string;
340 }
341
342 /** Interface for Exec NS Primitive */
343 export interface NSPrimitive {
344     'primitive': string;
345     'primitive_params': NSPrimitiveParams[];
346     'member_vnf_index': string;
347 }
348
349 /** Interface for Exec NS Primitive Params */
350 export interface NSPrimitiveParams {
351     primitive_params_name: string;
352     primitive_params_value: string;
353 }
354
355 /** Interface Nodes Creation */
356 export interface COMPOSERNODES {
357     id: string;
358     reflexive: Boolean;
359     nodeTypeRef: string;
360     name?: string;
361     nodeIndex?: number;
362     selectorId?: string;
363     x?: number;
364     y?: number;
365     fx?: number;
366     fy?: number;
367     shortName?: string;
368     vimNetworkName?: string;
369     'type'?: string;
370     vnfdRef?: string;
371     memberIndex?: string;
372     vimID?: string;
373     vndfrID?: string;
374     ipAddress?: string;
375     nsID?: string;
376     vnfdID?: string;
377 }
378
379 /** Interface for the Virtual Link Info */
380 export interface VLINFO {
381     id: string;
382     name: string;
383     'type': string;
384     shortName: string;
385     vimNetworkName: string;
386 }
387
388 /** Interface for the VNFR Info */
389 export interface VNFRINFO {
390     vimID: string;
391     _id: string;
392     ip: string;
393     nsrID: string;
394     id: string;
395     vnfdRef: string;
396     vnfdId: string;
397     memberIndex: string;
398 }
399
400 /** Interface for vdu mappings */
401 export interface VDUMAP {
402     vdu_mappings?: VDUMAPPINGS[];
403 }
404
405 /** Interface for vdu Mappings */
406 export interface VDUMAPPINGS {
407     vduId?: string;
408     'vdu-id'?: string;
409     countIndex?: string;
410     'count-index'?: string;
411     runDay1?: Boolean;
412     'run-day1'?: Boolean;
413 }