blob: 907243139c9cf182bb39d0938a9a29b295f1c0ec [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?: [];
kumaran.m3b4814a2020-05-01 19:48:54 +053087}
Barath Kumar R063a3f12020-12-29 16:35:09 +053088/** Interface for DF */
89export interface VNFCONFIG {
90 id: string;
91 'config-primitive'?: CONFIGPRIMITIVE[];
92 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053093}
Barath Kumar R063a3f12020-12-29 16:35:09 +053094/** Interface for DF */
95export interface DF {
96 id: string;
97 'instantiation-level'?: INSTANTIATIONLEVEL[];
98 'vdu-profile'?: VDUPROFILE[];
99 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530100 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +0530101}
102/** Interface for INSTANTIATIONLEVEL */
103export interface INSTANTIATIONLEVEL {
104 id: string;
105 'vdu-level': VDULEVEL[];
106}
107/** Interface for VDULEVEL */
108export interface VDULEVEL {
109 'number-of-instances': number;
110 'vdu-id': string;
111}
112/** Interface for VDULEVEL */
113export 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}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530121/** Interface for SCALING */
122export 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 */
130export 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 */
138export 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}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530146/** Interface for VDUCONFIG */
147export interface VDUCONFIG {
148 id: string;
149 'config-primitive': CONFIGPRIMITIVE[];
150 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
151}
152/** Interface for CONFIGPRIMITIVE */
153export interface CONFIGPRIMITIVE {
154 name: string;
155}
156/** Interface for INITIALCONFIGPRIMITIVE */
157export interface INITIALCONFIGPRIMITIVE {
158 seq: string;
159 name: string;
160}
161/** Interface for the ext-cpd */
162export interface EXTCPD {
163 id?: string;
164 'int-cpd'?: INTCPD;
165}
166/** Interface for the int-cpd */
167export interface INTCPD {
168 cpd?: string;
169 'vdu-id'?: string;
170}
171/** Interface for IVLD */
172export interface IVLD {
173 id?: string;
174 description?: string;
175}
176/** Interface for SWIMAGEDESCRIPTION */
177export interface SWIMAGEDESCRIPTION {
178 id: string;
179 name: string;
180 version: string;
181}
kumaran.m3b4814a2020-05-01 19:48:54 +0530182/** Interface for VDU */
183export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530184 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530185 description?: string;
186 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530187 'int-cpd'?: VDUINTCPD[];
188 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530189 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530190 'sw-image-desc'?: string;
191 'virtual-compute-desc'?: string;
192 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530193}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530194/** Interface for the vdu int-cpd */
195export interface VDUINTCPD {
196 id: string;
197 'int-virtual-link-desc'?: string;
198 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530199}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530200/** Interface for the vdu int-cpd => VNIR */
201export interface VNIR {
202 name: string;
203 position: number;
204 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530205}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530206/** Interface for the VIRTUALINTERFACE */
207export interface VIRTUALINTERFACE {
208 'type': string;
209}
210/** Interface for monitoring params */
211export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530212 id: string;
213 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530214 'performance-metric'?: string;
215 'collection-period'?: number;
216}
217/** Interface for VNFDATA */
218export interface VNFDATA {
219 vnfd?: VNFD;
220}
221
222/** Interface for VDU InternalCPD */
223export interface InternalCPD {
224 id: string;
225 'int-virtual-link-desc'?: string;
226 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
227}
228
229/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
230export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
231 name: string;
232 position?: number;
233 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530234}
235
236/** Interface for VirutalInterface */
237interface VirtualInterface {
238 'type': string;
239}
240
kumaran.m3b4814a2020-05-01 19:48:54 +0530241/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530242export 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 */
256interface 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 */
266export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530267 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530268 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530269 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530270 description: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530271 version: string;
272 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530273 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530274 provider?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530275}
276
277/** Interface for the Tick */
278export interface Tick {
279 target: TickPath;
280 source: TickPath;
281 left: boolean;
282 right: boolean;
283}
284
285/** Interface for the Path */
286export interface TickPath {
287 x: number;
288 y: number;
289 id: string;
290 'type'?: string;
291}
292
293/** Interface Nodes Creation */
294export interface COMPOSERNODES {
295 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530296 reflexive: Boolean;
297 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530298 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530299 nodeIndex?: number;
300 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530301 x?: number;
302 y?: number;
303 fx?: number;
304 fy?: number;
305}
306
307/** Interface for the GRAPHDETAILS */
308export 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}