blob: 0b85878dc911eb7fb16b975d3dcdd39f0fe9f62e [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',
SANDHYA.JS219fe612024-01-23 15:52:43 +053057 operationalStateFifthStep = 'healing',
kumaran.m3b4814a2020-05-01 19:48:54 +053058 configStateFirstStep = 'init',
59 configStateSecondStep = 'configured',
60 configStateThirdStep = 'failed',
61 historyStateFirstStep = 'PROCESSING',
62 historyStateSecondStep = 'COMPLETED',
63 historyStateThirdStep = 'FAILED',
64 wimOperationalStateFirstStep = 'PROCESSING',
65 wimOperationalStateStateSecondStep = 'ENABLED',
66 wimOperationalStateThirdStep = 'ERROR',
67 vimOperationalStateFirstStep = 'PROCESSING',
68 vimOperationalStateStateSecondStep = 'ENABLED',
69 vimOperationalStateThirdStep = 'ERROR',
70 sdnOperationalStateFirstStep = 'PROCESSING',
71 sdnOperationalStateStateSecondStep = 'ENABLED',
72 sdnOperationalStateThirdStep = 'ERROR',
SANDHYA.JS26570112024-07-05 21:35:46 +053073 k8OperationalStateFirstStep = 'CREATED',
74 k8OperationalStateStateSecondStep = 'IN_CREATION',
75 k8OperationalStateThirdStep = 'IN_DELETION',
76 k8OperationalStateFourthStep = 'FAILED_DELETION',
77 k8OperationalStateFifthStep = 'FAILED_CREATION',
SANDHYA.JS99144582022-04-27 17:22:35 +053078 done = 'done',
SANDHYA.JS1b17c432023-04-26 17:54:57 +053079 close = 'close',
80 userActive = 'active',
81 userLocked = 'locked',
82 userExpired = 'expired',
83 userAlwaysActive = 'always-active'
kumaran.m3b4814a2020-05-01 19:48:54 +053084}
85/** Interface for Post options */
86export interface POSTAPIRESOURCE {
87 apiURLHeader: APIURLHEADER;
88 payload?: object;
89}
90/** Interface for ApiURL Header */
91export interface APIURLHEADER {
92 url: string;
93 httpOptions?: APIHEADERS;
94}
95/** Interface for the Get Method with response type */
96export interface GETAPIURLHEADER {
97 headers: HttpHeaders;
98 responseType: string;
99}
100/** Interface for Httpoptions Header */
101interface APIHEADERS {
102 headers: HttpHeaders;
103}
104/** Interface for the Error */
105export interface ERRORDATA {
106 error: ERRORDETAILSDATA;
107}
108/** Interface for the Error Details */
109interface ERRORDETAILSDATA {
110 detail: string;
111 code?: string;
112 status?: number;
113 text?: Function;
114}
115/** Handle the URL params */
116export interface URLPARAMS {
117 page: string;
118 id: string;
119 titleName?: string;
120 forceDeleteType?: boolean;
121 name?: string;
122 memberIndex?: object;
123 nsConfig?: object;
124 projectID?: string;
125 username?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530126 vnfID?: [];
127 nsID?: string;
128 nsd?: NSD;
129 data?: VNFD[];
Barath Kumar Rf2ae5462021-03-01 12:52:33 +0530130 configs?: object;
131 actions?: object;
132 executedActions?: EXECUTEDACTIONS[];
SANDHYA.JS8ead52b2024-06-10 18:23:41 +0530133 identifierList: [];
kumaran.m3b4814a2020-05-01 19:48:54 +0530134}
135/** Handle the Delete params */
136export interface DELETEPARAMS {
137 identifier: string;
138 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530139 projectName?: string;
140 userName?: string;
141 username?: string;
142 page?: string;
143 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530144 productName?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530145}
146
147/** Interface for the Delete Details */
148export interface MODALCLOSERESPONSEDATA {
149 message: string;
150}
151
152/** Interface for the modal closer */
153export interface MODALCLOSERESPONSEWITHCP {
154 message: string;
155 connection_point?: string;
156}
157
158/** Interface for local storage settings */
159export interface LOCALSTORAGE {
160 id_token?: string;
161 project_id?: string;
162 expires?: string;
163 username?: string;
164 project?: string;
165 project_name?: string;
166 id?: string;
167 admin?: boolean;
168 isAdmin?: string;
169 token_state?: string;
170}
171/** Interface for Tar settings */
172export interface TARSETTINGS {
173 name?: string;
174 'type'?: string;
175 readAsString?: Function;
176 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530177 header_offset?: Number;
178 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530179 linkname?: string;
180 uname?: string;
181 gname?: string;
182}
183/** Interface for File Settings */
184export interface FILESETTINGS {
185 'type'?: string;
186 linkname?: string;
187 owner?: string;
188 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530189}
190/** Interface for Package information */
191export interface PACKAGEINFO {
192 id?: string;
193 packageType?: string;
194 descriptor: string;
195}
196
197/** Interface For the Pagination pager in ng-smarttable */
198export interface PAGERSMARTTABLE {
199 display: boolean;
200 perPage: number;
201}
202/** Interface for breadcrumb item */
203export interface BREADCRUMBITEM {
204 title: string;
205 url: string;
206}
207/** Interface For the Pagination pager in ng-smarttable */
208export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530209 class: string;
210}
211/** Constants of the VIM Types */
212export const VIM_TYPES: TYPESECTION[] = [
213 { value: 'openstack', title: 'Openstack' },
214 { value: 'aws', title: 'AWS' },
215 { value: 'vmware', title: 'VMware vCD' },
216 { value: 'openvim', title: 'OpenVIM' },
217 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530218 { value: 'azure', title: 'Azure' },
219 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530220];
221/** Constants of the SDN Types */
222export const SDN_TYPES: TYPESECTION[] = [
223 { value: 'arista', title: 'Arista' },
224 { value: 'floodlightof', title: 'Floodlight openflow' },
225 { value: 'odlof', title: 'OpenDaylight openflow' },
226 { value: 'onosof', title: 'ONOS openflow' },
227 { value: 'onos_vpls', title: 'ONOS vpls' }
228];
229/** Constants of the WIM Types */
230export const WIM_TYPES: TYPESECTION[] = [
231 { value: 'arista', title: 'Arista' },
232 { value: 'dynpac', title: 'DynPac' },
233 { value: 'floodlightof', title: 'Floodlight openflow' },
234 { value: 'odlof', title: 'OpenDaylight openflow' },
235 { value: 'onosof', title: 'ONOS openflow' },
236 { value: 'onos_vpls', title: 'ONOS vpls' },
237 { value: 'tapi', title: 'TAPI' }
238];
Barath Kumar R403234e2020-07-07 15:48:58 +0530239/** Constants of the OSM Repo Types */
240export const OSMREPO_TYPES: TYPESECTION[] = [
241 { value: 'osm', title: 'OSM' }
242];
kumaran.m3b4814a2020-05-01 19:48:54 +0530243/** Interface for List, Add WIM & SDN Types */
244export interface TYPESECTION {
245 value: string;
246 title: string;
247}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530248/** Interface for PRIMITIVETYPES */
249export interface PRIMITIVETYPES {
250 title: string;
251 value: string;
252}
253/** Interface for the PRIMITIVEDATA */
254export interface PRIMITIVEDATA {
255 parameter: {}[];
256}
Barath Kumar R16070582021-02-08 18:19:35 +0530257/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530258export const TYPEOPENSTACK: {} = {
259 sdn_controller: '',
260 APIversion: '',
261 sdn_port_mapping: '',
262 project_domain_id: '',
263 vim_network_name: '',
264 project_domain_name: '',
265 config_vim_ype: '',
266 user_domain_id: '',
267 security_groups: '',
268 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530269 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530270 keypair: '',
271 region_name: '',
272 dataplane_physical_net: '',
273 insecure: '',
274 use_floating_ip: '',
275 use_internal_endpoint: '',
276 microversion: '',
277 additional_conf: '',
278 use_existing_flavors: ''
279};
Barath Kumar R16070582021-02-08 18:19:35 +0530280/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530281export const TYPEAWS: {} = {
282 sdn_controller: '',
283 vpc_cidr_block: '',
284 sdn_port_mapping: '',
285 security_groups: '',
286 vim_network_name: '',
287 keypair: '',
288 region_name: '',
289 flavor_info: '',
290 additional_conf: ''
291};
Barath Kumar R16070582021-02-08 18:19:35 +0530292/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530293export const TYPEVMWARE: {} = {
294 sdn_controller: '',
295 orgname: '',
296 sdn_port_mapping: '',
297 vcenter_ip: '',
298 vim_network_name: '',
299 admin_username: '',
300 admin_password: '',
301 vcenter_port: '',
302 vcenter_user: '',
303 vcenter_password: '',
304 nsx_manager: '',
305 nsx_user: '',
306 nsx_password: '',
307 vrops_site: '',
308 vrops_user: '',
309 vrops_password: '',
310 additional_conf: ''
311};
Barath Kumar R16070582021-02-08 18:19:35 +0530312/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530313export const TYPEOPENVIMNEBULA: {} = {
314 sdn_controller: '',
315 sdn_port_mapping: '',
316 vim_network_name: '',
317 additional_conf: ''
318};
Barath Kumar R16070582021-02-08 18:19:35 +0530319/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530320export const TYPEAZURE: {} = {
321 subscription_id: '',
322 region_name: '',
323 resource_group: '',
324 vnet_name: '',
325 flavors_pattern: ''
326};
Barath Kumar R16070582021-02-08 18:19:35 +0530327/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530328export const TYPEOTERS: {} = {
329 sdn_controller: '',
330 sdn_port_mapping: '',
331 vim_network_name: '',
332 use_floating_ip: '',
333 use_internal_endpoint: '',
334 additional_conf: '',
335 use_existing_flavors: ''
336};
Barath Kumar R16070582021-02-08 18:19:35 +0530337/** Interface for Domains */
338export interface DOMAINS {
339 project_domain_name: string;
340 user_domain_name: string;
341}
342/** Interface for Login */
343export interface LOGINPARAMS {
344 username?: string;
345 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530346 old_password?: string;
SANDHYA.JS6c686082024-06-10 21:39:41 +0530347 email_id?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530348}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530349/** Interface for the LABELVALUE */
350export interface LABELVALUE {
351 label: string;
352 value: string;
353}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530354/** Interface for Login */
355export interface UNLOCKPARAMS {
356 system_admin_id?: string;
357 unlock?: boolean;
358 renew?: boolean;
359}