blob: b8d883780c38180e6e2a3606fd72a1454368175d [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' },
225 { value: 'vmware', title: 'VMware vCD' },
226 { value: 'openvim', title: 'OpenVIM' },
227 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530228 { value: 'azure', title: 'Azure' },
229 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530230];
231/** Constants of the SDN Types */
232export const SDN_TYPES: TYPESECTION[] = [
233 { value: 'arista', title: 'Arista' },
234 { value: 'floodlightof', title: 'Floodlight openflow' },
235 { value: 'odlof', title: 'OpenDaylight openflow' },
236 { value: 'onosof', title: 'ONOS openflow' },
237 { value: 'onos_vpls', title: 'ONOS vpls' }
238];
239/** Constants of the WIM Types */
240export const WIM_TYPES: TYPESECTION[] = [
241 { value: 'arista', title: 'Arista' },
242 { value: 'dynpac', title: 'DynPac' },
243 { value: 'floodlightof', title: 'Floodlight openflow' },
244 { value: 'odlof', title: 'OpenDaylight openflow' },
245 { value: 'onosof', title: 'ONOS openflow' },
246 { value: 'onos_vpls', title: 'ONOS vpls' },
247 { value: 'tapi', title: 'TAPI' }
248];
Barath Kumar R403234e2020-07-07 15:48:58 +0530249/** Constants of the OSM Repo Types */
250export const OSMREPO_TYPES: TYPESECTION[] = [
251 { value: 'osm', title: 'OSM' }
252];
kumaran.m3b4814a2020-05-01 19:48:54 +0530253/** Interface for List, Add WIM & SDN Types */
254export interface TYPESECTION {
255 value: string;
256 title: string;
257}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530258/** Interface for PRIMITIVETYPES */
259export interface PRIMITIVETYPES {
260 title: string;
261 value: string;
262}
263/** Interface for the PRIMITIVEDATA */
264export interface PRIMITIVEDATA {
265 parameter: {}[];
266}
Barath Kumar R16070582021-02-08 18:19:35 +0530267/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530268export const TYPEOPENSTACK: {} = {
269 sdn_controller: '',
270 APIversion: '',
271 sdn_port_mapping: '',
272 project_domain_id: '',
273 vim_network_name: '',
274 project_domain_name: '',
275 config_vim_ype: '',
276 user_domain_id: '',
277 security_groups: '',
278 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530279 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530280 keypair: '',
281 region_name: '',
282 dataplane_physical_net: '',
283 insecure: '',
284 use_floating_ip: '',
285 use_internal_endpoint: '',
286 microversion: '',
287 additional_conf: '',
288 use_existing_flavors: ''
289};
Barath Kumar R16070582021-02-08 18:19:35 +0530290/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530291export const TYPEAWS: {} = {
292 sdn_controller: '',
293 vpc_cidr_block: '',
294 sdn_port_mapping: '',
295 security_groups: '',
296 vim_network_name: '',
297 keypair: '',
298 region_name: '',
299 flavor_info: '',
300 additional_conf: ''
301};
Barath Kumar R16070582021-02-08 18:19:35 +0530302/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530303export const TYPEVMWARE: {} = {
304 sdn_controller: '',
305 orgname: '',
306 sdn_port_mapping: '',
307 vcenter_ip: '',
308 vim_network_name: '',
309 admin_username: '',
310 admin_password: '',
311 vcenter_port: '',
312 vcenter_user: '',
313 vcenter_password: '',
314 nsx_manager: '',
315 nsx_user: '',
316 nsx_password: '',
317 vrops_site: '',
318 vrops_user: '',
319 vrops_password: '',
320 additional_conf: ''
321};
Barath Kumar R16070582021-02-08 18:19:35 +0530322/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530323export const TYPEOPENVIMNEBULA: {} = {
324 sdn_controller: '',
325 sdn_port_mapping: '',
326 vim_network_name: '',
327 additional_conf: ''
328};
Barath Kumar R16070582021-02-08 18:19:35 +0530329/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530330export const TYPEAZURE: {} = {
331 subscription_id: '',
332 region_name: '',
333 resource_group: '',
334 vnet_name: '',
335 flavors_pattern: ''
336};
Barath Kumar R16070582021-02-08 18:19:35 +0530337/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530338export const TYPEOTERS: {} = {
339 sdn_controller: '',
340 sdn_port_mapping: '',
341 vim_network_name: '',
342 use_floating_ip: '',
343 use_internal_endpoint: '',
344 additional_conf: '',
345 use_existing_flavors: ''
346};
Barath Kumar R16070582021-02-08 18:19:35 +0530347/** Interface for Domains */
348export interface DOMAINS {
349 project_domain_name: string;
350 user_domain_name: string;
351}
352/** Interface for Login */
353export interface LOGINPARAMS {
354 username?: string;
355 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530356 old_password?: string;
SANDHYA.JS6c686082024-06-10 21:39:41 +0530357 email_id?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530358}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530359/** Interface for the LABELVALUE */
360export interface LABELVALUE {
361 label: string;
362 value: string;
363}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530364/** Interface for Login */
365export interface UNLOCKPARAMS {
366 system_admin_id?: string;
367 unlock?: boolean;
368 renew?: boolean;
369}