Feature 10910: Migration of Openstack based VM instances
[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 // tslint:disable: completed-docs
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 // tslint:disable-next-line:class-name
71 interface _Admin {
72     'projects_write': string[];
73     deployed: DeployedAdmin;
74     nslcmop: string;
75     nsState: string;
76     modified: number;
77     projects_read: string[];
78     created: string;
79 }
80
81 /** Interface for Deployed_Admin */
82 interface DeployedAdmin {
83     VCA: string[];
84     RO: ROAdmin;
85 }
86
87 /** Interface for RO_Admin */
88 interface ROAdmin {
89     'nsr_status': string;
90     'nsr_id': string;
91     'nsd_id': string;
92     vnfd: VNFD[];
93 }
94
95 /** Interface for VNFD */
96 interface VNFD {
97     'member-vnf-index': number;
98     id: string;
99 }
100
101 /** Interface for NSD */
102 export interface NSD {
103     description: string;
104     _admin: VNFDAdminDetails;
105     name: string;
106     version: string;
107     _id: string;
108     id: string;
109     vendor: string;
110     vdur: string[];
111     'connection-point': CONNECTIONPOINT[];
112     'virtual-link-desc': NSDVLD[];
113     df: DF[];
114 }
115
116 /** Interface for _AdminDetails */
117 // tslint:disable-next-line:class-name
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 InstantiateParam */
167 interface InstantiateParam {
168     nsdId: string;
169     nsName: string;
170     nsDescription: string;
171     vimAccountId: string;
172 }
173
174 /** Interface for AdditionalParamForN */
175 interface AdditionalParamForN {
176     _id: string;
177     'ns-instance-config-ref': string;
178     'crete-time': string;
179 }
180
181 /** interface for the History nsdInstanceData */
182 export interface NSDInstanceData {
183     id?: string;
184     lcmOperationType?: string;
185     operationState?: string;
186     startTime?: number;
187     statusEnteredTime?: number;
188     identifier: string;
189     name: string;
190     NsdName: string;
191     OperationalStatus: string;
192     ConfigStatus: string;
193     DetailedStatus: string;
194     state?: string;
195     memberIndex?: DF[];
196     nsConfig?: object;
197     vcaStatus?: object;
198     adminDetails?: object;
199     vnfID?: string[];
200     nsd?: NSD;
201     operationParams?: OPERATIONPARAMS;
202     'nsd-id': string;
203 }
204
205 /** Interface for the operationparams */
206 export interface OPERATIONPARAMS {
207     scaleType?: string;
208     scaleVnfData?: SCALEVNFDATA;
209 }
210
211 /** Interface for the scaleVnfData */
212 export interface SCALEVNFDATA {
213     scaleVnfType?: string;
214     scaleByStepData?: SCALEBYSTEPDATA;
215 }
216
217 /** Interface for the scaleByStepData */
218 export interface SCALEBYSTEPDATA {
219     'scaling-group-descriptor'?: string;
220     'member-vnf-index'?: string;
221 }
222
223 /** Interface for the nsInfo */
224 export interface NSINFO {
225     nsInstanceID: string;
226     nsName: string;
227     nsOperationalStatus: string;
228     nsConfigStatus: string;
229     nsDetailedStatus: string;
230     nsResourceOrchestrator: string;
231 }
232
233 /** Interface for the NSINSTANCENODES */
234 export interface NSINSTANCENODES {
235     id?: string;
236     nodeTypeRef?: string;
237     name?: string;
238     'type'?: string;
239     vnfdCP?: DF[];
240     vimNetworkName?: string;
241     shortName?: string;
242     cp?: CONNECTIONPOINT[];
243     vdur?: string[];
244     vld?: NSDVLD[];
245     nsID?: string;
246     vnfdID?: string;
247     vimID?: string;
248     vndfrID?: string;
249     ipAddress?: string;
250     memberIndex?: string;
251     vnfdRef?: string;
252     vndfCPRef?: string;
253     selectorId?: string;
254     reflexive?: Boolean;
255     nodeIndex?: number;
256 }
257
258 /** Interface for the connection-point */
259 export interface CONNECTIONPOINT {
260     'connection-point-id': string;
261     name: string;
262     id: string;
263 }
264
265 /** Interface for Exec NS Primitive */
266 export interface NSPrimitive {
267     'primitive': string;
268     'primitive_params': NSPrimitiveParams[];
269     'member_vnf_index': string;
270 }
271
272 /** Interface for Exec NS Primitive Params */
273 export interface NSPrimitiveParams {
274     primitive_params_name: string;
275     primitive_params_value: string;
276 }
277
278 /** Interface Nodes Creation */
279 export interface COMPOSERNODES {
280     id: string;
281     reflexive: Boolean;
282     nodeTypeRef: string;
283     name?: string;
284     nodeIndex?: number;
285     selectorId?: string;
286     x?: number;
287     y?: number;
288     fx?: number;
289     fy?: number;
290     shortName?: string;
291     vimNetworkName?: string;
292     'type'?: string;
293     vnfdRef?: string;
294     memberIndex?: string;
295     vimID?: string;
296     vndfrID?: string;
297     ipAddress?: string;
298     nsID?: string;
299     vnfdID?: string;
300 }
301
302 /** Interface for the Virtual Link Info */
303 export interface VLINFO {
304     id: string;
305     name: string;
306     'type': string;
307     shortName: string;
308     vimNetworkName: string;
309 }
310
311 /** Interface for the VNFR Info */
312 export interface VNFRINFO {
313     vimID: string;
314     _id: string;
315     ip: string;
316     nsrID: string;
317     id: string;
318     vnfdRef: string;
319     vnfdId: string;
320     memberIndex: string;
321 }