blob: ed3502961e02fedefdd3a17d5f1d764d5653ebda [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 */
18import { HttpHeaders } from '@angular/common/http';
Barath Kumar R07698ab2021-03-30 11:50:42 +053019import { NSD } from 'NSInstanceModel';
Barath Kumar Rf2ae5462021-03-01 12:52:33 +053020import { EXECUTEDACTIONS } from 'OperationalModel';
Barath Kumar R07698ab2021-03-30 11:50:42 +053021import { VNFD } from 'VNFDModel';
kumaran.m3b4814a2020-05-01 19:48:54 +053022
23/**
24 * @file Model for Commonly used information.
25 */
SANDHYA.JS0a34dfa2023-04-25 23:59:41 +053026/* eslint-disable */
kumaran.m3b4814a2020-05-01 19:48:54 +053027/**
28 * handle count @enum
29 */
30export enum CONSTANTNUMBER {
31 randomNumber = 4,
32 osmapviewlong = 77.673,
33 osmapviewlat = 19.166,
34 chennailong = 80.2809,
35 chennailat = 13.0781,
36 bangalorelong = 77.5868,
37 bangalorelat = 12.9718,
38 mumbailong = 72.8342,
39 mumbailat = 18.9394,
40 tirvandrumlong = 76.9544,
41 tirvandrumlat = 8.5009,
42 oneMB = 1048576,
43 paginationDefaultValue = 10,
44 splitLongitude = 1,
Barath Kumar Rf2ae5462021-03-01 12:52:33 +053045 splitLatitude = 2,
SANDHYA.JS4a7a5422021-05-15 15:35:22 +053046 timeOutDefaultSeconds = 5,
47 oneGB = 1024
kumaran.m3b4814a2020-05-01 19:48:54 +053048}
49/**
50 * handle count @enum
51 */
52export enum CONFIGCONSTANT {
53 operationalStateFirstStep = 'init',
54 operationalStateSecondStep = 'running',
55 operationalStateThirdStep = 'failed',
Barath Kumar R07698ab2021-03-30 11:50:42 +053056 operationalStateFourthStep = 'scaling',
kumaran.m3b4814a2020-05-01 19:48:54 +053057 configStateFirstStep = 'init',
58 configStateSecondStep = 'configured',
59 configStateThirdStep = 'failed',
60 historyStateFirstStep = 'PROCESSING',
61 historyStateSecondStep = 'COMPLETED',
62 historyStateThirdStep = 'FAILED',
63 wimOperationalStateFirstStep = 'PROCESSING',
64 wimOperationalStateStateSecondStep = 'ENABLED',
65 wimOperationalStateThirdStep = 'ERROR',
66 vimOperationalStateFirstStep = 'PROCESSING',
67 vimOperationalStateStateSecondStep = 'ENABLED',
68 vimOperationalStateThirdStep = 'ERROR',
69 sdnOperationalStateFirstStep = 'PROCESSING',
70 sdnOperationalStateStateSecondStep = 'ENABLED',
71 sdnOperationalStateThirdStep = 'ERROR',
72 k8OperationalStateFirstStep = 'PROCESSING',
73 k8OperationalStateStateSecondStep = 'ENABLED',
SANDHYA.JS99144582022-04-27 17:22:35 +053074 k8OperationalStateThirdStep = 'ERROR',
75 done = 'done',
76 close = 'close'
kumaran.m3b4814a2020-05-01 19:48:54 +053077}
78/** Interface for Post options */
79export interface POSTAPIRESOURCE {
80 apiURLHeader: APIURLHEADER;
81 payload?: object;
82}
83/** Interface for ApiURL Header */
84export interface APIURLHEADER {
85 url: string;
86 httpOptions?: APIHEADERS;
87}
88/** Interface for the Get Method with response type */
89export interface GETAPIURLHEADER {
90 headers: HttpHeaders;
91 responseType: string;
92}
93/** Interface for Httpoptions Header */
94interface APIHEADERS {
95 headers: HttpHeaders;
96}
97/** Interface for the Error */
98export interface ERRORDATA {
99 error: ERRORDETAILSDATA;
100}
101/** Interface for the Error Details */
102interface ERRORDETAILSDATA {
103 detail: string;
104 code?: string;
105 status?: number;
106 text?: Function;
107}
108/** Handle the URL params */
109export interface URLPARAMS {
110 page: string;
111 id: string;
112 titleName?: string;
113 forceDeleteType?: boolean;
114 name?: string;
115 memberIndex?: object;
116 nsConfig?: object;
117 projectID?: string;
118 username?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530119 vnfID?: [];
120 nsID?: string;
121 nsd?: NSD;
122 data?: VNFD[];
Barath Kumar Rf2ae5462021-03-01 12:52:33 +0530123 configs?: object;
124 actions?: object;
125 executedActions?: EXECUTEDACTIONS[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530126}
127/** Handle the Delete params */
128export interface DELETEPARAMS {
129 identifier: string;
130 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530131 projectName?: string;
132 userName?: string;
133 username?: string;
134 page?: string;
135 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530136 productName?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530137}
138
139/** Interface for the Delete Details */
140export interface MODALCLOSERESPONSEDATA {
141 message: string;
142}
143
144/** Interface for the modal closer */
145export interface MODALCLOSERESPONSEWITHCP {
146 message: string;
147 connection_point?: string;
148}
149
150/** Interface for local storage settings */
151export interface LOCALSTORAGE {
152 id_token?: string;
153 project_id?: string;
154 expires?: string;
155 username?: string;
156 project?: string;
157 project_name?: string;
158 id?: string;
159 admin?: boolean;
160 isAdmin?: string;
161 token_state?: string;
162}
163/** Interface for Tar settings */
164export interface TARSETTINGS {
165 name?: string;
166 'type'?: string;
167 readAsString?: Function;
168 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530169 header_offset?: Number;
170 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530171 linkname?: string;
172 uname?: string;
173 gname?: string;
174}
175/** Interface for File Settings */
176export interface FILESETTINGS {
177 'type'?: string;
178 linkname?: string;
179 owner?: string;
180 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530181}
182/** Interface for Package information */
183export interface PACKAGEINFO {
184 id?: string;
185 packageType?: string;
186 descriptor: string;
187}
188
189/** Interface For the Pagination pager in ng-smarttable */
190export interface PAGERSMARTTABLE {
191 display: boolean;
192 perPage: number;
193}
194/** Interface for breadcrumb item */
195export interface BREADCRUMBITEM {
196 title: string;
197 url: string;
198}
199/** Interface For the Pagination pager in ng-smarttable */
200export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530201 class: string;
202}
203/** Constants of the VIM Types */
204export const VIM_TYPES: TYPESECTION[] = [
205 { value: 'openstack', title: 'Openstack' },
206 { value: 'aws', title: 'AWS' },
207 { value: 'vmware', title: 'VMware vCD' },
208 { value: 'openvim', title: 'OpenVIM' },
209 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530210 { value: 'azure', title: 'Azure' },
211 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530212];
213/** Constants of the SDN Types */
214export const SDN_TYPES: TYPESECTION[] = [
215 { value: 'arista', title: 'Arista' },
216 { value: 'floodlightof', title: 'Floodlight openflow' },
217 { value: 'odlof', title: 'OpenDaylight openflow' },
218 { value: 'onosof', title: 'ONOS openflow' },
219 { value: 'onos_vpls', title: 'ONOS vpls' }
220];
221/** Constants of the WIM Types */
222export const WIM_TYPES: TYPESECTION[] = [
223 { value: 'arista', title: 'Arista' },
224 { value: 'dynpac', title: 'DynPac' },
225 { value: 'floodlightof', title: 'Floodlight openflow' },
226 { value: 'odlof', title: 'OpenDaylight openflow' },
227 { value: 'onosof', title: 'ONOS openflow' },
228 { value: 'onos_vpls', title: 'ONOS vpls' },
229 { value: 'tapi', title: 'TAPI' }
230];
Barath Kumar R403234e2020-07-07 15:48:58 +0530231/** Constants of the OSM Repo Types */
232export const OSMREPO_TYPES: TYPESECTION[] = [
233 { value: 'osm', title: 'OSM' }
234];
kumaran.m3b4814a2020-05-01 19:48:54 +0530235/** Interface for List, Add WIM & SDN Types */
236export interface TYPESECTION {
237 value: string;
238 title: string;
239}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530240/** Interface for PRIMITIVETYPES */
241export interface PRIMITIVETYPES {
242 title: string;
243 value: string;
244}
245/** Interface for the PRIMITIVEDATA */
246export interface PRIMITIVEDATA {
247 parameter: {}[];
248}
Barath Kumar R16070582021-02-08 18:19:35 +0530249/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530250export const TYPEOPENSTACK: {} = {
251 sdn_controller: '',
252 APIversion: '',
253 sdn_port_mapping: '',
254 project_domain_id: '',
255 vim_network_name: '',
256 project_domain_name: '',
257 config_vim_ype: '',
258 user_domain_id: '',
259 security_groups: '',
260 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530261 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530262 keypair: '',
263 region_name: '',
264 dataplane_physical_net: '',
265 insecure: '',
266 use_floating_ip: '',
267 use_internal_endpoint: '',
268 microversion: '',
269 additional_conf: '',
270 use_existing_flavors: ''
271};
Barath Kumar R16070582021-02-08 18:19:35 +0530272/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530273export const TYPEAWS: {} = {
274 sdn_controller: '',
275 vpc_cidr_block: '',
276 sdn_port_mapping: '',
277 security_groups: '',
278 vim_network_name: '',
279 keypair: '',
280 region_name: '',
281 flavor_info: '',
282 additional_conf: ''
283};
Barath Kumar R16070582021-02-08 18:19:35 +0530284/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530285export const TYPEVMWARE: {} = {
286 sdn_controller: '',
287 orgname: '',
288 sdn_port_mapping: '',
289 vcenter_ip: '',
290 vim_network_name: '',
291 admin_username: '',
292 admin_password: '',
293 vcenter_port: '',
294 vcenter_user: '',
295 vcenter_password: '',
296 nsx_manager: '',
297 nsx_user: '',
298 nsx_password: '',
299 vrops_site: '',
300 vrops_user: '',
301 vrops_password: '',
302 additional_conf: ''
303};
Barath Kumar R16070582021-02-08 18:19:35 +0530304/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530305export const TYPEOPENVIMNEBULA: {} = {
306 sdn_controller: '',
307 sdn_port_mapping: '',
308 vim_network_name: '',
309 additional_conf: ''
310};
Barath Kumar R16070582021-02-08 18:19:35 +0530311/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530312export const TYPEAZURE: {} = {
313 subscription_id: '',
314 region_name: '',
315 resource_group: '',
316 vnet_name: '',
317 flavors_pattern: ''
318};
Barath Kumar R16070582021-02-08 18:19:35 +0530319/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530320export const TYPEOTERS: {} = {
321 sdn_controller: '',
322 sdn_port_mapping: '',
323 vim_network_name: '',
324 use_floating_ip: '',
325 use_internal_endpoint: '',
326 additional_conf: '',
327 use_existing_flavors: ''
328};
Barath Kumar R16070582021-02-08 18:19:35 +0530329/** Interface for Domains */
330export interface DOMAINS {
331 project_domain_name: string;
332 user_domain_name: string;
333}
334/** Interface for Login */
335export interface LOGINPARAMS {
336 username?: string;
337 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530338 old_password?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530339}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530340/** Interface for the LABELVALUE */
341export interface LABELVALUE {
342 label: string;
343 value: string;
344}