blob: f29ee689669dc0b384610e1d535e6fdc83e90702 [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.JS92379ec2025-06-13 17:29:35 +053073 k8OperationalStateFirstStep = 'READY',
74 k8OperationalStateStateSecondStep = 'ERROR',
75 k8OperationalStateThirdStep = 'IN_PROGRESS',
76 k8OperationalStateFourthStep = 'N/A',
77 k8OperationalStateFifthStep = 'ENABLED',
78 k8OperationalStateSixthStep = 'DEGRADED',
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.JS92379ec2025-06-13 17:29:35 +0530140 cluster_mode?: string;
141 cluster_id?: string;
SANDHYA.JSa3ff32a2025-02-13 16:24:46 +0530142 operationType?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530143}
144/** Handle the Delete params */
145export interface DELETEPARAMS {
146 identifier: string;
147 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530148 projectName?: string;
149 userName?: string;
150 username?: string;
151 page?: string;
152 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530153 productName?: string;
SANDHYA.JSb772de02024-12-10 15:21:03 +0530154 createdbyosm?: string;
155 bootstrap?: boolean;
156 key?: boolean;
SANDHYA.JS92379ec2025-06-13 17:29:35 +0530157 cluster_id?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530158}
159
160/** Interface for the Delete Details */
161export interface MODALCLOSERESPONSEDATA {
162 message: string;
163}
164
165/** Interface for the modal closer */
166export interface MODALCLOSERESPONSEWITHCP {
167 message: string;
168 connection_point?: string;
169}
170
171/** Interface for local storage settings */
172export interface LOCALSTORAGE {
173 id_token?: string;
174 project_id?: string;
175 expires?: string;
176 username?: string;
177 project?: string;
178 project_name?: string;
179 id?: string;
180 admin?: boolean;
181 isAdmin?: string;
182 token_state?: string;
183}
184/** Interface for Tar settings */
185export interface TARSETTINGS {
186 name?: string;
187 'type'?: string;
188 readAsString?: Function;
189 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530190 header_offset?: Number;
191 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530192 linkname?: string;
193 uname?: string;
194 gname?: string;
195}
196/** Interface for File Settings */
197export interface FILESETTINGS {
198 'type'?: string;
199 linkname?: string;
200 owner?: string;
201 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530202}
203/** Interface for Package information */
204export interface PACKAGEINFO {
205 id?: string;
206 packageType?: string;
207 descriptor: string;
208}
209
210/** Interface For the Pagination pager in ng-smarttable */
211export interface PAGERSMARTTABLE {
212 display: boolean;
213 perPage: number;
214}
215/** Interface for breadcrumb item */
216export interface BREADCRUMBITEM {
217 title: string;
218 url: string;
219}
220/** Interface For the Pagination pager in ng-smarttable */
221export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530222 class: string;
223}
224/** Constants of the VIM Types */
225export const VIM_TYPES: TYPESECTION[] = [
226 { value: 'openstack', title: 'Openstack' },
227 { value: 'aws', title: 'AWS' },
lloretgalleg3e906e22025-03-21 10:27:22 +0000228 { value: 'vcenter', title: 'VMware vCenter' },
kumaran.m3b4814a2020-05-01 19:48:54 +0530229 { value: 'vmware', title: 'VMware vCD' },
230 { value: 'openvim', title: 'OpenVIM' },
231 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530232 { value: 'azure', title: 'Azure' },
233 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530234];
235/** Constants of the SDN Types */
236export const SDN_TYPES: TYPESECTION[] = [
237 { value: 'arista', title: 'Arista' },
238 { value: 'floodlightof', title: 'Floodlight openflow' },
239 { value: 'odlof', title: 'OpenDaylight openflow' },
240 { value: 'onosof', title: 'ONOS openflow' },
241 { value: 'onos_vpls', title: 'ONOS vpls' }
242];
243/** Constants of the WIM Types */
244export const WIM_TYPES: TYPESECTION[] = [
245 { value: 'arista', title: 'Arista' },
246 { value: 'dynpac', title: 'DynPac' },
247 { value: 'floodlightof', title: 'Floodlight openflow' },
248 { value: 'odlof', title: 'OpenDaylight openflow' },
249 { value: 'onosof', title: 'ONOS openflow' },
250 { value: 'onos_vpls', title: 'ONOS vpls' },
251 { value: 'tapi', title: 'TAPI' }
252];
Barath Kumar R403234e2020-07-07 15:48:58 +0530253/** Constants of the OSM Repo Types */
254export const OSMREPO_TYPES: TYPESECTION[] = [
255 { value: 'osm', title: 'OSM' }
256];
kumaran.m3b4814a2020-05-01 19:48:54 +0530257/** Interface for List, Add WIM & SDN Types */
258export interface TYPESECTION {
259 value: string;
260 title: string;
261}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530262/** Interface for PRIMITIVETYPES */
263export interface PRIMITIVETYPES {
264 title: string;
265 value: string;
266}
267/** Interface for the PRIMITIVEDATA */
268export interface PRIMITIVEDATA {
269 parameter: {}[];
270}
Barath Kumar R16070582021-02-08 18:19:35 +0530271/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530272export const TYPEOPENSTACK: {} = {
273 sdn_controller: '',
274 APIversion: '',
275 sdn_port_mapping: '',
276 project_domain_id: '',
277 vim_network_name: '',
278 project_domain_name: '',
279 config_vim_ype: '',
280 user_domain_id: '',
281 security_groups: '',
282 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530283 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530284 keypair: '',
285 region_name: '',
286 dataplane_physical_net: '',
287 insecure: '',
288 use_floating_ip: '',
289 use_internal_endpoint: '',
290 microversion: '',
291 additional_conf: '',
292 use_existing_flavors: ''
293};
Barath Kumar R16070582021-02-08 18:19:35 +0530294/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530295export const TYPEAWS: {} = {
296 sdn_controller: '',
297 vpc_cidr_block: '',
298 sdn_port_mapping: '',
299 security_groups: '',
300 vim_network_name: '',
301 keypair: '',
302 region_name: '',
303 flavor_info: '',
304 additional_conf: ''
305};
Barath Kumar R16070582021-02-08 18:19:35 +0530306/** Constant for VIM type VMWARE's Config */
lloretgalleg3e906e22025-03-21 10:27:22 +0000307export const TYPEVCENTER: {} = {
308 management_network_name: '',
309 availability_zone: '',
310 availability_network_zone: '',
311 datastore: '',
312 insecure: '',
313};
314/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530315export const TYPEVMWARE: {} = {
316 sdn_controller: '',
317 orgname: '',
318 sdn_port_mapping: '',
319 vcenter_ip: '',
320 vim_network_name: '',
321 admin_username: '',
322 admin_password: '',
323 vcenter_port: '',
324 vcenter_user: '',
325 vcenter_password: '',
326 nsx_manager: '',
327 nsx_user: '',
328 nsx_password: '',
329 vrops_site: '',
330 vrops_user: '',
331 vrops_password: '',
332 additional_conf: ''
333};
Barath Kumar R16070582021-02-08 18:19:35 +0530334/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530335export const TYPEOPENVIMNEBULA: {} = {
336 sdn_controller: '',
337 sdn_port_mapping: '',
338 vim_network_name: '',
339 additional_conf: ''
340};
Barath Kumar R16070582021-02-08 18:19:35 +0530341/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530342export const TYPEAZURE: {} = {
343 subscription_id: '',
344 region_name: '',
345 resource_group: '',
346 vnet_name: '',
347 flavors_pattern: ''
348};
Barath Kumar R16070582021-02-08 18:19:35 +0530349/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530350export const TYPEOTERS: {} = {
351 sdn_controller: '',
352 sdn_port_mapping: '',
353 vim_network_name: '',
354 use_floating_ip: '',
355 use_internal_endpoint: '',
356 additional_conf: '',
357 use_existing_flavors: ''
358};
Barath Kumar R16070582021-02-08 18:19:35 +0530359/** Interface for Domains */
360export interface DOMAINS {
361 project_domain_name: string;
362 user_domain_name: string;
363}
364/** Interface for Login */
365export interface LOGINPARAMS {
366 username?: string;
367 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530368 old_password?: string;
SANDHYA.JS6c686082024-06-10 21:39:41 +0530369 email_id?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530370}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530371/** Interface for the LABELVALUE */
372export interface LABELVALUE {
373 label: string;
374 value: string;
375}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530376/** Interface for Login */
377export interface UNLOCKPARAMS {
378 system_admin_id?: string;
379 unlock?: boolean;
380 renew?: boolean;
381}
Isabel Lloret523d6752025-04-29 08:06:54 +0000382