blob: 7029ace9eb84c65acff7c83271e634c907ad56e7 [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;
35}
36
37/** Interface for ProjectDetails */
38export interface ProjectDetails {
39 _admin: AdminDetails;
40 name: string;
41 _id: string;
42}
43
44/** Interface for AdminDetails */
45interface AdminDetails {
46 modified: string;
47 created: string;
48}
49
Barath Kumar R063a3f12020-12-29 16:35:09 +053050/** Interface for VNFD Details */
51export interface VNFD {
kumaran.m3b4814a2020-05-01 19:48:54 +053052 description?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053053 df?: DF[];
54 'ext-cpd'?: EXTCPD[];
kumaran.m3b4814a2020-05-01 19:48:54 +053055 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053056 'int-virtual-link-desc'?: IVLD[];
57 'mgmt-cp'?: string;
58 onboardingState?: string;
59 operationalState?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +053060 'product-name'?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +053061 provider?: string;
62 'sw-image-desc'?: SWIMAGEDESCRIPTION[];
63 usageState?: string;
64 vdu?: VDU[];
65 version?: string;
66 'virtual-compute-desc'?: string;
67 'virtual-storage-desc'?: string[];
68 _admin?: VNFDAdminDetails;
69 _id?: string;
70 _links?: string;
71 'vnf-configuration'?: VNFCONFIG[];
72 kdu?: [];
kumaran.m3b4814a2020-05-01 19:48:54 +053073}
Barath Kumar R063a3f12020-12-29 16:35:09 +053074/** Interface for DF */
75export interface VNFCONFIG {
76 id: string;
77 'config-primitive'?: CONFIGPRIMITIVE[];
78 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
kumaran.m3b4814a2020-05-01 19:48:54 +053079}
Barath Kumar R063a3f12020-12-29 16:35:09 +053080/** Interface for DF */
81export interface DF {
82 id: string;
83 'instantiation-level'?: INSTANTIATIONLEVEL[];
84 'vdu-profile'?: VDUPROFILE[];
85 'vnf-configuration-id'?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +053086 'scaling-aspect'?: SCALING[];
Barath Kumar R063a3f12020-12-29 16:35:09 +053087}
88/** Interface for INSTANTIATIONLEVEL */
89export interface INSTANTIATIONLEVEL {
90 id: string;
91 'vdu-level': VDULEVEL[];
92}
93/** Interface for VDULEVEL */
94export interface VDULEVEL {
95 'number-of-instances': number;
96 'vdu-id': string;
97}
98/** Interface for VDULEVEL */
99export interface VDUPROFILE {
100 id: string;
101 name?: string;
102 'min-number-of-instances'?: number;
103 'max-number-of-instances'?: number;
104 'vdu-configuration-id'?: string;
105 'vdu-configuration'?: VDUCONFIG;
106}
Barath Kumar R07698ab2021-03-30 11:50:42 +0530107/** Interface for SCALING */
108export interface SCALING {
109 'aspect-delta-details'?: object;
110 id: string;
111 name?: string;
112 'max-scale-level'?: number;
113 'scaling-policy'?: SCALINGPOLICY[];
114}
115/** Interface for SCALINGPOLICY */
116export interface SCALINGPOLICY {
117 'cooldown-time': number;
118 name?: string;
119 'scaling-criteria': SCALINGCRITERIA[];
120 'scaling-type'?: string;
121 'threshold-time'?: number;
122}
123/** Interface for SCALINGCRITERIA */
124export interface SCALINGCRITERIA {
125 name?: string;
126 'scale-in-relational-operation': string;
127 'scale-in-threshold'?: string;
128 'scale-out-relational-operation'?: string;
129 'scale-out-threshold'?: string;
130 'vnf-monitoring-param-ref'?: string;
131}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530132/** Interface for VDUCONFIG */
133export interface VDUCONFIG {
134 id: string;
135 'config-primitive': CONFIGPRIMITIVE[];
136 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
137}
138/** Interface for CONFIGPRIMITIVE */
139export interface CONFIGPRIMITIVE {
140 name: string;
141}
142/** Interface for INITIALCONFIGPRIMITIVE */
143export interface INITIALCONFIGPRIMITIVE {
144 seq: string;
145 name: string;
146}
147/** Interface for the ext-cpd */
148export interface EXTCPD {
149 id?: string;
150 'int-cpd'?: INTCPD;
151}
152/** Interface for the int-cpd */
153export interface INTCPD {
154 cpd?: string;
155 'vdu-id'?: string;
156}
157/** Interface for IVLD */
158export interface IVLD {
159 id?: string;
160 description?: string;
161}
162/** Interface for SWIMAGEDESCRIPTION */
163export interface SWIMAGEDESCRIPTION {
164 id: string;
165 name: string;
166 version: string;
167}
kumaran.m3b4814a2020-05-01 19:48:54 +0530168/** Interface for VDU */
169export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530170 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530171 description?: string;
172 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530173 'int-cpd'?: VDUINTCPD[];
174 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530175 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530176 'sw-image-desc'?: string;
177 'virtual-compute-desc'?: string;
178 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530179}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530180/** Interface for the vdu int-cpd */
181export interface VDUINTCPD {
182 id: string;
183 'int-virtual-link-desc'?: string;
184 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530185}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530186/** Interface for the vdu int-cpd => VNIR */
187export interface VNIR {
188 name: string;
189 position: number;
190 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530191}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530192/** Interface for the VIRTUALINTERFACE */
193export interface VIRTUALINTERFACE {
194 'type': string;
195}
196/** Interface for monitoring params */
197export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530198 id: string;
199 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530200 'performance-metric'?: string;
201 'collection-period'?: number;
202}
203/** Interface for VNFDATA */
204export interface VNFDATA {
205 vnfd?: VNFD;
206}
207
208/** Interface for VDU InternalCPD */
209export interface InternalCPD {
210 id: string;
211 'int-virtual-link-desc'?: string;
212 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
213}
214
215/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
216export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
217 name: string;
218 position?: number;
219 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530220}
221
222/** Interface for VirutalInterface */
223interface VirtualInterface {
224 'type': string;
225}
226
kumaran.m3b4814a2020-05-01 19:48:54 +0530227/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530228export interface VNFDAdminDetails {
229 created: number;
230 modified: string;
231 onboardingState: string;
232 operationalState: string;
233 projects_read: string[];
234 projects_write: string[];
235 storage: Storage;
236 'type': string;
237 usageState: string;
238 userDefinedData: JSON;
239}
240
241/** Interface for Storage */
242interface Storage {
243 descriptor: string;
244 folder: string;
245 fs: string;
246 path: string;
247 'pkg-dir': string;
248 zipfile: string;
249}
250
251/** Interface for VNFData */
252export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530253 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530254 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530255 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530256 description: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530257 version: string;
258 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530259 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530260 provider?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530261}
262
263/** Interface for the Tick */
264export interface Tick {
265 target: TickPath;
266 source: TickPath;
267 left: boolean;
268 right: boolean;
269}
270
271/** Interface for the Path */
272export interface TickPath {
273 x: number;
274 y: number;
275 id: string;
276 'type'?: string;
277}
278
279/** Interface Nodes Creation */
280export interface COMPOSERNODES {
281 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530282 reflexive: Boolean;
283 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530284 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530285 nodeIndex?: number;
286 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530287 x?: number;
288 y?: number;
289 fx?: number;
290 fy?: number;
291}
292
293/** Interface for the GRAPHDETAILS */
294export interface GRAPHDETAILS {
295 width: number;
296 height: number;
297 nodeHeight: number;
298 nodeWidth: number;
299 textX: number;
300 textY: number;
301 radius: number;
302 distance: number;
303 strength: number;
304 forcex: number;
305 forcey: number;
306 sourcePaddingYes: number;
307 sourcePaddingNo: number;
308 targetPaddingYes: number;
309 targetPaddingNo: number;
310 alphaTarget: number;
311 imageX: number;
312 imageY: number;
313 shiftKeyCode: number;
314}