131af47b0796ca24bc75d638cf935274b1f39528
[osm/NG-UI.git] / src / models / NSDModel.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 NSD related information.
20  */
21 // tslint:disable: completed-docs
22 import { VNFDAdminDetails } from './VNFDModel';
23
24 /** Interface for NSData */
25 export interface NSData {
26     id?: string;
27     identifier?: string;
28     description?: string;
29     version: string;
30     name?: string;
31     designer?: string;
32 }
33
34 /** Interface for the nscompose descriptors content */
35 export interface NSDDetails {
36     'connection-point': CONNECTIONPOINT[];
37     'constituent-vnfd': CONSTITUENTVNFD[];
38     description: string;
39     id: string;
40     logo: string;
41     name: string;
42     version: string;
43     vld: VLD[];
44     _admin: VNFDAdminDetails;
45     _id: string;
46     _links?: string;
47     'constituent-vnfr-ref': string[];
48     'virtual-link-desc': VLD[];
49     df: DF[];
50     'vnfd-id': string[];
51     designer?: string;
52 }
53
54 /** Interface for the connection-point */
55 export interface CONNECTIONPOINT {
56     name: string;
57     'vld-id-ref': string;
58 }
59
60 /** Interface for the constituent-vnfd */
61 export interface CONSTITUENTVNFD {
62     'member-vnf-index': number;
63     'vnfd-id-ref': string;
64 }
65
66 /** Interface for the vld */
67 export interface VLD {
68     id: string;
69     'mgmt-network'?: boolean;
70 }
71
72 /** Interface Nodes Creation */
73 export interface COMPOSERNODES {
74     id: string;
75     reflexive: Boolean;
76     'type': string;
77     name?: string;
78     nodeIndex?: string;
79     selectorId?: string;
80     x?: number;
81     y?: number;
82     fx?: number;
83     fy?: number;
84 }
85
86 /** Interface for the Tick */
87 export interface Tick {
88     target: TickPath;
89     source: TickPath;
90     left: boolean;
91     right: boolean;
92 }
93
94 /** Interface for the Path */
95 export interface TickPath {
96     x: number;
97     y: number;
98     id: string;
99     'type'?: string;
100     name?: string;
101     nodeIndex?: string;
102 }
103 /** Interface for the GRAPHDETAILS */
104 export interface GRAPHDETAILS {
105     width: number;
106     height: number;
107     nodeHeight: number;
108     nodeWidth: number;
109     textX: number;
110     textY: number;
111     radius: number;
112     distance: number;
113     strength: number;
114     forcex: number;
115     forcey: number;
116     sourcePaddingYes: number;
117     sourcePaddingNo: number;
118     targetPaddingYes: number;
119     targetPaddingNo: number;
120     alphaTarget: number;
121     imageX: number;
122     imageY: number;
123     shiftKeyCode: number;
124 }
125
126 /** Interface for the NS Create params */
127 export interface NSCREATEPARAMS {
128     nsName: string;
129     nsDescription: string;
130     nsdId: string;
131     vimAccountId: string;
132     vld: string;
133     ssh_keys: string[];
134 }
135
136 /** Interface for the NSI Create params */
137 export interface NSICREATEPARAMS {
138     nsName: string;
139     nsDescription: string;
140     nstId: string;
141     vimAccountId: string;
142     'netslice-vld': string;
143     ssh_keys: string[];
144 }
145
146 /** Interface for the VDU Primitive Levels */
147 export interface VDUPRIMITIVELEVEL {
148     id: string;
149     name: string;
150     'vdu-configuration': {};
151 }
152
153 /** Interface for the KDU Primitive Levels */
154 export interface KDUPRIMITIVELEVEL {
155     name: string;
156     'juju-bundle': string;
157     'kdu-configuration': {};
158 }
159
160 /** Interface for the DF */
161 export interface DF {
162     id: string;
163     'vnf-profile': VNFPROFILE[];
164 }
165
166 /** Interface for the DF */
167 export interface VNFPROFILE {
168     id: string;
169     'virtual-link-connectivity': VLC[];
170     'vnfd-id': string;
171 }
172
173 /** Interface for the VLC */
174 export interface VLC {
175     'constituent-cpd-id': CCI[];
176     'virtual-link-profile-id': string;
177 }
178
179 /** Interface for the CCI */
180 export interface CCI {
181     'constituent-base-element-id': string;
182     'constituent-cpd-id': string;
183 }
184 /** Interface for NSDATACREATION */
185 export interface NSDATACREATION {
186     nsd: NSDETAILDATA;
187 }
188 /** Interface for NSDETAILDATA */
189 export interface NSDETAILDATA {
190     nsd: NSDDetails[];
191 }