blob: cb9c6b9f306fe4b17ec98e09fe2868b87882a9c8 [file] [log] [blame]
kumaran.m3b4814a2020-05-01 19:48:54 +05301/*
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 */
kumaran.m3b4814a2020-05-01 19:48:54 +053021/** Interface for Project */
22export 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;
SANDHYA.JSa9816552022-04-12 09:07:08 +053034 message?: string;
35 user_id?: string;
SANDHYA.JS1b17c432023-04-26 17:54:57 +053036 roles?: RolesData[];
37 last_login?: number;
38 login_count?: string;
39 user_show?: boolean;
40 admin_show?: boolean;
SANDHYA.JS52474e72024-06-10 21:47:25 +053041 timeout?: string;
SANDHYA.JS1b17c432023-04-26 17:54:57 +053042}
43
44/** Interface for Roles */
45export interface RolesData {
46 name?: string;
47 id?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053048}
49
50/** Interface for ProjectDetails */
51export interface ProjectDetails {
52 _admin: AdminDetails;
53 name: string;
54 _id: string;
55}
56
57/** Interface for AdminDetails */
58interface AdminDetails {
59 modified: string;
60 created: string;
61}
62
Barath Kumar R063a3f12020-12-29 16:35:09 +053063/** Interface for VNFD Details */
64export interface VNFD {
kumaran.m3b4814a2020-05-01 19:48:54 +053065 description?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053066 df?: DF[];
67 'ext-cpd'?: EXTCPD[];
kumaran.m3b4814a2020-05-01 19:48:54 +053068 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053069 'int-virtual-link-desc'?: IVLD[];
70 'mgmt-cp'?: string;
71 onboardingState?: string;
72 operationalState?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +053073 'product-name'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053074 provider?: string;
75 'sw-image-desc'?: SWIMAGEDESCRIPTION[];
76 usageState?: string;
77 vdu?: VDU[];
78 version?: string;
SANDHYA.JS99144582022-04-27 17:22:35 +053079 'software-version'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053080 'virtual-compute-desc'?: string;
81 'virtual-storage-desc'?: string[];
82 _admin?: VNFDAdminDetails;
83 _id?: string;
84 _links?: string;
85 'vnf-configuration'?: VNFCONFIG[];
86 kdu?: [];
SANDHYA.JS26570112024-07-05 21:35:46 +053087 name?: string;
88 state?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053089}
Barath Kumar R063a3f12020-12-29 16:35:09 +053090/** Interface for DF */
91export interface VNFCONFIG {
92 id: string;
93 'config-primitive'?: CONFIGPRIMITIVE[];
94 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053095}
Barath Kumar R063a3f12020-12-29 16:35:09 +053096/** Interface for DF */
97export interface DF {
98 id: string;
99 'instantiation-level'?: INSTANTIATIONLEVEL[];
100 'vdu-profile'?: VDUPROFILE[];
101 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530102 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +0530103}
104/** Interface for INSTANTIATIONLEVEL */
105export interface INSTANTIATIONLEVEL {
106 id: string;
107 'vdu-level': VDULEVEL[];
108}
109/** Interface for VDULEVEL */
110export interface VDULEVEL {
111 'number-of-instances': number;
112 'vdu-id': string;
113}
114/** Interface for VDULEVEL */
115export interface VDUPROFILE {
116 id: string;
117 name?: string;
118 'min-number-of-instances'?: number;
119 'max-number-of-instances'?: number;
120 'vdu-configuration-id'?: string;
121 'vdu-configuration'?: VDUCONFIG;
122}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530123/** Interface for SCALING */
124export interface SCALING {
125 'aspect-delta-details'?: object;
126 id: string;
127 name?: string;
128 'max-scale-level'?: number;
129 'scaling-policy'?: SCALINGPOLICY[];
130}
131/** Interface for SCALINGPOLICY */
132export interface SCALINGPOLICY {
133 'cooldown-time': number;
134 name?: string;
135 'scaling-criteria': SCALINGCRITERIA[];
136 'scaling-type'?: string;
137 'threshold-time'?: number;
138}
139/** Interface for SCALINGCRITERIA */
140export interface SCALINGCRITERIA {
141 name?: string;
142 'scale-in-relational-operation': string;
143 'scale-in-threshold'?: string;
144 'scale-out-relational-operation'?: string;
145 'scale-out-threshold'?: string;
146 'vnf-monitoring-param-ref'?: string;
147}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530148/** Interface for VDUCONFIG */
149export interface VDUCONFIG {
150 id: string;
151 'config-primitive': CONFIGPRIMITIVE[];
152 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
153}
154/** Interface for CONFIGPRIMITIVE */
155export interface CONFIGPRIMITIVE {
156 name: string;
157}
158/** Interface for INITIALCONFIGPRIMITIVE */
159export interface INITIALCONFIGPRIMITIVE {
160 seq: string;
161 name: string;
162}
163/** Interface for the ext-cpd */
164export interface EXTCPD {
165 id?: string;
166 'int-cpd'?: INTCPD;
167}
168/** Interface for the int-cpd */
169export interface INTCPD {
170 cpd?: string;
171 'vdu-id'?: string;
172}
173/** Interface for IVLD */
174export interface IVLD {
175 id?: string;
176 description?: string;
177}
178/** Interface for SWIMAGEDESCRIPTION */
179export interface SWIMAGEDESCRIPTION {
180 id: string;
181 name: string;
182 version: string;
183}
kumaran.m3b4814a2020-05-01 19:48:54 +0530184/** Interface for VDU */
185export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530186 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530187 description?: string;
188 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530189 'int-cpd'?: VDUINTCPD[];
190 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530191 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530192 'sw-image-desc'?: string;
193 'virtual-compute-desc'?: string;
194 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530195}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530196/** Interface for the vdu int-cpd */
197export interface VDUINTCPD {
198 id: string;
199 'int-virtual-link-desc'?: string;
200 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530201}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530202/** Interface for the vdu int-cpd => VNIR */
203export interface VNIR {
204 name: string;
205 position: number;
206 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530207}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530208/** Interface for the VIRTUALINTERFACE */
209export interface VIRTUALINTERFACE {
210 'type': string;
211}
212/** Interface for monitoring params */
213export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530214 id: string;
215 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530216 'performance-metric'?: string;
217 'collection-period'?: number;
218}
219/** Interface for VNFDATA */
220export interface VNFDATA {
221 vnfd?: VNFD;
222}
223
224/** Interface for VDU InternalCPD */
225export interface InternalCPD {
226 id: string;
227 'int-virtual-link-desc'?: string;
228 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
229}
230
231/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
232export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
233 name: string;
234 position?: number;
235 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530236}
237
238/** Interface for VirutalInterface */
239interface VirtualInterface {
240 'type': string;
241}
242
kumaran.m3b4814a2020-05-01 19:48:54 +0530243/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530244export interface VNFDAdminDetails {
245 created: number;
246 modified: string;
247 onboardingState: string;
248 operationalState: string;
249 projects_read: string[];
250 projects_write: string[];
251 storage: Storage;
252 'type': string;
253 usageState: string;
254 userDefinedData: JSON;
255}
256
257/** Interface for Storage */
258interface Storage {
259 descriptor: string;
260 folder: string;
261 fs: string;
262 path: string;
263 'pkg-dir': string;
264 zipfile: string;
265}
266
267/** Interface for VNFData */
268export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530269 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530270 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530271 name?: string;
SANDHYA.JS26570112024-07-05 21:35:46 +0530272 description?: string;
273 version?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530274 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530275 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530276 provider?: string;
SANDHYA.JS26570112024-07-05 21:35:46 +0530277 onboardingState?: string;
278 usageState?: string;
279 created?: string;
280 state?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530281}
282
283/** Interface for the Tick */
284export interface Tick {
285 target: TickPath;
286 source: TickPath;
287 left: boolean;
288 right: boolean;
289}
290
291/** Interface for the Path */
292export interface TickPath {
293 x: number;
294 y: number;
295 id: string;
296 'type'?: string;
297}
298
299/** Interface Nodes Creation */
300export interface COMPOSERNODES {
301 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530302 reflexive: Boolean;
303 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530304 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530305 nodeIndex?: number;
306 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530307 x?: number;
308 y?: number;
309 fx?: number;
310 fy?: number;
311}
312
313/** Interface for the GRAPHDETAILS */
314export interface GRAPHDETAILS {
315 width: number;
316 height: number;
317 nodeHeight: number;
318 nodeWidth: number;
319 textX: number;
320 textY: number;
321 radius: number;
322 distance: number;
323 strength: number;
324 forcex: number;
325 forcey: number;
326 sourcePaddingYes: number;
327 sourcePaddingNo: number;
328 targetPaddingYes: number;
329 targetPaddingNo: number;
330 alphaTarget: number;
331 imageX: number;
332 imageY: number;
333 shiftKeyCode: number;
334}