blob: 6eafe39c886b72d2ef15190cfc5235cb84a8adff [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;
kumaran.m3b4814a2020-05-01 19:48:54 +053036}
37
38/** Interface for ProjectDetails */
39export interface ProjectDetails {
40 _admin: AdminDetails;
41 name: string;
42 _id: string;
43}
44
45/** Interface for AdminDetails */
46interface AdminDetails {
47 modified: string;
48 created: string;
49}
50
Barath Kumar R063a3f12020-12-29 16:35:09 +053051/** Interface for VNFD Details */
52export interface VNFD {
kumaran.m3b4814a2020-05-01 19:48:54 +053053 description?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053054 df?: DF[];
55 'ext-cpd'?: EXTCPD[];
kumaran.m3b4814a2020-05-01 19:48:54 +053056 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053057 'int-virtual-link-desc'?: IVLD[];
58 'mgmt-cp'?: string;
59 onboardingState?: string;
60 operationalState?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +053061 'product-name'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053062 provider?: string;
63 'sw-image-desc'?: SWIMAGEDESCRIPTION[];
64 usageState?: string;
65 vdu?: VDU[];
66 version?: string;
SANDHYA.JS99144582022-04-27 17:22:35 +053067 'software-version'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053068 'virtual-compute-desc'?: string;
69 'virtual-storage-desc'?: string[];
70 _admin?: VNFDAdminDetails;
71 _id?: string;
72 _links?: string;
73 'vnf-configuration'?: VNFCONFIG[];
74 kdu?: [];
kumaran.m3b4814a2020-05-01 19:48:54 +053075}
Barath Kumar R063a3f12020-12-29 16:35:09 +053076/** Interface for DF */
77export interface VNFCONFIG {
78 id: string;
79 'config-primitive'?: CONFIGPRIMITIVE[];
80 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053081}
Barath Kumar R063a3f12020-12-29 16:35:09 +053082/** Interface for DF */
83export interface DF {
84 id: string;
85 'instantiation-level'?: INSTANTIATIONLEVEL[];
86 'vdu-profile'?: VDUPROFILE[];
87 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +053088 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +053089}
90/** Interface for INSTANTIATIONLEVEL */
91export interface INSTANTIATIONLEVEL {
92 id: string;
93 'vdu-level': VDULEVEL[];
94}
95/** Interface for VDULEVEL */
96export interface VDULEVEL {
97 'number-of-instances': number;
98 'vdu-id': string;
99}
100/** Interface for VDULEVEL */
101export interface VDUPROFILE {
102 id: string;
103 name?: string;
104 'min-number-of-instances'?: number;
105 'max-number-of-instances'?: number;
106 'vdu-configuration-id'?: string;
107 'vdu-configuration'?: VDUCONFIG;
108}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530109/** Interface for SCALING */
110export interface SCALING {
111 'aspect-delta-details'?: object;
112 id: string;
113 name?: string;
114 'max-scale-level'?: number;
115 'scaling-policy'?: SCALINGPOLICY[];
116}
117/** Interface for SCALINGPOLICY */
118export interface SCALINGPOLICY {
119 'cooldown-time': number;
120 name?: string;
121 'scaling-criteria': SCALINGCRITERIA[];
122 'scaling-type'?: string;
123 'threshold-time'?: number;
124}
125/** Interface for SCALINGCRITERIA */
126export interface SCALINGCRITERIA {
127 name?: string;
128 'scale-in-relational-operation': string;
129 'scale-in-threshold'?: string;
130 'scale-out-relational-operation'?: string;
131 'scale-out-threshold'?: string;
132 'vnf-monitoring-param-ref'?: string;
133}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530134/** Interface for VDUCONFIG */
135export interface VDUCONFIG {
136 id: string;
137 'config-primitive': CONFIGPRIMITIVE[];
138 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
139}
140/** Interface for CONFIGPRIMITIVE */
141export interface CONFIGPRIMITIVE {
142 name: string;
143}
144/** Interface for INITIALCONFIGPRIMITIVE */
145export interface INITIALCONFIGPRIMITIVE {
146 seq: string;
147 name: string;
148}
149/** Interface for the ext-cpd */
150export interface EXTCPD {
151 id?: string;
152 'int-cpd'?: INTCPD;
153}
154/** Interface for the int-cpd */
155export interface INTCPD {
156 cpd?: string;
157 'vdu-id'?: string;
158}
159/** Interface for IVLD */
160export interface IVLD {
161 id?: string;
162 description?: string;
163}
164/** Interface for SWIMAGEDESCRIPTION */
165export interface SWIMAGEDESCRIPTION {
166 id: string;
167 name: string;
168 version: string;
169}
kumaran.m3b4814a2020-05-01 19:48:54 +0530170/** Interface for VDU */
171export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530172 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530173 description?: string;
174 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530175 'int-cpd'?: VDUINTCPD[];
176 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530177 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530178 'sw-image-desc'?: string;
179 'virtual-compute-desc'?: string;
180 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530181}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530182/** Interface for the vdu int-cpd */
183export interface VDUINTCPD {
184 id: string;
185 'int-virtual-link-desc'?: string;
186 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530187}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530188/** Interface for the vdu int-cpd => VNIR */
189export interface VNIR {
190 name: string;
191 position: number;
192 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530193}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530194/** Interface for the VIRTUALINTERFACE */
195export interface VIRTUALINTERFACE {
196 'type': string;
197}
198/** Interface for monitoring params */
199export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530200 id: string;
201 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530202 'performance-metric'?: string;
203 'collection-period'?: number;
204}
205/** Interface for VNFDATA */
206export interface VNFDATA {
207 vnfd?: VNFD;
208}
209
210/** Interface for VDU InternalCPD */
211export interface InternalCPD {
212 id: string;
213 'int-virtual-link-desc'?: string;
214 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
215}
216
217/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
218export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
219 name: string;
220 position?: number;
221 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530222}
223
224/** Interface for VirutalInterface */
225interface VirtualInterface {
226 'type': string;
227}
228
kumaran.m3b4814a2020-05-01 19:48:54 +0530229/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530230export interface VNFDAdminDetails {
231 created: number;
232 modified: string;
233 onboardingState: string;
234 operationalState: string;
235 projects_read: string[];
236 projects_write: string[];
237 storage: Storage;
238 'type': string;
239 usageState: string;
240 userDefinedData: JSON;
241}
242
243/** Interface for Storage */
244interface Storage {
245 descriptor: string;
246 folder: string;
247 fs: string;
248 path: string;
249 'pkg-dir': string;
250 zipfile: string;
251}
252
253/** Interface for VNFData */
254export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530255 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530256 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530257 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530258 description: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530259 version: string;
260 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530261 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530262 provider?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530263}
264
265/** Interface for the Tick */
266export interface Tick {
267 target: TickPath;
268 source: TickPath;
269 left: boolean;
270 right: boolean;
271}
272
273/** Interface for the Path */
274export interface TickPath {
275 x: number;
276 y: number;
277 id: string;
278 'type'?: string;
279}
280
281/** Interface Nodes Creation */
282export interface COMPOSERNODES {
283 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530284 reflexive: Boolean;
285 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530286 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530287 nodeIndex?: number;
288 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530289 x?: number;
290 y?: number;
291 fx?: number;
292 fy?: number;
293}
294
295/** Interface for the GRAPHDETAILS */
296export interface GRAPHDETAILS {
297 width: number;
298 height: number;
299 nodeHeight: number;
300 nodeWidth: number;
301 textX: number;
302 textY: number;
303 radius: number;
304 distance: number;
305 strength: number;
306 forcex: number;
307 forcey: number;
308 sourcePaddingYes: number;
309 sourcePaddingNo: number;
310 targetPaddingYes: number;
311 targetPaddingNo: number;
312 alphaTarget: number;
313 imageX: number;
314 imageY: number;
315 shiftKeyCode: number;
316}