blob: 4f76f7ce7bc140ec60d63c68a367a54cdfe66e41 [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;
86}
87/** Interface for INSTANTIATIONLEVEL */
88export interface INSTANTIATIONLEVEL {
89 id: string;
90 'vdu-level': VDULEVEL[];
91}
92/** Interface for VDULEVEL */
93export interface VDULEVEL {
94 'number-of-instances': number;
95 'vdu-id': string;
96}
97/** Interface for VDULEVEL */
98export interface VDUPROFILE {
99 id: string;
100 name?: string;
101 'min-number-of-instances'?: number;
102 'max-number-of-instances'?: number;
103 'vdu-configuration-id'?: string;
104 'vdu-configuration'?: VDUCONFIG;
105}
106/** Interface for VDUCONFIG */
107export interface VDUCONFIG {
108 id: string;
109 'config-primitive': CONFIGPRIMITIVE[];
110 'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
111}
112/** Interface for CONFIGPRIMITIVE */
113export interface CONFIGPRIMITIVE {
114 name: string;
115}
116/** Interface for INITIALCONFIGPRIMITIVE */
117export interface INITIALCONFIGPRIMITIVE {
118 seq: string;
119 name: string;
120}
121/** Interface for the ext-cpd */
122export interface EXTCPD {
123 id?: string;
124 'int-cpd'?: INTCPD;
125}
126/** Interface for the int-cpd */
127export interface INTCPD {
128 cpd?: string;
129 'vdu-id'?: string;
130}
131/** Interface for IVLD */
132export interface IVLD {
133 id?: string;
134 description?: string;
135}
136/** Interface for SWIMAGEDESCRIPTION */
137export interface SWIMAGEDESCRIPTION {
138 id: string;
139 name: string;
140 version: string;
141}
kumaran.m3b4814a2020-05-01 19:48:54 +0530142/** Interface for VDU */
143export interface VDU {
kumaran.m3b4814a2020-05-01 19:48:54 +0530144 'cloud-init-file'?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530145 description?: string;
146 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530147 'int-cpd'?: VDUINTCPD[];
148 'monitoring-parameter'?: MonitoringParam[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530149 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530150 'sw-image-desc'?: string;
151 'virtual-compute-desc'?: string;
152 'virtual-storage-desc'?: string[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530153}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530154/** Interface for the vdu int-cpd */
155export interface VDUINTCPD {
156 id: string;
157 'int-virtual-link-desc'?: string;
158 'virtual-network-interface-requirement': VNIR[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530159}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530160/** Interface for the vdu int-cpd => VNIR */
161export interface VNIR {
162 name: string;
163 position: number;
164 'virtual-interface': VIRTUALINTERFACE;
kumaran.m3b4814a2020-05-01 19:48:54 +0530165}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530166/** Interface for the VIRTUALINTERFACE */
167export interface VIRTUALINTERFACE {
168 'type': string;
169}
170/** Interface for monitoring params */
171export interface MonitoringParam {
kumaran.m3b4814a2020-05-01 19:48:54 +0530172 id: string;
173 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530174 'performance-metric'?: string;
175 'collection-period'?: number;
176}
177/** Interface for VNFDATA */
178export interface VNFDATA {
179 vnfd?: VNFD;
180}
181
182/** Interface for VDU InternalCPD */
183export interface InternalCPD {
184 id: string;
185 'int-virtual-link-desc'?: string;
186 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
187}
188
189/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
190export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
191 name: string;
192 position?: number;
193 'virtual-interface'?: VirtualInterface;
kumaran.m3b4814a2020-05-01 19:48:54 +0530194}
195
196/** Interface for VirutalInterface */
197interface VirtualInterface {
198 'type': string;
199}
200
kumaran.m3b4814a2020-05-01 19:48:54 +0530201/** Interface for _AdminDetails */
kumaran.m3b4814a2020-05-01 19:48:54 +0530202export interface VNFDAdminDetails {
203 created: number;
204 modified: string;
205 onboardingState: string;
206 operationalState: string;
207 projects_read: string[];
208 projects_write: string[];
209 storage: Storage;
210 'type': string;
211 usageState: string;
212 userDefinedData: JSON;
213}
214
215/** Interface for Storage */
216interface Storage {
217 descriptor: string;
218 folder: string;
219 fs: string;
220 path: string;
221 'pkg-dir': string;
222 zipfile: string;
223}
224
225/** Interface for VNFData */
226export interface VNFData {
Barath Kumar R063a3f12020-12-29 16:35:09 +0530227 identifier?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530228 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530229 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530230 description: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530231 version: string;
232 'type'?: string;
Barath Kumar R79971eb2020-12-21 15:42:23 +0530233 productName?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530234 provider?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530235}
236
237/** Interface for the Tick */
238export interface Tick {
239 target: TickPath;
240 source: TickPath;
241 left: boolean;
242 right: boolean;
243}
244
245/** Interface for the Path */
246export interface TickPath {
247 x: number;
248 y: number;
249 id: string;
250 'type'?: string;
251}
252
253/** Interface Nodes Creation */
254export interface COMPOSERNODES {
255 id: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530256 reflexive: Boolean;
257 'type': string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530258 name?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530259 nodeIndex?: number;
260 selectorId?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530261 x?: number;
262 y?: number;
263 fx?: number;
264 fy?: number;
265}
266
267/** Interface for the GRAPHDETAILS */
268export interface GRAPHDETAILS {
269 width: number;
270 height: number;
271 nodeHeight: number;
272 nodeWidth: number;
273 textX: number;
274 textY: number;
275 radius: number;
276 distance: number;
277 strength: number;
278 forcex: number;
279 forcey: number;
280 sourcePaddingYes: number;
281 sourcePaddingNo: number;
282 targetPaddingYes: number;
283 targetPaddingNo: number;
284 alphaTarget: number;
285 imageX: number;
286 imageY: number;
287 shiftKeyCode: number;
288}