Initial Commit - NG UI
[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
22 import { CONSTITUENTVNFD, VLD, VNFDCONNECTIONPOINTREF } 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     name: string;
38     'name-ref': string;
39     'short-name': 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 }
52
53 /** Interface for Admin */
54 interface Admin {
55     deployed: DeployedAdmin;
56 }
57
58 /** Interface for DeployedAdmin */
59 interface DeployedAdmin {
60     RO: ROAdmin;
61 }
62
63 /** Interface for ROAdmin */
64 interface ROAdmin {
65     'nsr_status': string;
66 }
67
68 /** Interface for _Admin */
69 // tslint:disable-next-line:class-name
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     vld: NSDVLD[];
104     _admin: VNFDAdminDetails;
105     name: string;
106     version: string;
107     _id: string;
108     'short-name': string;
109     id: string;
110     'constituent-vnfd': CONSTITUENTVNFD[];
111     vendor: string;
112     vdur: string[];
113     'connection-point': CONNECTIONPOINT[];
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     'vnfd-connection-point-ref': VNFDCONNECTIONPOINTREF[];
150     'short-name': string;
151 }
152
153 /** Interface for InstantiateParam */
154 interface InstantiateParam {
155     nsdId: string;
156     nsName: string;
157     nsDescription: string;
158     vimAccountId: string;
159 }
160
161 /** Interface for AdditionalParamForN */
162 interface AdditionalParamForN {
163     _id: string;
164     'ns-instance-config-ref': string;
165     'crete-time': string;
166 }
167
168 /** interface for the History nsdInstanceData */
169 export interface NSDInstanceData {
170     id?: string;
171     lcmOperationType?: string;
172     operationState?: string;
173     startTime?: number;
174     statusEnteredTime?: number;
175     identifier: string;
176     name: string;
177     NsdName: string;
178     OperationalStatus: string;
179     ConfigStatus: string;
180     DetailedStatus: string;
181     state?: string;
182     memberIndex?: object;
183     nsConfig?: object;
184 }
185
186 /** Interface for the nsInfo */
187 export interface NSINFO {
188     nsInstanceID: string;
189     nsName: string;
190     nsOperationalStatus: string;
191     nsConfigStatus: string;
192     nsDetailedStatus: string;
193     nsResourceOrchestrator: string;
194 }
195
196 /** Interface for the NSINSTANCENODES */
197 export interface NSINSTANCENODES {
198     id?: string;
199     nodeTypeRef?: string;
200     name?: string;
201     'type'?: string;
202     vnfdCP?: VNFDCONNECTIONPOINTREF[];
203     vimNetworkName?: string;
204     shortName?: string;
205     cp?: CONNECTIONPOINT[];
206     vdur?: string[];
207     vld?: NSDVLD[];
208     nsID?: string;
209     vnfdID?: string;
210     vimID?: string;
211     vndfrID?: string;
212     ipAddress?: string;
213     memberIndex?: string;
214     vnfdRef?: string;
215     vndfCPRef?: string;
216     selectorId?: string;
217 }
218
219 /** Interface for the connection-point */
220 export interface CONNECTIONPOINT {
221     'connection-point-id': string;
222     name: string;
223     id: string;
224 }
225
226 /** Interface for Exec NS Primitive */
227 export interface NSPrimitive {
228     'primitive': string;
229     'primitive_params': NSPrimitiveParams[];
230     'member_vnf_index': string;
231 }
232
233 /** Interface for Exec NS Primitive Params */
234 export interface NSPrimitiveParams {
235     primitive_params_name: string;
236     primitive_params_value: string;
237 }
238
239 /** Interface Nodes Creation */
240 export interface COMPOSERNODES {
241     id: string;
242     reflexive: Boolean;
243     nodeTypeRef: string;
244     name?: string;
245     nodeIndex?: number;
246     selectorId?: string;
247     x?: number;
248     y?: number;
249     fx?: number;
250     fy?: number;
251     shortName?: string;
252     vimNetworkName?: string;
253     'type'?: string;
254     vnfdRef?: string;
255     memberIndex?: string;
256     vimID?: string;
257     vndfrID?: string;
258     ipAddress?: string;
259     nsID?: string;
260     vnfdID?: string;
261 }
262
263 /** Interface for the Virtual Link Info */
264 export interface VLINFO {
265     id: string;
266     name: string;
267     'type': string;
268     shortName: string;
269     vimNetworkName: string;
270 }
271
272 /** Interface for the VNFR Info */
273 export interface VNFRINFO{
274     vimID: string;
275     _id: string;
276     ip: string;
277     nsrID: string;
278     id: string;
279     vnfdRef: string;
280     vnfdId: string;
281     memberIndex: string;
282 }