Bug 1382 - VNF packages list doesn't show short names
[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
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 NODE Details */
51 export interface VNFDNODE {
52     nodeTypeRef?: string;
53     'connection-point'?: CONNECTIONPOINT[];
54     description?: string;
55     id: string;
56     'internal-vld'?: InternalVLD[];
57     version?: string;
58     name?: string;
59     'mgmt-interface'?: MGMT;
60     _id?: string;
61     vdu?: VDU[];
62     _admin?: VNFDAdminDetails;
63     'short-name'?: string;
64     shortName?: string;
65     vendor?: string;
66     'type'?: string;
67     'cloud-init-file'?: string;
68     count?: number;
69     vduID?: string;
70     'interface'?: VNFDInterface[];
71     'vm-flavor'?: VMFlavor;
72     intVLID?: string;
73     'internal-connection-point'?: VLDInternalConnectionPoint[];
74     'monitoring-param'?: MonitoringParam[];
75     'ip-profile-ref'?: string;
76     'id-ref'?: string;
77     'ip-address'?: string;
78     reflexive?: boolean;
79     image?: string;
80 }
81
82 /** Interface for VNFDDetails */
83 export interface VNFDDetails {
84     'connection-point': CONNECTIONPOINT[];
85     description: string;
86     id: string;
87     'internal-vld': InternalVLD[];
88     version: string;
89     name: string;
90     'mgmt-interface': MGMT;
91     _id: string;
92     vdu: VDU[];
93     _admin: VNFDAdminDetails;
94     'short-name': string;
95     vendor: string;
96     'product-name'?: string;
97 }
98
99 /** Interface for MGMT */
100 interface MGMT {
101     cp: string;
102 }
103
104 /** Interface for VDU */
105 export interface VDU {
106     nodeTypeRef?: string;
107     'cloud-init-file'?: string;
108     count?: number;
109     description?: string;
110     id?: string;
111     image?: string;
112     'interface'?: VNFDInterface[];
113     'internal-connection-point'?: VDUInternalConnectionPoint[];
114     name?: string;
115     'vm-flavor'?: VMFlavor;
116     vduInterface?: string;
117     'monitoring-param'?: MonitoringParam[];
118 }
119
120 /** Interface for VMFlavor */
121 interface VMFlavor {
122     'storage-gb'?: string;
123     'memory-mb'?: string;
124     'vcpu-count'?: string;
125 }
126
127 /** Interface for VNFDInterface */
128 export interface VNFDInterface {
129     'external-connection-point-ref'?: string;
130     'internal-connection-point-ref'?: string;
131     'mgmt-interface'?: boolean;
132     name?: string;
133     'type'?: string;
134     position?: boolean;
135     'virtual-interface'?: VirtualInterface;
136 }
137
138 /** Interface for VDU Internal Connection Point */
139 export interface VDUInternalConnectionPoint {
140     id: string;
141     name?: string;
142     'short-name'?: string;
143     'type'?: string;
144 }
145
146 /** Interface for VirutalInterface */
147 interface VirtualInterface {
148     'type': string;
149 }
150
151 /** Interface for the connection-point */
152 export interface CONNECTIONPOINT {
153     nodeTypeRef?: string;
154     'connection-point-id'?: string;
155     name?: string;
156     id: string;
157     'type'?: string;
158 }
159
160 /** Interface for Internal VLD */
161 export interface InternalVLD {
162     nodeTypeRef?: string;
163     id?: string;
164     'internal-connection-point'?: VLDInternalConnectionPoint[];
165     'ip-profile-ref'?: string;
166     name?: string;
167     'short-name'?: string;
168     'type'?: string;
169     'shortName'?: string;
170     'ipProfileRef'?: string;
171 }
172
173 /** Interface for VLD Internal Connection Point */
174 export interface VLDInternalConnectionPoint {
175     nodeTypeRef?: string;
176     'ip-address'?: string;
177     'id-ref'?: string;
178     'shortName'?: string;
179 }
180
181 /** Interface for monitoring params */
182 export interface MonitoringParam {
183     id: string;
184     'nfvi-metric'?: string;
185     'interface-name-ref'?: string;
186 }
187
188 /** Interface for _AdminDetails */
189 // tslint:disable-next-line:class-name
190 export interface VNFDAdminDetails {
191     created: number;
192     modified: string;
193     onboardingState: string;
194     operationalState: string;
195     projects_read: string[];
196     projects_write: string[];
197     storage: Storage;
198     'type': string;
199     usageState: string;
200     userDefinedData: JSON;
201 }
202
203 /** Interface for Storage */
204 interface Storage {
205     descriptor: string;
206     folder: string;
207     fs: string;
208     path: string;
209     'pkg-dir': string;
210     zipfile: string;
211 }
212
213 /** Interface for VNFData */
214 export interface VNFData {
215     name?: string;
216     id?: string;
217     shortName?: string;
218     identifier: string;
219     description: string;
220     vendor?: string;
221     version: string;
222     'type'?: string;
223     productName?: string;
224 }
225
226 /** Interface for the Tick */
227 export interface Tick {
228     target: TickPath;
229     source: TickPath;
230     left: boolean;
231     right: boolean;
232 }
233
234 /** Interface for the Path */
235 export interface TickPath {
236     x: number;
237     y: number;
238     id: string;
239     'type'?: string;
240 }
241
242 /** Interface Nodes Creation */
243 export interface COMPOSERNODES {
244     id: string;
245     reflexive?: boolean;
246     'type'?: string;
247     name?: string;
248     nodeTypeRef?: string;
249     x?: number;
250     y?: number;
251     fx?: number;
252     fy?: number;
253 }
254
255 /** Interface for the GRAPHDETAILS */
256 export interface GRAPHDETAILS {
257     width: number;
258     height: number;
259     nodeHeight: number;
260     nodeWidth: number;
261     textX: number;
262     textY: number;
263     radius: number;
264     distance: number;
265     strength: number;
266     forcex: number;
267     forcey: number;
268     sourcePaddingYes: number;
269     sourcePaddingNo: number;
270     targetPaddingYes: number;
271     targetPaddingNo: number;
272     alphaTarget: number;
273     imageX: number;
274     imageY: number;
275     shiftKeyCode: number;
276 }