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