Feature 10941: User Management Enhancements
[osm/NG-UI.git] / src / models / VNFDModel.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 VNFD related information.
20  */
21 /** Interface for Project */
22 export interface ProjectModel {
23     project_id: string;
24     project?: string;
25     project_name?: string;
26     expires: number;
27     _id: string;
28     id: string;
29     issued_at: number;
30     remote_port: number;
31     username: string;
32     remote_host: string;
33     admin: boolean;
34     message?: string;
35     user_id?: string;
36     roles?: RolesData[];
37     last_login?: number;
38     login_count?: string;
39     user_show?: boolean;
40     admin_show?: boolean;
41 }
42
43 /** Interface for Roles */
44 export interface RolesData {
45     name?: string;
46     id?: string;
47 }
48
49 /** Interface for ProjectDetails */
50 export interface ProjectDetails {
51     _admin: AdminDetails;
52     name: string;
53     _id: string;
54 }
55
56 /** Interface for AdminDetails */
57 interface AdminDetails {
58     modified: string;
59     created: string;
60 }
61
62 /** Interface for VNFD Details */
63 export interface VNFD {
64     description?: string;
65     df?: DF[];
66     'ext-cpd'?: EXTCPD[];
67     id: string;
68     'int-virtual-link-desc'?: IVLD[];
69     'mgmt-cp'?: string;
70     onboardingState?: string;
71     operationalState?: string;
72     'product-name'?: string;
73     provider?: string;
74     'sw-image-desc'?: SWIMAGEDESCRIPTION[];
75     usageState?: string;
76     vdu?: VDU[];
77     version?: string;
78     'software-version'?: string;
79     'virtual-compute-desc'?: string;
80     'virtual-storage-desc'?: string[];
81     _admin?: VNFDAdminDetails;
82     _id?: string;
83     _links?: string;
84     'vnf-configuration'?: VNFCONFIG[];
85     kdu?: [];
86 }
87 /** Interface for DF */
88 export interface VNFCONFIG {
89     id: string;
90     'config-primitive'?: CONFIGPRIMITIVE[];
91     'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
92 }
93 /** Interface for DF */
94 export interface DF {
95     id: string;
96     'instantiation-level'?: INSTANTIATIONLEVEL[];
97     'vdu-profile'?: VDUPROFILE[];
98     'vnf-configuration-id'?: string;
99     'scaling-aspect'?: SCALING[];
100 }
101 /** Interface for INSTANTIATIONLEVEL */
102 export interface INSTANTIATIONLEVEL {
103     id: string;
104     'vdu-level': VDULEVEL[];
105 }
106 /** Interface for VDULEVEL */
107 export interface VDULEVEL {
108     'number-of-instances': number;
109     'vdu-id': string;
110 }
111 /** Interface for VDULEVEL */
112 export interface VDUPROFILE {
113     id: string;
114     name?: string;
115     'min-number-of-instances'?: number;
116     'max-number-of-instances'?: number;
117     'vdu-configuration-id'?: string;
118     'vdu-configuration'?: VDUCONFIG;
119 }
120 /** Interface for SCALING */
121 export interface SCALING {
122     'aspect-delta-details'?: object;
123     id: string;
124     name?: string;
125     'max-scale-level'?: number;
126     'scaling-policy'?: SCALINGPOLICY[];
127 }
128 /** Interface for SCALINGPOLICY */
129 export interface SCALINGPOLICY {
130     'cooldown-time': number;
131     name?: string;
132     'scaling-criteria': SCALINGCRITERIA[];
133     'scaling-type'?: string;
134     'threshold-time'?: number;
135 }
136 /** Interface for SCALINGCRITERIA */
137 export interface SCALINGCRITERIA {
138     name?: string;
139     'scale-in-relational-operation': string;
140     'scale-in-threshold'?: string;
141     'scale-out-relational-operation'?: string;
142     'scale-out-threshold'?: string;
143     'vnf-monitoring-param-ref'?: string;
144 }
145 /** Interface for VDUCONFIG */
146 export interface VDUCONFIG {
147     id: string;
148     'config-primitive': CONFIGPRIMITIVE[];
149     'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
150 }
151 /** Interface for CONFIGPRIMITIVE */
152 export interface CONFIGPRIMITIVE {
153     name: string;
154 }
155 /** Interface for INITIALCONFIGPRIMITIVE */
156 export interface INITIALCONFIGPRIMITIVE {
157     seq: string;
158     name: string;
159 }
160 /** Interface for the ext-cpd */
161 export interface EXTCPD {
162     id?: string;
163     'int-cpd'?: INTCPD;
164 }
165 /** Interface for the int-cpd */
166 export interface INTCPD {
167     cpd?: string;
168     'vdu-id'?: string;
169 }
170 /** Interface for IVLD */
171 export interface IVLD {
172     id?: string;
173     description?: string;
174 }
175 /** Interface for SWIMAGEDESCRIPTION */
176 export interface SWIMAGEDESCRIPTION {
177     id: string;
178     name: string;
179     version: string;
180 }
181 /** Interface for VDU */
182 export interface VDU {
183     'cloud-init-file'?: string;
184     description?: string;
185     id?: string;
186     'int-cpd'?: VDUINTCPD[];
187     'monitoring-parameter'?: MonitoringParam[];
188     name?: string;
189     'sw-image-desc'?: string;
190     'virtual-compute-desc'?: string;
191     'virtual-storage-desc'?: string[];
192 }
193 /** Interface for the vdu int-cpd */
194 export interface VDUINTCPD {
195     id: string;
196     'int-virtual-link-desc'?: string;
197     'virtual-network-interface-requirement': VNIR[];
198 }
199 /** Interface for the vdu int-cpd => VNIR */
200 export interface VNIR {
201     name: string;
202     position: number;
203     'virtual-interface': VIRTUALINTERFACE;
204 }
205 /** Interface for the VIRTUALINTERFACE */
206 export interface VIRTUALINTERFACE {
207     'type': string;
208 }
209 /** Interface for monitoring params */
210 export interface MonitoringParam {
211     id: string;
212     name?: string;
213     'performance-metric'?: string;
214     'collection-period'?: number;
215 }
216 /** Interface for VNFDATA */
217 export interface VNFDATA {
218     vnfd?: VNFD;
219 }
220
221 /** Interface for VDU InternalCPD */
222 export interface InternalCPD {
223     id: string;
224     'int-virtual-link-desc'?: string;
225     'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
226 }
227
228 /** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
229 export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
230     name: string;
231     position?: number;
232     'virtual-interface'?: VirtualInterface;
233 }
234
235 /** Interface for VirutalInterface */
236 interface VirtualInterface {
237     'type': string;
238 }
239
240 /** Interface for _AdminDetails */
241 export interface VNFDAdminDetails {
242     created: number;
243     modified: string;
244     onboardingState: string;
245     operationalState: string;
246     projects_read: string[];
247     projects_write: string[];
248     storage: Storage;
249     'type': string;
250     usageState: string;
251     userDefinedData: JSON;
252 }
253
254 /** Interface for Storage */
255 interface Storage {
256     descriptor: string;
257     folder: string;
258     fs: string;
259     path: string;
260     'pkg-dir': string;
261     zipfile: string;
262 }
263
264 /** Interface for VNFData */
265 export interface VNFData {
266     identifier?: string;
267     id?: string;
268     name?: string;
269     description: string;
270     version: string;
271     'type'?: string;
272     productName?: string;
273     provider?: string;
274 }
275
276 /** Interface for the Tick */
277 export interface Tick {
278     target: TickPath;
279     source: TickPath;
280     left: boolean;
281     right: boolean;
282 }
283
284 /** Interface for the Path */
285 export interface TickPath {
286     x: number;
287     y: number;
288     id: string;
289     'type'?: string;
290 }
291
292 /** Interface Nodes Creation */
293 export interface COMPOSERNODES {
294     id: string;
295     reflexive: Boolean;
296     'type': string;
297     name?: string;
298     nodeIndex?: number;
299     selectorId?: string;
300     x?: number;
301     y?: number;
302     fx?: number;
303     fy?: number;
304 }
305
306 /** Interface for the GRAPHDETAILS */
307 export interface GRAPHDETAILS {
308     width: number;
309     height: number;
310     nodeHeight: number;
311     nodeWidth: number;
312     textX: number;
313     textY: number;
314     radius: number;
315     distance: number;
316     strength: number;
317     forcex: number;
318     forcey: number;
319     sourcePaddingYes: number;
320     sourcePaddingNo: number;
321     targetPaddingYes: number;
322     targetPaddingNo: number;
323     alphaTarget: number;
324     imageX: number;
325     imageY: number;
326     shiftKeyCode: number;
327 }