blob: cb69103186f3d50c926427c4b48ad0c90780c5cd [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;
kumaran.m3b4814a2020-05-01 19:48:54 +0530140}
141/** Handle the Delete params */
142export interface DELETEPARAMS {
143 identifier: string;
144 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530145 projectName?: string;
146 userName?: string;
147 username?: string;
148 page?: string;
149 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530150 productName?: string;
SANDHYA.JSb772de02024-12-10 15:21:03 +0530151 createdbyosm?: string;
152 bootstrap?: boolean;
153 key?: boolean;
kumaran.m3b4814a2020-05-01 19:48:54 +0530154}
155
156/** Interface for the Delete Details */
157export interface MODALCLOSERESPONSEDATA {
158 message: string;
159}
160
161/** Interface for the modal closer */
162export interface MODALCLOSERESPONSEWITHCP {
163 message: string;
164 connection_point?: string;
165}
166
167/** Interface for local storage settings */
168export interface LOCALSTORAGE {
169 id_token?: string;
170 project_id?: string;
171 expires?: string;
172 username?: string;
173 project?: string;
174 project_name?: string;
175 id?: string;
176 admin?: boolean;
177 isAdmin?: string;
178 token_state?: string;
179}
180/** Interface for Tar settings */
181export interface TARSETTINGS {
182 name?: string;
183 'type'?: string;
184 readAsString?: Function;
185 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530186 header_offset?: Number;
187 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530188 linkname?: string;
189 uname?: string;
190 gname?: string;
191}
192/** Interface for File Settings */
193export interface FILESETTINGS {
194 'type'?: string;
195 linkname?: string;
196 owner?: string;
197 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530198}
199/** Interface for Package information */
200export interface PACKAGEINFO {
201 id?: string;
202 packageType?: string;
203 descriptor: string;
204}
205
206/** Interface For the Pagination pager in ng-smarttable */
207export interface PAGERSMARTTABLE {
208 display: boolean;
209 perPage: number;
210}
211/** Interface for breadcrumb item */
212export interface BREADCRUMBITEM {
213 title: string;
214 url: string;
215}
216/** Interface For the Pagination pager in ng-smarttable */
217export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530218 class: string;
219}
220/** Constants of the VIM Types */
221export const VIM_TYPES: TYPESECTION[] = [
222 { value: 'openstack', title: 'Openstack' },
223 { value: 'aws', title: 'AWS' },
224 { value: 'vmware', title: 'VMware vCD' },
225 { value: 'openvim', title: 'OpenVIM' },
226 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530227 { value: 'azure', title: 'Azure' },
228 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530229];
230/** Constants of the SDN Types */
231export const SDN_TYPES: TYPESECTION[] = [
232 { value: 'arista', title: 'Arista' },
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];
238/** Constants of the WIM Types */
239export const WIM_TYPES: TYPESECTION[] = [
240 { value: 'arista', title: 'Arista' },
241 { value: 'dynpac', title: 'DynPac' },
242 { value: 'floodlightof', title: 'Floodlight openflow' },
243 { value: 'odlof', title: 'OpenDaylight openflow' },
244 { value: 'onosof', title: 'ONOS openflow' },
245 { value: 'onos_vpls', title: 'ONOS vpls' },
246 { value: 'tapi', title: 'TAPI' }
247];
Barath Kumar R403234e2020-07-07 15:48:58 +0530248/** Constants of the OSM Repo Types */
249export const OSMREPO_TYPES: TYPESECTION[] = [
250 { value: 'osm', title: 'OSM' }
251];
kumaran.m3b4814a2020-05-01 19:48:54 +0530252/** Interface for List, Add WIM & SDN Types */
253export interface TYPESECTION {
254 value: string;
255 title: string;
256}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530257/** Interface for PRIMITIVETYPES */
258export interface PRIMITIVETYPES {
259 title: string;
260 value: string;
261}
262/** Interface for the PRIMITIVEDATA */
263export interface PRIMITIVEDATA {
264 parameter: {}[];
265}
Barath Kumar R16070582021-02-08 18:19:35 +0530266/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530267export const TYPEOPENSTACK: {} = {
268 sdn_controller: '',
269 APIversion: '',
270 sdn_port_mapping: '',
271 project_domain_id: '',
272 vim_network_name: '',
273 project_domain_name: '',
274 config_vim_ype: '',
275 user_domain_id: '',
276 security_groups: '',
277 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530278 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530279 keypair: '',
280 region_name: '',
281 dataplane_physical_net: '',
282 insecure: '',
283 use_floating_ip: '',
284 use_internal_endpoint: '',
285 microversion: '',
286 additional_conf: '',
287 use_existing_flavors: ''
288};
Barath Kumar R16070582021-02-08 18:19:35 +0530289/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530290export const TYPEAWS: {} = {
291 sdn_controller: '',
292 vpc_cidr_block: '',
293 sdn_port_mapping: '',
294 security_groups: '',
295 vim_network_name: '',
296 keypair: '',
297 region_name: '',
298 flavor_info: '',
299 additional_conf: ''
300};
Barath Kumar R16070582021-02-08 18:19:35 +0530301/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530302export const TYPEVMWARE: {} = {
303 sdn_controller: '',
304 orgname: '',
305 sdn_port_mapping: '',
306 vcenter_ip: '',
307 vim_network_name: '',
308 admin_username: '',
309 admin_password: '',
310 vcenter_port: '',
311 vcenter_user: '',
312 vcenter_password: '',
313 nsx_manager: '',
314 nsx_user: '',
315 nsx_password: '',
316 vrops_site: '',
317 vrops_user: '',
318 vrops_password: '',
319 additional_conf: ''
320};
Barath Kumar R16070582021-02-08 18:19:35 +0530321/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530322export const TYPEOPENVIMNEBULA: {} = {
323 sdn_controller: '',
324 sdn_port_mapping: '',
325 vim_network_name: '',
326 additional_conf: ''
327};
Barath Kumar R16070582021-02-08 18:19:35 +0530328/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530329export const TYPEAZURE: {} = {
330 subscription_id: '',
331 region_name: '',
332 resource_group: '',
333 vnet_name: '',
334 flavors_pattern: ''
335};
Barath Kumar R16070582021-02-08 18:19:35 +0530336/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530337export const TYPEOTERS: {} = {
338 sdn_controller: '',
339 sdn_port_mapping: '',
340 vim_network_name: '',
341 use_floating_ip: '',
342 use_internal_endpoint: '',
343 additional_conf: '',
344 use_existing_flavors: ''
345};
Barath Kumar R16070582021-02-08 18:19:35 +0530346/** Interface for Domains */
347export interface DOMAINS {
348 project_domain_name: string;
349 user_domain_name: string;
350}
351/** Interface for Login */
352export interface LOGINPARAMS {
353 username?: string;
354 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530355 old_password?: string;
SANDHYA.JS6c686082024-06-10 21:39:41 +0530356 email_id?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530357}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530358/** Interface for the LABELVALUE */
359export interface LABELVALUE {
360 label: string;
361 value: string;
362}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530363/** Interface for Login */
364export interface UNLOCKPARAMS {
365 system_admin_id?: string;
366 unlock?: boolean;
367 renew?: boolean;
368}