blob: abf0cb62f5ab9957c3b6a8426b451108291f483c [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',
kumaran.m3b4814a2020-05-01 19:48:54 +053057 configStateFirstStep = 'init',
58 configStateSecondStep = 'configured',
59 configStateThirdStep = 'failed',
60 historyStateFirstStep = 'PROCESSING',
61 historyStateSecondStep = 'COMPLETED',
62 historyStateThirdStep = 'FAILED',
63 wimOperationalStateFirstStep = 'PROCESSING',
64 wimOperationalStateStateSecondStep = 'ENABLED',
65 wimOperationalStateThirdStep = 'ERROR',
66 vimOperationalStateFirstStep = 'PROCESSING',
67 vimOperationalStateStateSecondStep = 'ENABLED',
68 vimOperationalStateThirdStep = 'ERROR',
69 sdnOperationalStateFirstStep = 'PROCESSING',
70 sdnOperationalStateStateSecondStep = 'ENABLED',
71 sdnOperationalStateThirdStep = 'ERROR',
72 k8OperationalStateFirstStep = 'PROCESSING',
73 k8OperationalStateStateSecondStep = 'ENABLED',
SANDHYA.JS99144582022-04-27 17:22:35 +053074 k8OperationalStateThirdStep = 'ERROR',
75 done = 'done',
SANDHYA.JS1b17c432023-04-26 17:54:57 +053076 close = 'close',
77 userActive = 'active',
78 userLocked = 'locked',
79 userExpired = 'expired',
80 userAlwaysActive = 'always-active'
kumaran.m3b4814a2020-05-01 19:48:54 +053081}
82/** Interface for Post options */
83export interface POSTAPIRESOURCE {
84 apiURLHeader: APIURLHEADER;
85 payload?: object;
86}
87/** Interface for ApiURL Header */
88export interface APIURLHEADER {
89 url: string;
90 httpOptions?: APIHEADERS;
91}
92/** Interface for the Get Method with response type */
93export interface GETAPIURLHEADER {
94 headers: HttpHeaders;
95 responseType: string;
96}
97/** Interface for Httpoptions Header */
98interface APIHEADERS {
99 headers: HttpHeaders;
100}
101/** Interface for the Error */
102export interface ERRORDATA {
103 error: ERRORDETAILSDATA;
104}
105/** Interface for the Error Details */
106interface ERRORDETAILSDATA {
107 detail: string;
108 code?: string;
109 status?: number;
110 text?: Function;
111}
112/** Handle the URL params */
113export interface URLPARAMS {
114 page: string;
115 id: string;
116 titleName?: string;
117 forceDeleteType?: boolean;
118 name?: string;
119 memberIndex?: object;
120 nsConfig?: object;
121 projectID?: string;
122 username?: string;
Barath Kumar R07698ab2021-03-30 11:50:42 +0530123 vnfID?: [];
124 nsID?: string;
125 nsd?: NSD;
126 data?: VNFD[];
Barath Kumar Rf2ae5462021-03-01 12:52:33 +0530127 configs?: object;
128 actions?: object;
129 executedActions?: EXECUTEDACTIONS[];
kumaran.m3b4814a2020-05-01 19:48:54 +0530130}
131/** Handle the Delete params */
132export interface DELETEPARAMS {
133 identifier: string;
134 name?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530135 projectName?: string;
136 userName?: string;
137 username?: string;
138 page?: string;
139 id?: string;
Barath Kumar R063a3f12020-12-29 16:35:09 +0530140 productName?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530141}
142
143/** Interface for the Delete Details */
144export interface MODALCLOSERESPONSEDATA {
145 message: string;
146}
147
148/** Interface for the modal closer */
149export interface MODALCLOSERESPONSEWITHCP {
150 message: string;
151 connection_point?: string;
152}
153
154/** Interface for local storage settings */
155export interface LOCALSTORAGE {
156 id_token?: string;
157 project_id?: string;
158 expires?: string;
159 username?: string;
160 project?: string;
161 project_name?: string;
162 id?: string;
163 admin?: boolean;
164 isAdmin?: string;
165 token_state?: string;
166}
167/** Interface for Tar settings */
168export interface TARSETTINGS {
169 name?: string;
170 'type'?: string;
171 readAsString?: Function;
172 buffer: ArrayBuffer;
Barath Kumar Rd477b852020-07-07 15:24:05 +0530173 header_offset?: Number;
174 size?: number;
Barath Kumar Rdb1aeb02020-10-13 18:14:16 +0530175 linkname?: string;
176 uname?: string;
177 gname?: string;
178}
179/** Interface for File Settings */
180export interface FILESETTINGS {
181 'type'?: string;
182 linkname?: string;
183 owner?: string;
184 group?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +0530185}
186/** Interface for Package information */
187export interface PACKAGEINFO {
188 id?: string;
189 packageType?: string;
190 descriptor: string;
191}
192
193/** Interface For the Pagination pager in ng-smarttable */
194export interface PAGERSMARTTABLE {
195 display: boolean;
196 perPage: number;
197}
198/** Interface for breadcrumb item */
199export interface BREADCRUMBITEM {
200 title: string;
201 url: string;
202}
203/** Interface For the Pagination pager in ng-smarttable */
204export interface SMARTTABLECLASS {
kumaran.m3b4814a2020-05-01 19:48:54 +0530205 class: string;
206}
207/** Constants of the VIM Types */
208export const VIM_TYPES: TYPESECTION[] = [
209 { value: 'openstack', title: 'Openstack' },
210 { value: 'aws', title: 'AWS' },
211 { value: 'vmware', title: 'VMware vCD' },
212 { value: 'openvim', title: 'OpenVIM' },
213 { value: 'opennebula', title: 'OpenNebula' },
SANDHYA.JS875b4a12022-04-26 13:05:18 +0530214 { value: 'azure', title: 'Azure' },
215 { value: 'dummy', title: 'Dummy' }
kumaran.m3b4814a2020-05-01 19:48:54 +0530216];
217/** Constants of the SDN Types */
218export const SDN_TYPES: TYPESECTION[] = [
219 { value: 'arista', title: 'Arista' },
220 { value: 'floodlightof', title: 'Floodlight openflow' },
221 { value: 'odlof', title: 'OpenDaylight openflow' },
222 { value: 'onosof', title: 'ONOS openflow' },
223 { value: 'onos_vpls', title: 'ONOS vpls' }
224];
225/** Constants of the WIM Types */
226export const WIM_TYPES: TYPESECTION[] = [
227 { value: 'arista', title: 'Arista' },
228 { value: 'dynpac', title: 'DynPac' },
229 { value: 'floodlightof', title: 'Floodlight openflow' },
230 { value: 'odlof', title: 'OpenDaylight openflow' },
231 { value: 'onosof', title: 'ONOS openflow' },
232 { value: 'onos_vpls', title: 'ONOS vpls' },
233 { value: 'tapi', title: 'TAPI' }
234];
Barath Kumar R403234e2020-07-07 15:48:58 +0530235/** Constants of the OSM Repo Types */
236export const OSMREPO_TYPES: TYPESECTION[] = [
237 { value: 'osm', title: 'OSM' }
238];
kumaran.m3b4814a2020-05-01 19:48:54 +0530239/** Interface for List, Add WIM & SDN Types */
240export interface TYPESECTION {
241 value: string;
242 title: string;
243}
Barath Kumar R063a3f12020-12-29 16:35:09 +0530244/** Interface for PRIMITIVETYPES */
245export interface PRIMITIVETYPES {
246 title: string;
247 value: string;
248}
249/** Interface for the PRIMITIVEDATA */
250export interface PRIMITIVEDATA {
251 parameter: {}[];
252}
Barath Kumar R16070582021-02-08 18:19:35 +0530253/** Constant for VIM type Openstack's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530254export const TYPEOPENSTACK: {} = {
255 sdn_controller: '',
256 APIversion: '',
257 sdn_port_mapping: '',
258 project_domain_id: '',
259 vim_network_name: '',
260 project_domain_name: '',
261 config_vim_ype: '',
262 user_domain_id: '',
263 security_groups: '',
264 user_domain_name: '',
Barath Kumar R1245fc82021-04-16 13:34:06 +0530265 availability_zone: '',
Barath Kumar Rd477b852020-07-07 15:24:05 +0530266 keypair: '',
267 region_name: '',
268 dataplane_physical_net: '',
269 insecure: '',
270 use_floating_ip: '',
271 use_internal_endpoint: '',
272 microversion: '',
273 additional_conf: '',
274 use_existing_flavors: ''
275};
Barath Kumar R16070582021-02-08 18:19:35 +0530276/** Constant for VIM type AWS's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530277export const TYPEAWS: {} = {
278 sdn_controller: '',
279 vpc_cidr_block: '',
280 sdn_port_mapping: '',
281 security_groups: '',
282 vim_network_name: '',
283 keypair: '',
284 region_name: '',
285 flavor_info: '',
286 additional_conf: ''
287};
Barath Kumar R16070582021-02-08 18:19:35 +0530288/** Constant for VIM type VMWARE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530289export const TYPEVMWARE: {} = {
290 sdn_controller: '',
291 orgname: '',
292 sdn_port_mapping: '',
293 vcenter_ip: '',
294 vim_network_name: '',
295 admin_username: '',
296 admin_password: '',
297 vcenter_port: '',
298 vcenter_user: '',
299 vcenter_password: '',
300 nsx_manager: '',
301 nsx_user: '',
302 nsx_password: '',
303 vrops_site: '',
304 vrops_user: '',
305 vrops_password: '',
306 additional_conf: ''
307};
Barath Kumar R16070582021-02-08 18:19:35 +0530308/** Constant for VIM type OPENVIMNEBULA's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530309export const TYPEOPENVIMNEBULA: {} = {
310 sdn_controller: '',
311 sdn_port_mapping: '',
312 vim_network_name: '',
313 additional_conf: ''
314};
Barath Kumar R16070582021-02-08 18:19:35 +0530315/** Constant for VIM type AZURE's Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530316export const TYPEAZURE: {} = {
317 subscription_id: '',
318 region_name: '',
319 resource_group: '',
320 vnet_name: '',
321 flavors_pattern: ''
322};
Barath Kumar R16070582021-02-08 18:19:35 +0530323/** Constant for VIM other type Config */
Barath Kumar Rd477b852020-07-07 15:24:05 +0530324export const TYPEOTERS: {} = {
325 sdn_controller: '',
326 sdn_port_mapping: '',
327 vim_network_name: '',
328 use_floating_ip: '',
329 use_internal_endpoint: '',
330 additional_conf: '',
331 use_existing_flavors: ''
332};
Barath Kumar R16070582021-02-08 18:19:35 +0530333/** Interface for Domains */
334export interface DOMAINS {
335 project_domain_name: string;
336 user_domain_name: string;
337}
338/** Interface for Login */
339export interface LOGINPARAMS {
340 username?: string;
341 password?: string;
SANDHYA.JSa9816552022-04-12 09:07:08 +0530342 old_password?: string;
Barath Kumar R16070582021-02-08 18:19:35 +0530343}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530344/** Interface for the LABELVALUE */
345export interface LABELVALUE {
346 label: string;
347 value: string;
348}
SANDHYA.JS1b17c432023-04-26 17:54:57 +0530349/** Interface for Login */
350export interface UNLOCKPARAMS {
351 system_admin_id?: string;
352 unlock?: boolean;
353 renew?: boolean;
354}