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