blob: 271b297c1d39420f7a69d861421cf3b45ef62db5 [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',
73 k8OperationalStateFirstStep = 'PROCESSING',
74 k8OperationalStateStateSecondStep = 'ENABLED',
SANDHYA.JS99144582022-04-27 17:22:35 +053075 k8OperationalStateThirdStep = 'ERROR',
76 done = 'done',
SANDHYA.JS1b17c432023-04-26 17:54:57 +053077 close = 'close',
78 userActive = 'active',
79 userLocked = 'locked',
80 userExpired = 'expired',
81 userAlwaysActive = 'always-active'
kumaran.m3b4814a2020-05-01 19:48:54 +053082}
83/** Interface for Post options */
84export interface POSTAPIRESOURCE {
85 apiURLHeader: APIURLHEADER;
86 payload?: object;
87}
88/** Interface for ApiURL Header */
89export interface APIURLHEADER {
90 url: string;
91 httpOptions?: APIHEADERS;
92}
93/** Interface for the Get Method with response type */
94export interface GETAPIURLHEADER {
95 headers: HttpHeaders;
96 responseType: string;
97}
98/** Interface for Httpoptions Header */
99interface APIHEADERS {
100 headers: HttpHeaders;
101}
102/** Interface for the Error */
103export interface ERRORDATA {
104 error: ERRORDETAILSDATA;
105}
106/** Interface for the Error Details */
107interface ERRORDETAILSDATA {
108 detail: string;
109 code?: string;
110 status?: number;
111 text?: Function;
112}
113/** Handle the URL params */
114export interface URLPARAMS {
115 page: string;
116 id: string;
117 titleName?: string;
118 forceDeleteType?: boolean;
119 name?: string;
120 memberIndex?: object;
121 nsConfig?: object;
122 projectID?: string;
123 username?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530124 vnfID?: [];
125 nsID?: string;
126 nsd?: NSD;
127 data?: VNFD[];
Barath Kumar Rf2ae5462021-03-01 12:52:33 +0530128 configs?: object;
129 actions?: object;
130 executedActions?: EXECUTEDACTIONS[];
SANDHYA.JS8ead52b2024-06-10 18:23:41 +0530131 identifierList: [];
kumaran.m3b4814a2020-05-01 19:48:54 +0530132}
133/** Handle the Delete params */
134export interface DELETEPARAMS {
135 identifier: string;
136 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530137 projectName?: string;
138 userName?: string;
139 username?: string;
140 page?: string;
141 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530142 productName?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530143}
144
145/** Interface for the Delete Details */
146export interface MODALCLOSERESPONSEDATA {
147 message: string;
148}
149
150/** Interface for the modal closer */
151export interface MODALCLOSERESPONSEWITHCP {
152 message: string;
153 connection_point?: string;
154}
155
156/** Interface for local storage settings */
157export interface LOCALSTORAGE {
158 id_token?: string;
159 project_id?: string;
160 expires?: string;
161 username?: string;
162 project?: string;
163 project_name?: string;
164 id?: string;
165 admin?: boolean;
166 isAdmin?: string;
167 token_state?: string;
168}
169/** Interface for Tar settings */
170export interface TARSETTINGS {
171 name?: string;
172 'type'?: string;
173 readAsString?: Function;
174 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530175 header_offset?: Number;
176 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530177 linkname?: string;
178 uname?: string;
179 gname?: string;
180}
181/** Interface for File Settings */
182export interface FILESETTINGS {
183 'type'?: string;
184 linkname?: string;
185 owner?: string;
186 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530187}
188/** Interface for Package information */
189export interface PACKAGEINFO {
190 id?: string;
191 packageType?: string;
192 descriptor: string;
193}
194
195/** Interface For the Pagination pager in ng-smarttable */
196export interface PAGERSMARTTABLE {
197 display: boolean;
198 perPage: number;
199}
200/** Interface for breadcrumb item */
201export interface BREADCRUMBITEM {
202 title: string;
203 url: string;
204}
205/** Interface For the Pagination pager in ng-smarttable */
206export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530207 class: string;
208}
209/** Constants of the VIM Types */
210export const VIM_TYPES: TYPESECTION[] = [
211 { value: 'openstack', title: 'Openstack' },
212 { value: 'aws', title: 'AWS' },
213 { value: 'vmware', title: 'VMware vCD' },
214 { value: 'openvim', title: 'OpenVIM' },
215 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530216 { value: 'azure', title: 'Azure' },
217 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530218];
219/** Constants of the SDN Types */
220export const SDN_TYPES: TYPESECTION[] = [
221 { value: 'arista', title: 'Arista' },
222 { value: 'floodlightof', title: 'Floodlight openflow' },
223 { value: 'odlof', title: 'OpenDaylight openflow' },
224 { value: 'onosof', title: 'ONOS openflow' },
225 { value: 'onos_vpls', title: 'ONOS vpls' }
226];
227/** Constants of the WIM Types */
228export const WIM_TYPES: TYPESECTION[] = [
229 { value: 'arista', title: 'Arista' },
230 { value: 'dynpac', title: 'DynPac' },
231 { value: 'floodlightof', title: 'Floodlight openflow' },
232 { value: 'odlof', title: 'OpenDaylight openflow' },
233 { value: 'onosof', title: 'ONOS openflow' },
234 { value: 'onos_vpls', title: 'ONOS vpls' },
235 { value: 'tapi', title: 'TAPI' }
236];
Barath Kumar R403234e2020-07-07 15:48:58 +0530237/** Constants of the OSM Repo Types */
238export const OSMREPO_TYPES: TYPESECTION[] = [
239 { value: 'osm', title: 'OSM' }
240];
kumaran.m3b4814a2020-05-01 19:48:54 +0530241/** Interface for List, Add WIM & SDN Types */
242export interface TYPESECTION {
243 value: string;
244 title: string;
245}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530246/** Interface for PRIMITIVETYPES */
247export interface PRIMITIVETYPES {
248 title: string;
249 value: string;
250}
251/** Interface for the PRIMITIVEDATA */
252export interface PRIMITIVEDATA {
253 parameter: {}[];
254}
Barath Kumar R16070582021-02-08 18:19:35 +0530255/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530256export const TYPEOPENSTACK: {} = {
257 sdn_controller: '',
258 APIversion: '',
259 sdn_port_mapping: '',
260 project_domain_id: '',
261 vim_network_name: '',
262 project_domain_name: '',
263 config_vim_ype: '',
264 user_domain_id: '',
265 security_groups: '',
266 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530267 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530268 keypair: '',
269 region_name: '',
270 dataplane_physical_net: '',
271 insecure: '',
272 use_floating_ip: '',
273 use_internal_endpoint: '',
274 microversion: '',
275 additional_conf: '',
276 use_existing_flavors: ''
277};
Barath Kumar R16070582021-02-08 18:19:35 +0530278/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530279export const TYPEAWS: {} = {
280 sdn_controller: '',
281 vpc_cidr_block: '',
282 sdn_port_mapping: '',
283 security_groups: '',
284 vim_network_name: '',
285 keypair: '',
286 region_name: '',
287 flavor_info: '',
288 additional_conf: ''
289};
Barath Kumar R16070582021-02-08 18:19:35 +0530290/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530291export const TYPEVMWARE: {} = {
292 sdn_controller: '',
293 orgname: '',
294 sdn_port_mapping: '',
295 vcenter_ip: '',
296 vim_network_name: '',
297 admin_username: '',
298 admin_password: '',
299 vcenter_port: '',
300 vcenter_user: '',
301 vcenter_password: '',
302 nsx_manager: '',
303 nsx_user: '',
304 nsx_password: '',
305 vrops_site: '',
306 vrops_user: '',
307 vrops_password: '',
308 additional_conf: ''
309};
Barath Kumar R16070582021-02-08 18:19:35 +0530310/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530311export const TYPEOPENVIMNEBULA: {} = {
312 sdn_controller: '',
313 sdn_port_mapping: '',
314 vim_network_name: '',
315 additional_conf: ''
316};
Barath Kumar R16070582021-02-08 18:19:35 +0530317/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530318export const TYPEAZURE: {} = {
319 subscription_id: '',
320 region_name: '',
321 resource_group: '',
322 vnet_name: '',
323 flavors_pattern: ''
324};
Barath Kumar R16070582021-02-08 18:19:35 +0530325/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530326export const TYPEOTERS: {} = {
327 sdn_controller: '',
328 sdn_port_mapping: '',
329 vim_network_name: '',
330 use_floating_ip: '',
331 use_internal_endpoint: '',
332 additional_conf: '',
333 use_existing_flavors: ''
334};
Barath Kumar R16070582021-02-08 18:19:35 +0530335/** Interface for Domains */
336export interface DOMAINS {
337 project_domain_name: string;
338 user_domain_name: string;
339}
340/** Interface for Login */
341export interface LOGINPARAMS {
342 username?: string;
343 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530344 old_password?: string;
SANDHYA.JS6c686082024-06-10 21:39:41 +0530345 email_id?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530346}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530347/** Interface for the LABELVALUE */
348export interface LABELVALUE {
349 label: string;
350 value: string;
351}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530352/** Interface for Login */
353export interface UNLOCKPARAMS {
354 system_admin_id?: string;
355 unlock?: boolean;
356 renew?: boolean;
357}