2 Copyright 2020 TATA ELXSI
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
8 http://www.apache.org/licenses/LICENSE-2.0
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.
16 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
18 import { HttpHeaders } from '@angular/common/http';
19 import { NSD } from 'NSInstanceModel';
20 import { EXECUTEDACTIONS } from 'OperationalModel';
21 import { VNFD } from 'VNFDModel';
24 * @file Model for Commonly used information.
30 export enum CONSTANTNUMBER {
32 osmapviewlong = 77.673,
33 osmapviewlat = 19.166,
34 chennailong = 80.2809,
36 bangalorelong = 77.5868,
37 bangalorelat = 12.9718,
40 tirvandrumlong = 76.9544,
41 tirvandrumlat = 8.5009,
43 paginationDefaultValue = 10,
46 timeOutDefaultSeconds = 5,
52 export enum CONFIGCONSTANT {
53 operationalStateFirstStep = 'init',
54 operationalStateSecondStep = 'running',
55 operationalStateThirdStep = 'failed',
56 operationalStateFourthStep = 'scaling',
57 operationalStateFifthStep = 'healing',
58 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',
75 k8OperationalStateThirdStep = 'ERROR',
78 userActive = 'active',
79 userLocked = 'locked',
80 userExpired = 'expired',
81 userAlwaysActive = 'always-active'
83 /** Interface for Post options */
84 export interface POSTAPIRESOURCE {
85 apiURLHeader: APIURLHEADER;
88 /** Interface for ApiURL Header */
89 export interface APIURLHEADER {
91 httpOptions?: APIHEADERS;
93 /** Interface for the Get Method with response type */
94 export interface GETAPIURLHEADER {
98 /** Interface for Httpoptions Header */
99 interface APIHEADERS {
100 headers: HttpHeaders;
102 /** Interface for the Error */
103 export interface ERRORDATA {
104 error: ERRORDETAILSDATA;
106 /** Interface for the Error Details */
107 interface ERRORDETAILSDATA {
113 /** Handle the URL params */
114 export interface URLPARAMS {
118 forceDeleteType?: boolean;
120 memberIndex?: object;
130 executedActions?: EXECUTEDACTIONS[];
133 /** Handle the Delete params */
134 export interface DELETEPARAMS {
137 projectName?: string;
142 productName?: string;
145 /** Interface for the Delete Details */
146 export interface MODALCLOSERESPONSEDATA {
150 /** Interface for the modal closer */
151 export interface MODALCLOSERESPONSEWITHCP {
153 connection_point?: string;
156 /** Interface for local storage settings */
157 export interface LOCALSTORAGE {
163 project_name?: string;
167 token_state?: string;
169 /** Interface for Tar settings */
170 export interface TARSETTINGS {
173 readAsString?: Function;
175 header_offset?: Number;
181 /** Interface for File Settings */
182 export interface FILESETTINGS {
188 /** Interface for Package information */
189 export interface PACKAGEINFO {
191 packageType?: string;
195 /** Interface For the Pagination pager in ng-smarttable */
196 export interface PAGERSMARTTABLE {
200 /** Interface for breadcrumb item */
201 export interface BREADCRUMBITEM {
205 /** Interface For the Pagination pager in ng-smarttable */
206 export interface SMARTTABLECLASS {
209 /** Constants of the VIM Types */
210 export 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' },
216 { value: 'azure', title: 'Azure' },
217 { value: 'dummy', title: 'Dummy' }
219 /** Constants of the SDN Types */
220 export 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' }
227 /** Constants of the WIM Types */
228 export 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' }
237 /** Constants of the OSM Repo Types */
238 export const OSMREPO_TYPES: TYPESECTION[] = [
239 { value: 'osm', title: 'OSM' }
241 /** Interface for List, Add WIM & SDN Types */
242 export interface TYPESECTION {
246 /** Interface for PRIMITIVETYPES */
247 export interface PRIMITIVETYPES {
251 /** Interface for the PRIMITIVEDATA */
252 export interface PRIMITIVEDATA {
255 /** Constant for VIM type Openstack's Config */
256 export const TYPEOPENSTACK: {} = {
259 sdn_port_mapping: '',
260 project_domain_id: '',
261 vim_network_name: '',
262 project_domain_name: '',
266 user_domain_name: '',
267 availability_zone: '',
270 dataplane_physical_net: '',
273 use_internal_endpoint: '',
276 use_existing_flavors: ''
278 /** Constant for VIM type AWS's Config */
279 export const TYPEAWS: {} = {
282 sdn_port_mapping: '',
284 vim_network_name: '',
290 /** Constant for VIM type VMWARE's Config */
291 export const TYPEVMWARE: {} = {
294 sdn_port_mapping: '',
296 vim_network_name: '',
301 vcenter_password: '',
310 /** Constant for VIM type OPENVIMNEBULA's Config */
311 export const TYPEOPENVIMNEBULA: {} = {
313 sdn_port_mapping: '',
314 vim_network_name: '',
317 /** Constant for VIM type AZURE's Config */
318 export const TYPEAZURE: {} = {
325 /** Constant for VIM other type Config */
326 export const TYPEOTERS: {} = {
328 sdn_port_mapping: '',
329 vim_network_name: '',
331 use_internal_endpoint: '',
333 use_existing_flavors: ''
335 /** Interface for Domains */
336 export interface DOMAINS {
337 project_domain_name: string;
338 user_domain_name: string;
340 /** Interface for Login */
341 export interface LOGINPARAMS {
344 old_password?: string;
346 /** Interface for the LABELVALUE */
347 export interface LABELVALUE {
351 /** Interface for Login */
352 export interface UNLOCKPARAMS {
353 system_admin_id?: string;