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