blob: 530ba4877fb6d8442605b98630b907534f6581e4 [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;
41}
42
43/** Interface for Roles */
44export interface RolesData {
45 name?: string;
46 id?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053047}
48
49/** Interface for ProjectDetails */
50export interface ProjectDetails {
51 _admin: AdminDetails;
52 name: string;
53 _id: string;
54}
55
56/** Interface for AdminDetails */
57interface AdminDetails {
58 modified: string;
59 created: string;
60}
61
Barath Kumar R063a3f12020-12-29 16:35:09 +053062/** Interface for VNFD Details */
63export interface VNFD {
kumaran.m3b4814a2020-05-01 19:48:54 +053064 description?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053065 df?: DF[];
66 'ext-cpd'?: EXTCPD[];
kumaran.m3b4814a2020-05-01 19:48:54 +053067 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053068 'int-virtual-link-desc'?: IVLD[];
69 'mgmt-cp'?: string;
70 onboardingState?: string;
71 operationalState?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +053072 'product-name'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053073 provider?: string;
74 'sw-image-desc'?: SWIMAGEDESCRIPTION[];
75 usageState?: string;
76 vdu?: VDU[];
77 version?: string;
SANDHYA.JS99144582022-04-27 17:22:35 +053078 'software-version'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053079 'virtual-compute-desc'?: string;
80 'virtual-storage-desc'?: string[];
81 _admin?: VNFDAdminDetails;
82 _id?: string;
83 _links?: string;
84 'vnf-configuration'?: VNFCONFIG[];
85 kdu?: [];
kumaran.m3b4814a2020-05-01 19:48:54 +053086}
Barath Kumar R063a3f12020-12-29 16:35:09 +053087/** Interface for DF */
88export interface VNFCONFIG {
89 id: string;
90 'config-primitive'?: CONFIGPRIMITIVE[];
91 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053092}
Barath Kumar R063a3f12020-12-29 16:35:09 +053093/** Interface for DF */
94export interface DF {
95 id: string;
96 'instantiation-level'?: INSTANTIATIONLEVEL[];
97 'vdu-profile'?: VDUPROFILE[];
98 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +053099 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +0530100}
101/** Interface for INSTANTIATIONLEVEL */
102export interface INSTANTIATIONLEVEL {
103 id: string;
104 'vdu-level': VDULEVEL[];
105}
106/** Interface for VDULEVEL */
107export interface VDULEVEL {
108 'number-of-instances': number;
109 'vdu-id': string;
110}
111/** Interface for VDULEVEL */
112export interface VDUPROFILE {
113 id: string;
114 name?: string;
115 'min-number-of-instances'?: number;
116 'max-number-of-instances'?: number;
117 'vdu-configuration-id'?: string;
118 'vdu-configuration'?: VDUCONFIG;
119}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530120/** Interface for SCALING */
121export interface SCALING {
122 'aspect-delta-details'?: object;
123 id: string;
124 name?: string;
125 'max-scale-level'?: number;
126 'scaling-policy'?: SCALINGPOLICY[];
127}
128/** Interface for SCALINGPOLICY */
129export interface SCALINGPOLICY {
130 'cooldown-time': number;
131 name?: string;
132 'scaling-criteria': SCALINGCRITERIA[];
133 'scaling-type'?: string;
134 'threshold-time'?: number;
135}
136/** Interface for SCALINGCRITERIA */
137export interface SCALINGCRITERIA {
138 name?: string;
139 'scale-in-relational-operation': string;
140 'scale-in-threshold'?: string;
141 'scale-out-relational-operation'?: string;
142 'scale-out-threshold'?: string;
143 'vnf-monitoring-param-ref'?: string;
144}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530145/** Interface for VDUCONFIG */
146export interface VDUCONFIG {
147 id: string;
148 'config-primitive': CONFIGPRIMITIVE[];
149 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
150}
151/** Interface for CONFIGPRIMITIVE */
152export interface CONFIGPRIMITIVE {
153 name: string;
154}
155/** Interface for INITIALCONFIGPRIMITIVE */
156export interface INITIALCONFIGPRIMITIVE {
157 seq: string;
158 name: string;
159}
160/** Interface for the ext-cpd */
161export interface EXTCPD {
162 id?: string;
163 'int-cpd'?: INTCPD;
164}
165/** Interface for the int-cpd */
166export interface INTCPD {
167 cpd?: string;
168 'vdu-id'?: string;
169}
170/** Interface for IVLD */
171export interface IVLD {
172 id?: string;
173 description?: string;
174}
175/** Interface for SWIMAGEDESCRIPTION */
176export interface SWIMAGEDESCRIPTION {
177 id: string;
178 name: string;
179 version: string;
180}
kumaran.m3b4814a2020-05-01 19:48:54 +0530181/** Interface for VDU */
182export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530183 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530184 description?: string;
185 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530186 'int-cpd'?: VDUINTCPD[];
187 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530188 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530189 'sw-image-desc'?: string;
190 'virtual-compute-desc'?: string;
191 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530192}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530193/** Interface for the vdu int-cpd */
194export interface VDUINTCPD {
195 id: string;
196 'int-virtual-link-desc'?: string;
197 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530198}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530199/** Interface for the vdu int-cpd => VNIR */
200export interface VNIR {
201 name: string;
202 position: number;
203 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530204}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530205/** Interface for the VIRTUALINTERFACE */
206export interface VIRTUALINTERFACE {
207 'type': string;
208}
209/** Interface for monitoring params */
210export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530211 id: string;
212 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530213 'performance-metric'?: string;
214 'collection-period'?: number;
215}
216/** Interface for VNFDATA */
217export interface VNFDATA {
218 vnfd?: VNFD;
219}
220
221/** Interface for VDU InternalCPD */
222export interface InternalCPD {
223 id: string;
224 'int-virtual-link-desc'?: string;
225 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
226}
227
228/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
229export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
230 name: string;
231 position?: number;
232 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530233}
234
235/** Interface for VirutalInterface */
236interface VirtualInterface {
237 'type': string;
238}
239
kumaran.m3b4814a2020-05-01 19:48:54 +0530240/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530241export interface VNFDAdminDetails {
242 created: number;
243 modified: string;
244 onboardingState: string;
245 operationalState: string;
246 projects_read: string[];
247 projects_write: string[];
248 storage: Storage;
249 'type': string;
250 usageState: string;
251 userDefinedData: JSON;
252}
253
254/** Interface for Storage */
255interface Storage {
256 descriptor: string;
257 folder: string;
258 fs: string;
259 path: string;
260 'pkg-dir': string;
261 zipfile: string;
262}
263
264/** Interface for VNFData */
265export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530266 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530267 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530268 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530269 description: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530270 version: string;
271 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530272 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530273 provider?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530274}
275
276/** Interface for the Tick */
277export interface Tick {
278 target: TickPath;
279 source: TickPath;
280 left: boolean;
281 right: boolean;
282}
283
284/** Interface for the Path */
285export interface TickPath {
286 x: number;
287 y: number;
288 id: string;
289 'type'?: string;
290}
291
292/** Interface Nodes Creation */
293export interface COMPOSERNODES {
294 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530295 reflexive: Boolean;
296 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530297 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530298 nodeIndex?: number;
299 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530300 x?: number;
301 y?: number;
302 fx?: number;
303 fy?: number;
304}
305
306/** Interface for the GRAPHDETAILS */
307export interface GRAPHDETAILS {
308 width: number;
309 height: number;
310 nodeHeight: number;
311 nodeWidth: number;
312 textX: number;
313 textY: number;
314 radius: number;
315 distance: number;
316 strength: number;
317 forcex: number;
318 forcey: number;
319 sourcePaddingYes: number;
320 sourcePaddingNo: number;
321 targetPaddingYes: number;
322 targetPaddingNo: number;
323 alphaTarget: number;
324 imageX: number;
325 imageY: number;
326 shiftKeyCode: number;
327}