blob: 339dd02b40d668428eb7bedd4eedf349d9e62f31 [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 */
Barath Kumar R063a3f12020-12-29 16:35:09 +053021// tslint:disable: completed-docs
kumaran.m3b4814a2020-05-01 19:48:54 +053022/** Interface for Project */
23export interface ProjectModel {
24 project_id: string;
25 project?: string;
26 project_name?: string;
27 expires: number;
28 _id: string;
29 id: string;
30 issued_at: number;
31 remote_port: number;
32 username: string;
33 remote_host: string;
34 admin: boolean;
SANDHYA.JSa9816552022-04-12 09:07:08 +053035 message?: string;
36 user_id?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053037}
38
39/** Interface for ProjectDetails */
40export interface ProjectDetails {
41 _admin: AdminDetails;
42 name: string;
43 _id: string;
44}
45
46/** Interface for AdminDetails */
47interface AdminDetails {
48 modified: string;
49 created: string;
50}
51
Barath Kumar R063a3f12020-12-29 16:35:09 +053052/** Interface for VNFD Details */
53export interface VNFD {
kumaran.m3b4814a2020-05-01 19:48:54 +053054 description?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053055 df?: DF[];
56 'ext-cpd'?: EXTCPD[];
kumaran.m3b4814a2020-05-01 19:48:54 +053057 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053058 'int-virtual-link-desc'?: IVLD[];
59 'mgmt-cp'?: string;
60 onboardingState?: string;
61 operationalState?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +053062 'product-name'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053063 provider?: string;
64 'sw-image-desc'?: SWIMAGEDESCRIPTION[];
65 usageState?: string;
66 vdu?: VDU[];
67 version?: string;
SANDHYA.JS99144582022-04-27 17:22:35 +053068 'software-version'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053069 'virtual-compute-desc'?: string;
70 'virtual-storage-desc'?: string[];
71 _admin?: VNFDAdminDetails;
72 _id?: string;
73 _links?: string;
74 'vnf-configuration'?: VNFCONFIG[];
75 kdu?: [];
kumaran.m3b4814a2020-05-01 19:48:54 +053076}
Barath Kumar R063a3f12020-12-29 16:35:09 +053077/** Interface for DF */
78export interface VNFCONFIG {
79 id: string;
80 'config-primitive'?: CONFIGPRIMITIVE[];
81 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053082}
Barath Kumar R063a3f12020-12-29 16:35:09 +053083/** Interface for DF */
84export interface DF {
85 id: string;
86 'instantiation-level'?: INSTANTIATIONLEVEL[];
87 'vdu-profile'?: VDUPROFILE[];
88 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +053089 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +053090}
91/** Interface for INSTANTIATIONLEVEL */
92export interface INSTANTIATIONLEVEL {
93 id: string;
94 'vdu-level': VDULEVEL[];
95}
96/** Interface for VDULEVEL */
97export interface VDULEVEL {
98 'number-of-instances': number;
99 'vdu-id': string;
100}
101/** Interface for VDULEVEL */
102export interface VDUPROFILE {
103 id: string;
104 name?: string;
105 'min-number-of-instances'?: number;
106 'max-number-of-instances'?: number;
107 'vdu-configuration-id'?: string;
108 'vdu-configuration'?: VDUCONFIG;
109}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530110/** Interface for SCALING */
111export interface SCALING {
112 'aspect-delta-details'?: object;
113 id: string;
114 name?: string;
115 'max-scale-level'?: number;
116 'scaling-policy'?: SCALINGPOLICY[];
117}
118/** Interface for SCALINGPOLICY */
119export interface SCALINGPOLICY {
120 'cooldown-time': number;
121 name?: string;
122 'scaling-criteria': SCALINGCRITERIA[];
123 'scaling-type'?: string;
124 'threshold-time'?: number;
125}
126/** Interface for SCALINGCRITERIA */
127export interface SCALINGCRITERIA {
128 name?: string;
129 'scale-in-relational-operation': string;
130 'scale-in-threshold'?: string;
131 'scale-out-relational-operation'?: string;
132 'scale-out-threshold'?: string;
133 'vnf-monitoring-param-ref'?: string;
134}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530135/** Interface for VDUCONFIG */
136export interface VDUCONFIG {
137 id: string;
138 'config-primitive': CONFIGPRIMITIVE[];
139 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
140}
141/** Interface for CONFIGPRIMITIVE */
142export interface CONFIGPRIMITIVE {
143 name: string;
144}
145/** Interface for INITIALCONFIGPRIMITIVE */
146export interface INITIALCONFIGPRIMITIVE {
147 seq: string;
148 name: string;
149}
150/** Interface for the ext-cpd */
151export interface EXTCPD {
152 id?: string;
153 'int-cpd'?: INTCPD;
154}
155/** Interface for the int-cpd */
156export interface INTCPD {
157 cpd?: string;
158 'vdu-id'?: string;
159}
160/** Interface for IVLD */
161export interface IVLD {
162 id?: string;
163 description?: string;
164}
165/** Interface for SWIMAGEDESCRIPTION */
166export interface SWIMAGEDESCRIPTION {
167 id: string;
168 name: string;
169 version: string;
170}
kumaran.m3b4814a2020-05-01 19:48:54 +0530171/** Interface for VDU */
172export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530173 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530174 description?: string;
175 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530176 'int-cpd'?: VDUINTCPD[];
177 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530178 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530179 'sw-image-desc'?: string;
180 'virtual-compute-desc'?: string;
181 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530182}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530183/** Interface for the vdu int-cpd */
184export interface VDUINTCPD {
185 id: string;
186 'int-virtual-link-desc'?: string;
187 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530188}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530189/** Interface for the vdu int-cpd => VNIR */
190export interface VNIR {
191 name: string;
192 position: number;
193 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530194}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530195/** Interface for the VIRTUALINTERFACE */
196export interface VIRTUALINTERFACE {
197 'type': string;
198}
199/** Interface for monitoring params */
200export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530201 id: string;
202 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530203 'performance-metric'?: string;
204 'collection-period'?: number;
205}
206/** Interface for VNFDATA */
207export interface VNFDATA {
208 vnfd?: VNFD;
209}
210
211/** Interface for VDU InternalCPD */
212export interface InternalCPD {
213 id: string;
214 'int-virtual-link-desc'?: string;
215 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
216}
217
218/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
219export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
220 name: string;
221 position?: number;
222 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530223}
224
225/** Interface for VirutalInterface */
226interface VirtualInterface {
227 'type': string;
228}
229
kumaran.m3b4814a2020-05-01 19:48:54 +0530230/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530231export interface VNFDAdminDetails {
232 created: number;
233 modified: string;
234 onboardingState: string;
235 operationalState: string;
236 projects_read: string[];
237 projects_write: string[];
238 storage: Storage;
239 'type': string;
240 usageState: string;
241 userDefinedData: JSON;
242}
243
244/** Interface for Storage */
245interface Storage {
246 descriptor: string;
247 folder: string;
248 fs: string;
249 path: string;
250 'pkg-dir': string;
251 zipfile: string;
252}
253
254/** Interface for VNFData */
255export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530256 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530257 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530258 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530259 description: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530260 version: string;
261 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530262 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530263 provider?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530264}
265
266/** Interface for the Tick */
267export interface Tick {
268 target: TickPath;
269 source: TickPath;
270 left: boolean;
271 right: boolean;
272}
273
274/** Interface for the Path */
275export interface TickPath {
276 x: number;
277 y: number;
278 id: string;
279 'type'?: string;
280}
281
282/** Interface Nodes Creation */
283export interface COMPOSERNODES {
284 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530285 reflexive: Boolean;
286 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530287 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530288 nodeIndex?: number;
289 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530290 x?: number;
291 y?: number;
292 fx?: number;
293 fy?: number;
294}
295
296/** Interface for the GRAPHDETAILS */
297export interface GRAPHDETAILS {
298 width: number;
299 height: number;
300 nodeHeight: number;
301 nodeWidth: number;
302 textX: number;
303 textY: number;
304 radius: number;
305 distance: number;
306 strength: number;
307 forcex: number;
308 forcey: number;
309 sourcePaddingYes: number;
310 sourcePaddingNo: number;
311 targetPaddingYes: number;
312 targetPaddingNo: number;
313 alphaTarget: number;
314 imageX: number;
315 imageY: number;
316 shiftKeyCode: number;
317}