blob: 022739d1cc7f5c233a48bf63834c6ceff57988d8 [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;
SANDHYA.JS92379ec2025-06-13 17:29:35 +053089 resourceState?: string;
SANDHYA.JSa3ff32a2025-02-13 16:24:46 +053090 profile_type?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053091}
Barath Kumar R063a3f12020-12-29 16:35:09 +053092/** Interface for DF */
93export interface VNFCONFIG {
94 id: string;
95 'config-primitive'?: CONFIGPRIMITIVE[];
96 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053097}
Barath Kumar R063a3f12020-12-29 16:35:09 +053098/** Interface for DF */
99export interface DF {
100 id: string;
101 'instantiation-level'?: INSTANTIATIONLEVEL[];
102 'vdu-profile'?: VDUPROFILE[];
103 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530104 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +0530105}
106/** Interface for INSTANTIATIONLEVEL */
107export interface INSTANTIATIONLEVEL {
108 id: string;
109 'vdu-level': VDULEVEL[];
110}
111/** Interface for VDULEVEL */
112export interface VDULEVEL {
113 'number-of-instances': number;
114 'vdu-id': string;
115}
116/** Interface for VDULEVEL */
117export interface VDUPROFILE {
118 id: string;
119 name?: string;
120 'min-number-of-instances'?: number;
121 'max-number-of-instances'?: number;
122 'vdu-configuration-id'?: string;
123 'vdu-configuration'?: VDUCONFIG;
124}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530125/** Interface for SCALING */
126export interface SCALING {
127 'aspect-delta-details'?: object;
128 id: string;
129 name?: string;
130 'max-scale-level'?: number;
131 'scaling-policy'?: SCALINGPOLICY[];
132}
133/** Interface for SCALINGPOLICY */
134export interface SCALINGPOLICY {
135 'cooldown-time': number;
136 name?: string;
137 'scaling-criteria': SCALINGCRITERIA[];
138 'scaling-type'?: string;
139 'threshold-time'?: number;
140}
141/** Interface for SCALINGCRITERIA */
142export interface SCALINGCRITERIA {
143 name?: string;
144 'scale-in-relational-operation': string;
145 'scale-in-threshold'?: string;
146 'scale-out-relational-operation'?: string;
147 'scale-out-threshold'?: string;
148 'vnf-monitoring-param-ref'?: string;
149}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530150/** Interface for VDUCONFIG */
151export interface VDUCONFIG {
152 id: string;
153 'config-primitive': CONFIGPRIMITIVE[];
154 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
155}
156/** Interface for CONFIGPRIMITIVE */
157export interface CONFIGPRIMITIVE {
158 name: string;
159}
160/** Interface for INITIALCONFIGPRIMITIVE */
161export interface INITIALCONFIGPRIMITIVE {
162 seq: string;
163 name: string;
164}
165/** Interface for the ext-cpd */
166export interface EXTCPD {
167 id?: string;
168 'int-cpd'?: INTCPD;
169}
170/** Interface for the int-cpd */
171export interface INTCPD {
172 cpd?: string;
173 'vdu-id'?: string;
174}
175/** Interface for IVLD */
176export interface IVLD {
177 id?: string;
178 description?: string;
179}
180/** Interface for SWIMAGEDESCRIPTION */
181export interface SWIMAGEDESCRIPTION {
182 id: string;
183 name: string;
184 version: string;
185}
kumaran.m3b4814a2020-05-01 19:48:54 +0530186/** Interface for VDU */
187export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530188 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530189 description?: string;
190 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530191 'int-cpd'?: VDUINTCPD[];
192 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530193 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530194 'sw-image-desc'?: string;
195 'virtual-compute-desc'?: string;
196 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530197}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530198/** Interface for the vdu int-cpd */
199export interface VDUINTCPD {
200 id: string;
201 'int-virtual-link-desc'?: string;
202 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530203}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530204/** Interface for the vdu int-cpd => VNIR */
205export interface VNIR {
206 name: string;
207 position: number;
208 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530209}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530210/** Interface for the VIRTUALINTERFACE */
211export interface VIRTUALINTERFACE {
212 'type': string;
213}
214/** Interface for monitoring params */
215export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530216 id: string;
217 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530218 'performance-metric'?: string;
219 'collection-period'?: number;
220}
221/** Interface for VNFDATA */
222export interface VNFDATA {
223 vnfd?: VNFD;
224}
225
226/** Interface for VDU InternalCPD */
227export interface InternalCPD {
228 id: string;
229 'int-virtual-link-desc'?: string;
230 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
231}
232
233/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
234export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
235 name: string;
236 position?: number;
237 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530238}
239
240/** Interface for VirutalInterface */
241interface VirtualInterface {
242 'type': string;
243}
244
kumaran.m3b4814a2020-05-01 19:48:54 +0530245/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530246export interface VNFDAdminDetails {
247 created: number;
248 modified: string;
249 onboardingState: string;
250 operationalState: string;
251 projects_read: string[];
252 projects_write: string[];
253 storage: Storage;
254 'type': string;
255 usageState: string;
256 userDefinedData: JSON;
257}
258
259/** Interface for Storage */
260interface Storage {
261 descriptor: string;
262 folder: string;
263 fs: string;
264 path: string;
265 'pkg-dir': string;
266 zipfile: string;
267}
268
269/** Interface for VNFData */
270export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530271 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530272 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530273 name?: string;
SANDHYA.JS26570112024-07-05 21:35:46 +0530274 description?: string;
275 version?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530276 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530277 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530278 provider?: string;
SANDHYA.JS26570112024-07-05 21:35:46 +0530279 onboardingState?: string;
280 usageState?: string;
281 created?: string;
282 state?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530283}
284
285/** Interface for the Tick */
286export interface Tick {
287 target: TickPath;
288 source: TickPath;
289 left: boolean;
290 right: boolean;
291}
292
293/** Interface for the Path */
294export interface TickPath {
295 x: number;
296 y: number;
297 id: string;
298 'type'?: string;
299}
300
301/** Interface Nodes Creation */
302export interface COMPOSERNODES {
303 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530304 reflexive: Boolean;
305 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530306 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530307 nodeIndex?: number;
308 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530309 x?: number;
310 y?: number;
311 fx?: number;
312 fy?: number;
313}
314
315/** Interface for the GRAPHDETAILS */
316export interface GRAPHDETAILS {
317 width: number;
318 height: number;
319 nodeHeight: number;
320 nodeWidth: number;
321 textX: number;
322 textY: number;
323 radius: number;
324 distance: number;
325 strength: number;
326 forcex: number;
327 forcey: number;
328 sourcePaddingYes: number;
329 sourcePaddingNo: number;
330 targetPaddingYes: number;
331 targetPaddingNo: number;
332 alphaTarget: number;
333 imageX: number;
334 imageY: number;
335 shiftKeyCode: number;
336}