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[];
132 /** Handle the Delete params */
133 export interface DELETEPARAMS {
136 projectName?: string;
141 productName?: string;
144 /** Interface for the Delete Details */
145 export interface MODALCLOSERESPONSEDATA {
149 /** Interface for the modal closer */
150 export interface MODALCLOSERESPONSEWITHCP {
152 connection_point?: string;
155 /** Interface for local storage settings */
156 export interface LOCALSTORAGE {
162 project_name?: string;
166 token_state?: string;
168 /** Interface for Tar settings */
169 export interface TARSETTINGS {
172 readAsString?: Function;
174 header_offset?: Number;
180 /** Interface for File Settings */
181 export interface FILESETTINGS {
187 /** Interface for Package information */
188 export interface PACKAGEINFO {
190 packageType?: string;
194 /** Interface For the Pagination pager in ng-smarttable */
195 export interface PAGERSMARTTABLE {
199 /** Interface for breadcrumb item */
200 export interface BREADCRUMBITEM {
204 /** Interface For the Pagination pager in ng-smarttable */
205 export interface SMARTTABLECLASS {
208 /** Constants of the VIM Types */
209 export const VIM_TYPES: TYPESECTION[] = [
210 { value: 'openstack', title: 'Openstack' },
211 { value: 'aws', title: 'AWS' },
212 { value: 'vmware', title: 'VMware vCD' },
213 { value: 'openvim', title: 'OpenVIM' },
214 { value: 'opennebula', title: 'OpenNebula' },
215 { value: 'azure', title: 'Azure' },
216 { value: 'dummy', title: 'Dummy' }
218 /** Constants of the SDN Types */
219 export const SDN_TYPES: TYPESECTION[] = [
220 { value: 'arista', title: 'Arista' },
221 { value: 'floodlightof', title: 'Floodlight openflow' },
222 { value: 'odlof', title: 'OpenDaylight openflow' },
223 { value: 'onosof', title: 'ONOS openflow' },
224 { value: 'onos_vpls', title: 'ONOS vpls' }
226 /** Constants of the WIM Types */
227 export const WIM_TYPES: TYPESECTION[] = [
228 { value: 'arista', title: 'Arista' },
229 { value: 'dynpac', title: 'DynPac' },
230 { value: 'floodlightof', title: 'Floodlight openflow' },
231 { value: 'odlof', title: 'OpenDaylight openflow' },
232 { value: 'onosof', title: 'ONOS openflow' },
233 { value: 'onos_vpls', title: 'ONOS vpls' },
234 { value: 'tapi', title: 'TAPI' }
236 /** Constants of the OSM Repo Types */
237 export const OSMREPO_TYPES: TYPESECTION[] = [
238 { value: 'osm', title: 'OSM' }
240 /** Interface for List, Add WIM & SDN Types */
241 export interface TYPESECTION {
245 /** Interface for PRIMITIVETYPES */
246 export interface PRIMITIVETYPES {
250 /** Interface for the PRIMITIVEDATA */
251 export interface PRIMITIVEDATA {
254 /** Constant for VIM type Openstack's Config */
255 export const TYPEOPENSTACK: {} = {
258 sdn_port_mapping: '',
259 project_domain_id: '',
260 vim_network_name: '',
261 project_domain_name: '',
265 user_domain_name: '',
266 availability_zone: '',
269 dataplane_physical_net: '',
272 use_internal_endpoint: '',
275 use_existing_flavors: ''
277 /** Constant for VIM type AWS's Config */
278 export const TYPEAWS: {} = {
281 sdn_port_mapping: '',
283 vim_network_name: '',
289 /** Constant for VIM type VMWARE's Config */
290 export const TYPEVMWARE: {} = {
293 sdn_port_mapping: '',
295 vim_network_name: '',
300 vcenter_password: '',
309 /** Constant for VIM type OPENVIMNEBULA's Config */
310 export const TYPEOPENVIMNEBULA: {} = {
312 sdn_port_mapping: '',
313 vim_network_name: '',
316 /** Constant for VIM type AZURE's Config */
317 export const TYPEAZURE: {} = {
324 /** Constant for VIM other type Config */
325 export const TYPEOTERS: {} = {
327 sdn_port_mapping: '',
328 vim_network_name: '',
330 use_internal_endpoint: '',
332 use_existing_flavors: ''
334 /** Interface for Domains */
335 export interface DOMAINS {
336 project_domain_name: string;
337 user_domain_name: string;
339 /** Interface for Login */
340 export interface LOGINPARAMS {
343 old_password?: string;
345 /** Interface for the LABELVALUE */
346 export interface LABELVALUE {
350 /** Interface for Login */
351 export interface UNLOCKPARAMS {
352 system_admin_id?: string;