4f76f7ce7bc140ec60d63c68a367a54cdfe66e41
[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 }
87 /** Interface for INSTANTIATIONLEVEL */
88 export interface INSTANTIATIONLEVEL {
89     id: string;
90     'vdu-level': VDULEVEL[];
91 }
92 /** Interface for VDULEVEL */
93 export interface VDULEVEL {
94     'number-of-instances': number;
95     'vdu-id': string;
96 }
97 /** Interface for VDULEVEL */
98 export 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 */
107 export interface VDUCONFIG {
108     id: string;
109     'config-primitive': CONFIGPRIMITIVE[];
110     'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
111 }
112 /** Interface for CONFIGPRIMITIVE */
113 export interface CONFIGPRIMITIVE {
114     name: string;
115 }
116 /** Interface for INITIALCONFIGPRIMITIVE */
117 export interface INITIALCONFIGPRIMITIVE {
118     seq: string;
119     name: string;
120 }
121 /** Interface for the ext-cpd */
122 export interface EXTCPD {
123     id?: string;
124     'int-cpd'?: INTCPD;
125 }
126 /** Interface for the int-cpd */
127 export interface INTCPD {
128     cpd?: string;
129     'vdu-id'?: string;
130 }
131 /** Interface for IVLD */
132 export interface IVLD {
133     id?: string;
134     description?: string;
135 }
136 /** Interface for SWIMAGEDESCRIPTION */
137 export interface SWIMAGEDESCRIPTION {
138     id: string;
139     name: string;
140     version: string;
141 }
142 /** Interface for VDU */
143 export interface VDU {
144     'cloud-init-file'?: string;
145     description?: string;
146     id?: string;
147     'int-cpd'?: VDUINTCPD[];
148     'monitoring-parameter'?: MonitoringParam[];
149     name?: string;
150     'sw-image-desc'?: string;
151     'virtual-compute-desc'?: string;
152     'virtual-storage-desc'?: string[];
153 }
154 /** Interface for the vdu int-cpd */
155 export interface VDUINTCPD {
156     id: string;
157     'int-virtual-link-desc'?: string;
158     'virtual-network-interface-requirement': VNIR[];
159 }
160 /** Interface for the vdu int-cpd => VNIR */
161 export interface VNIR {
162     name: string;
163     position: number;
164     'virtual-interface': VIRTUALINTERFACE;
165 }
166 /** Interface for the VIRTUALINTERFACE */
167 export interface VIRTUALINTERFACE {
168     'type': string;
169 }
170 /** Interface for monitoring params */
171 export interface MonitoringParam {
172     id: string;
173     name?: string;
174     'performance-metric'?: string;
175     'collection-period'?: number;
176 }
177 /** Interface for VNFDATA */
178 export interface VNFDATA {
179     vnfd?: VNFD;
180 }
181
182 /** Interface for VDU InternalCPD */
183 export interface InternalCPD {
184     id: string;
185     'int-virtual-link-desc'?: string;
186     'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
187 }
188
189 /** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
190 export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
191     name: string;
192     position?: number;
193     'virtual-interface'?: VirtualInterface;
194 }
195
196 /** Interface for VirutalInterface */
197 interface VirtualInterface {
198     'type': string;
199 }
200
201 /** Interface for _AdminDetails */
202 export 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 */
216 interface 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 */
226 export interface VNFData {
227     identifier?: string;
228     id?: string;
229     name?: string;
230     description: string;
231     version: string;
232     'type'?: string;
233     productName?: string;
234     provider?: string;
235 }
236
237 /** Interface for the Tick */
238 export interface Tick {
239     target: TickPath;
240     source: TickPath;
241     left: boolean;
242     right: boolean;
243 }
244
245 /** Interface for the Path */
246 export interface TickPath {
247     x: number;
248     y: number;
249     id: string;
250     'type'?: string;
251 }
252
253 /** Interface Nodes Creation */
254 export interface COMPOSERNODES {
255     id: string;
256     reflexive: Boolean;
257     'type': string;
258     name?: string;
259     nodeIndex?: number;
260     selectorId?: string;
261     x?: number;
262     y?: number;
263     fx?: number;
264     fy?: number;
265 }
266
267 /** Interface for the GRAPHDETAILS */
268 export 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 }