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