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