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 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',
74 k8OperationalStateThirdStep = 'ERROR',
77 userActive = 'active',
78 userLocked = 'locked',
79 userExpired = 'expired',
80 userAlwaysActive = 'always-active'
82 /** Interface for Post options */
83 export interface POSTAPIRESOURCE {
84 apiURLHeader: APIURLHEADER;
87 /** Interface for ApiURL Header */
88 export interface APIURLHEADER {
90 httpOptions?: APIHEADERS;
92 /** Interface for the Get Method with response type */
93 export interface GETAPIURLHEADER {
97 /** Interface for Httpoptions Header */
98 interface APIHEADERS {
101 /** Interface for the Error */
102 export interface ERRORDATA {
103 error: ERRORDETAILSDATA;
105 /** Interface for the Error Details */
106 interface ERRORDETAILSDATA {
112 /** Handle the URL params */
113 export interface URLPARAMS {
117 forceDeleteType?: boolean;
119 memberIndex?: object;
129 executedActions?: EXECUTEDACTIONS[];
131 /** Handle the Delete params */
132 export interface DELETEPARAMS {
135 projectName?: string;
140 productName?: string;
143 /** Interface for the Delete Details */
144 export interface MODALCLOSERESPONSEDATA {
148 /** Interface for the modal closer */
149 export interface MODALCLOSERESPONSEWITHCP {
151 connection_point?: string;
154 /** Interface for local storage settings */
155 export interface LOCALSTORAGE {
161 project_name?: string;
165 token_state?: string;
167 /** Interface for Tar settings */
168 export interface TARSETTINGS {
171 readAsString?: Function;
173 header_offset?: Number;
179 /** Interface for File Settings */
180 export interface FILESETTINGS {
186 /** Interface for Package information */
187 export interface PACKAGEINFO {
189 packageType?: string;
193 /** Interface For the Pagination pager in ng-smarttable */
194 export interface PAGERSMARTTABLE {
198 /** Interface for breadcrumb item */
199 export interface BREADCRUMBITEM {
203 /** Interface For the Pagination pager in ng-smarttable */
204 export interface SMARTTABLECLASS {
207 /** Constants of the VIM Types */
208 export 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' },
214 { value: 'azure', title: 'Azure' },
215 { value: 'dummy', title: 'Dummy' }
217 /** Constants of the SDN Types */
218 export 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' }
225 /** Constants of the WIM Types */
226 export 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' }
235 /** Constants of the OSM Repo Types */
236 export const OSMREPO_TYPES: TYPESECTION[] = [
237 { value: 'osm', title: 'OSM' }
239 /** Interface for List, Add WIM & SDN Types */
240 export interface TYPESECTION {
244 /** Interface for PRIMITIVETYPES */
245 export interface PRIMITIVETYPES {
249 /** Interface for the PRIMITIVEDATA */
250 export interface PRIMITIVEDATA {
253 /** Constant for VIM type Openstack's Config */
254 export const TYPEOPENSTACK: {} = {
257 sdn_port_mapping: '',
258 project_domain_id: '',
259 vim_network_name: '',
260 project_domain_name: '',
264 user_domain_name: '',
265 availability_zone: '',
268 dataplane_physical_net: '',
271 use_internal_endpoint: '',
274 use_existing_flavors: ''
276 /** Constant for VIM type AWS's Config */
277 export const TYPEAWS: {} = {
280 sdn_port_mapping: '',
282 vim_network_name: '',
288 /** Constant for VIM type VMWARE's Config */
289 export const TYPEVMWARE: {} = {
292 sdn_port_mapping: '',
294 vim_network_name: '',
299 vcenter_password: '',
308 /** Constant for VIM type OPENVIMNEBULA's Config */
309 export const TYPEOPENVIMNEBULA: {} = {
311 sdn_port_mapping: '',
312 vim_network_name: '',
315 /** Constant for VIM type AZURE's Config */
316 export const TYPEAZURE: {} = {
323 /** Constant for VIM other type Config */
324 export const TYPEOTERS: {} = {
326 sdn_port_mapping: '',
327 vim_network_name: '',
329 use_internal_endpoint: '',
331 use_existing_flavors: ''
333 /** Interface for Domains */
334 export interface DOMAINS {
335 project_domain_name: string;
336 user_domain_name: string;
338 /** Interface for Login */
339 export interface LOGINPARAMS {
342 old_password?: string;
344 /** Interface for the LABELVALUE */
345 export interface LABELVALUE {
349 /** Interface for Login */
350 export interface UNLOCKPARAMS {
351 system_admin_id?: string;