blob: 001d970e09d6669e8b67c41f8038992524acb094 [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.JSb772de02024-12-10 15:21:03 +053078 k8OperationalStateSixthStep = 'N/A',
79 clusterModeFirstStep = 'MANAGED',
80 clusterModeSecondStep = 'REGISTERED',
SANDHYA.JS99144582022-04-27 17:22:35 +053081 done = 'done',
SANDHYA.JS1b17c432023-04-26 17:54:57 +053082 close = 'close',
83 userActive = 'active',
84 userLocked = 'locked',
85 userExpired = 'expired',
86 userAlwaysActive = 'always-active'
kumaran.m3b4814a2020-05-01 19:48:54 +053087}
88/** Interface for Post options */
89export interface POSTAPIRESOURCE {
90 apiURLHeader: APIURLHEADER;
91 payload?: object;
92}
93/** Interface for ApiURL Header */
94export interface APIURLHEADER {
95 url: string;
96 httpOptions?: APIHEADERS;
97}
98/** Interface for the Get Method with response type */
99export interface GETAPIURLHEADER {
100 headers: HttpHeaders;
101 responseType: string;
102}
103/** Interface for Httpoptions Header */
104interface APIHEADERS {
105 headers: HttpHeaders;
106}
107/** Interface for the Error */
108export interface ERRORDATA {
109 error: ERRORDETAILSDATA;
110}
111/** Interface for the Error Details */
112interface ERRORDETAILSDATA {
113 detail: string;
114 code?: string;
115 status?: number;
116 text?: Function;
117}
118/** Handle the URL params */
119export interface URLPARAMS {
120 page: string;
121 id: string;
122 titleName?: string;
123 forceDeleteType?: boolean;
124 name?: string;
125 memberIndex?: object;
126 nsConfig?: object;
127 projectID?: string;
128 username?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530129 vnfID?: [];
130 nsID?: string;
131 nsd?: NSD;
132 data?: VNFD[];
Barath Kumar Rf2ae5462021-03-01 12:52:33 +0530133 configs?: object;
134 actions?: object;
135 executedActions?: EXECUTEDACTIONS[];
SANDHYA.JS8ead52b2024-06-10 18:23:41 +0530136 identifierList: [];
SANDHYA.JSb772de02024-12-10 15:21:03 +0530137 createdbyosm?: string;
138 bootstrap?: boolean;
139 key?: boolean;
SANDHYA.JSa3ff32a2025-02-13 16:24:46 +0530140 operationType?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530141}
142/** Handle the Delete params */
143export interface DELETEPARAMS {
144 identifier: string;
145 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530146 projectName?: string;
147 userName?: string;
148 username?: string;
149 page?: string;
150 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530151 productName?: string;
SANDHYA.JSb772de02024-12-10 15:21:03 +0530152 createdbyosm?: string;
153 bootstrap?: boolean;
154 key?: boolean;
kumaran.m3b4814a2020-05-01 19:48:54 +0530155}
156
157/** Interface for the Delete Details */
158export interface MODALCLOSERESPONSEDATA {
159 message: string;
160}
161
162/** Interface for the modal closer */
163export interface MODALCLOSERESPONSEWITHCP {
164 message: string;
165 connection_point?: string;
166}
167
168/** Interface for local storage settings */
169export interface LOCALSTORAGE {
170 id_token?: string;
171 project_id?: string;
172 expires?: string;
173 username?: string;
174 project?: string;
175 project_name?: string;
176 id?: string;
177 admin?: boolean;
178 isAdmin?: string;
179 token_state?: string;
180}
181/** Interface for Tar settings */
182export interface TARSETTINGS {
183 name?: string;
184 'type'?: string;
185 readAsString?: Function;
186 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530187 header_offset?: Number;
188 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530189 linkname?: string;
190 uname?: string;
191 gname?: string;
192}
193/** Interface for File Settings */
194export interface FILESETTINGS {
195 'type'?: string;
196 linkname?: string;
197 owner?: string;
198 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530199}
200/** Interface for Package information */
201export interface PACKAGEINFO {
202 id?: string;
203 packageType?: string;
204 descriptor: string;
205}
206
207/** Interface For the Pagination pager in ng-smarttable */
208export interface PAGERSMARTTABLE {
209 display: boolean;
210 perPage: number;
211}
212/** Interface for breadcrumb item */
213export interface BREADCRUMBITEM {
214 title: string;
215 url: string;
216}
217/** Interface For the Pagination pager in ng-smarttable */
218export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530219 class: string;
220}
221/** Constants of the VIM Types */
222export const VIM_TYPES: TYPESECTION[] = [
223 { value: 'openstack', title: 'Openstack' },
224 { value: 'aws', title: 'AWS' },
lloretgalleg3e906e22025-03-21 10:27:22 +0000225 { value: 'vcenter', title: 'VMware vCenter' },
kumaran.m3b4814a2020-05-01 19:48:54 +0530226 { value: 'vmware', title: 'VMware vCD' },
227 { value: 'openvim', title: 'OpenVIM' },
228 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530229 { value: 'azure', title: 'Azure' },
230 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530231];
232/** Constants of the SDN Types */
233export const SDN_TYPES: TYPESECTION[] = [
234 { value: 'arista', title: 'Arista' },
235 { value: 'floodlightof', title: 'Floodlight openflow' },
236 { value: 'odlof', title: 'OpenDaylight openflow' },
237 { value: 'onosof', title: 'ONOS openflow' },
238 { value: 'onos_vpls', title: 'ONOS vpls' }
239];
240/** Constants of the WIM Types */
241export const WIM_TYPES: TYPESECTION[] = [
242 { value: 'arista', title: 'Arista' },
243 { value: 'dynpac', title: 'DynPac' },
244 { value: 'floodlightof', title: 'Floodlight openflow' },
245 { value: 'odlof', title: 'OpenDaylight openflow' },
246 { value: 'onosof', title: 'ONOS openflow' },
247 { value: 'onos_vpls', title: 'ONOS vpls' },
248 { value: 'tapi', title: 'TAPI' }
249];
Barath Kumar R403234e2020-07-07 15:48:58 +0530250/** Constants of the OSM Repo Types */
251export const OSMREPO_TYPES: TYPESECTION[] = [
252 { value: 'osm', title: 'OSM' }
253];
kumaran.m3b4814a2020-05-01 19:48:54 +0530254/** Interface for List, Add WIM & SDN Types */
255export interface TYPESECTION {
256 value: string;
257 title: string;
258}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530259/** Interface for PRIMITIVETYPES */
260export interface PRIMITIVETYPES {
261 title: string;
262 value: string;
263}
264/** Interface for the PRIMITIVEDATA */
265export interface PRIMITIVEDATA {
266 parameter: {}[];
267}
Barath Kumar R16070582021-02-08 18:19:35 +0530268/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530269export const TYPEOPENSTACK: {} = {
270 sdn_controller: '',
271 APIversion: '',
272 sdn_port_mapping: '',
273 project_domain_id: '',
274 vim_network_name: '',
275 project_domain_name: '',
276 config_vim_ype: '',
277 user_domain_id: '',
278 security_groups: '',
279 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530280 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530281 keypair: '',
282 region_name: '',
283 dataplane_physical_net: '',
284 insecure: '',
285 use_floating_ip: '',
286 use_internal_endpoint: '',
287 microversion: '',
288 additional_conf: '',
289 use_existing_flavors: ''
290};
Barath Kumar R16070582021-02-08 18:19:35 +0530291/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530292export const TYPEAWS: {} = {
293 sdn_controller: '',
294 vpc_cidr_block: '',
295 sdn_port_mapping: '',
296 security_groups: '',
297 vim_network_name: '',
298 keypair: '',
299 region_name: '',
300 flavor_info: '',
301 additional_conf: ''
302};
Barath Kumar R16070582021-02-08 18:19:35 +0530303/** Constant for VIM type VMWARE's Config */
lloretgalleg3e906e22025-03-21 10:27:22 +0000304export const TYPEVCENTER: {} = {
305 management_network_name: '',
306 availability_zone: '',
307 availability_network_zone: '',
308 datastore: '',
309 insecure: '',
310};
311/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530312export const TYPEVMWARE: {} = {
313 sdn_controller: '',
314 orgname: '',
315 sdn_port_mapping: '',
316 vcenter_ip: '',
317 vim_network_name: '',
318 admin_username: '',
319 admin_password: '',
320 vcenter_port: '',
321 vcenter_user: '',
322 vcenter_password: '',
323 nsx_manager: '',
324 nsx_user: '',
325 nsx_password: '',
326 vrops_site: '',
327 vrops_user: '',
328 vrops_password: '',
329 additional_conf: ''
330};
Barath Kumar R16070582021-02-08 18:19:35 +0530331/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530332export const TYPEOPENVIMNEBULA: {} = {
333 sdn_controller: '',
334 sdn_port_mapping: '',
335 vim_network_name: '',
336 additional_conf: ''
337};
Barath Kumar R16070582021-02-08 18:19:35 +0530338/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530339export const TYPEAZURE: {} = {
340 subscription_id: '',
341 region_name: '',
342 resource_group: '',
343 vnet_name: '',
344 flavors_pattern: ''
345};
Barath Kumar R16070582021-02-08 18:19:35 +0530346/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530347export const TYPEOTERS: {} = {
348 sdn_controller: '',
349 sdn_port_mapping: '',
350 vim_network_name: '',
351 use_floating_ip: '',
352 use_internal_endpoint: '',
353 additional_conf: '',
354 use_existing_flavors: ''
355};
Barath Kumar R16070582021-02-08 18:19:35 +0530356/** Interface for Domains */
357export interface DOMAINS {
358 project_domain_name: string;
359 user_domain_name: string;
360}
361/** Interface for Login */
362export interface LOGINPARAMS {
363 username?: string;
364 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530365 old_password?: string;
SANDHYA.JS6c686082024-06-10 21:39:41 +0530366 email_id?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530367}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530368/** Interface for the LABELVALUE */
369export interface LABELVALUE {
370 label: string;
371 value: string;
372}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530373/** Interface for Login */
374export interface UNLOCKPARAMS {
375 system_admin_id?: string;
376 unlock?: boolean;
377 renew?: boolean;
378}
Isabel Lloret523d6752025-04-29 08:06:54 +0000379