339dd02b40d668428eb7bedd4eedf349d9e62f31
[osm/NG-UI.git] / src / models / VNFDModel.ts
1 /*
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  */
21 // tslint:disable: completed-docs
22 /** Interface for Project */
23 export 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     message?: string;
36     user_id?: string;
37 }
38
39 /** Interface for ProjectDetails */
40 export interface ProjectDetails {
41     _admin: AdminDetails;
42     name: string;
43     _id: string;
44 }
45
46 /** Interface for AdminDetails */
47 interface AdminDetails {
48     modified: string;
49     created: string;
50 }
51
52 /** Interface for VNFD Details */
53 export interface VNFD {
54     description?: string;
55     df?: DF[];
56     'ext-cpd'?: EXTCPD[];
57     id: string;
58     'int-virtual-link-desc'?: IVLD[];
59     'mgmt-cp'?: string;
60     onboardingState?: string;
61     operationalState?: string;
62     'product-name'?: string;
63     provider?: string;
64     'sw-image-desc'?: SWIMAGEDESCRIPTION[];
65     usageState?: string;
66     vdu?: VDU[];
67     version?: string;
68     'software-version'?: string;
69     'virtual-compute-desc'?: string;
70     'virtual-storage-desc'?: string[];
71     _admin?: VNFDAdminDetails;
72     _id?: string;
73     _links?: string;
74     'vnf-configuration'?: VNFCONFIG[];
75     kdu?: [];
76 }
77 /** Interface for DF */
78 export interface VNFCONFIG {
79     id: string;
80     'config-primitive'?: CONFIGPRIMITIVE[];
81     'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
82 }
83 /** Interface for DF */
84 export interface DF {
85     id: string;
86     'instantiation-level'?: INSTANTIATIONLEVEL[];
87     'vdu-profile'?: VDUPROFILE[];
88     'vnf-configuration-id'?: string;
89     'scaling-aspect'?: SCALING[];
90 }
91 /** Interface for INSTANTIATIONLEVEL */
92 export interface INSTANTIATIONLEVEL {
93     id: string;
94     'vdu-level': VDULEVEL[];
95 }
96 /** Interface for VDULEVEL */
97 export interface VDULEVEL {
98     'number-of-instances': number;
99     'vdu-id': string;
100 }
101 /** Interface for VDULEVEL */
102 export 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 }
110 /** Interface for SCALING */
111 export 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 */
119 export 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 */
127 export 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 }
135 /** Interface for VDUCONFIG */
136 export interface VDUCONFIG {
137     id: string;
138     'config-primitive': CONFIGPRIMITIVE[];
139     'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
140 }
141 /** Interface for CONFIGPRIMITIVE */
142 export interface CONFIGPRIMITIVE {
143     name: string;
144 }
145 /** Interface for INITIALCONFIGPRIMITIVE */
146 export interface INITIALCONFIGPRIMITIVE {
147     seq: string;
148     name: string;
149 }
150 /** Interface for the ext-cpd */
151 export interface EXTCPD {
152     id?: string;
153     'int-cpd'?: INTCPD;
154 }
155 /** Interface for the int-cpd */
156 export interface INTCPD {
157     cpd?: string;
158     'vdu-id'?: string;
159 }
160 /** Interface for IVLD */
161 export interface IVLD {
162     id?: string;
163     description?: string;
164 }
165 /** Interface for SWIMAGEDESCRIPTION */
166 export interface SWIMAGEDESCRIPTION {
167     id: string;
168     name: string;
169     version: string;
170 }
171 /** Interface for VDU */
172 export interface VDU {
173     'cloud-init-file'?: string;
174     description?: string;
175     id?: string;
176     'int-cpd'?: VDUINTCPD[];
177     'monitoring-parameter'?: MonitoringParam[];
178     name?: string;
179     'sw-image-desc'?: string;
180     'virtual-compute-desc'?: string;
181     'virtual-storage-desc'?: string[];
182 }
183 /** Interface for the vdu int-cpd */
184 export interface VDUINTCPD {
185     id: string;
186     'int-virtual-link-desc'?: string;
187     'virtual-network-interface-requirement': VNIR[];
188 }
189 /** Interface for the vdu int-cpd => VNIR */
190 export interface VNIR {
191     name: string;
192     position: number;
193     'virtual-interface': VIRTUALINTERFACE;
194 }
195 /** Interface for the VIRTUALINTERFACE */
196 export interface VIRTUALINTERFACE {
197     'type': string;
198 }
199 /** Interface for monitoring params */
200 export interface MonitoringParam {
201     id: string;
202     name?: string;
203     'performance-metric'?: string;
204     'collection-period'?: number;
205 }
206 /** Interface for VNFDATA */
207 export interface VNFDATA {
208     vnfd?: VNFD;
209 }
210
211 /** Interface for VDU InternalCPD */
212 export interface InternalCPD {
213     id: string;
214     'int-virtual-link-desc'?: string;
215     'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
216 }
217
218 /** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
219 export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
220     name: string;
221     position?: number;
222     'virtual-interface'?: VirtualInterface;
223 }
224
225 /** Interface for VirutalInterface */
226 interface VirtualInterface {
227     'type': string;
228 }
229
230 /** Interface for _AdminDetails */
231 export 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 */
245 interface 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 */
255 export interface VNFData {
256     identifier?: string;
257     id?: string;
258     name?: string;
259     description: string;
260     version: string;
261     'type'?: string;
262     productName?: string;
263     provider?: string;
264 }
265
266 /** Interface for the Tick */
267 export interface Tick {
268     target: TickPath;
269     source: TickPath;
270     left: boolean;
271     right: boolean;
272 }
273
274 /** Interface for the Path */
275 export interface TickPath {
276     x: number;
277     y: number;
278     id: string;
279     'type'?: string;
280 }
281
282 /** Interface Nodes Creation */
283 export interface COMPOSERNODES {
284     id: string;
285     reflexive: Boolean;
286     'type': string;
287     name?: string;
288     nodeIndex?: number;
289     selectorId?: string;
290     x?: number;
291     y?: number;
292     fx?: number;
293     fy?: number;
294 }
295
296 /** Interface for the GRAPHDETAILS */
297 export 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 }