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.
26 // tslint:disable: completed-docs
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
51 export enum CONFIGCONSTANT {
52 operationalStateFirstStep = 'init',
53 operationalStateSecondStep = 'running',
54 operationalStateThirdStep = 'failed',
55 operationalStateFourthStep = 'scaling',
56 configStateFirstStep = 'init',
57 configStateSecondStep = 'configured',
58 configStateThirdStep = 'failed',
59 historyStateFirstStep = 'PROCESSING',
60 historyStateSecondStep = 'COMPLETED',
61 historyStateThirdStep = 'FAILED',
62 wimOperationalStateFirstStep = 'PROCESSING',
63 wimOperationalStateStateSecondStep = 'ENABLED',
64 wimOperationalStateThirdStep = 'ERROR',
65 vimOperationalStateFirstStep = 'PROCESSING',
66 vimOperationalStateStateSecondStep = 'ENABLED',
67 vimOperationalStateThirdStep = 'ERROR',
68 sdnOperationalStateFirstStep = 'PROCESSING',
69 sdnOperationalStateStateSecondStep = 'ENABLED',
70 sdnOperationalStateThirdStep = 'ERROR',
71 k8OperationalStateFirstStep = 'PROCESSING',
72 k8OperationalStateStateSecondStep = 'ENABLED',
73 k8OperationalStateThirdStep = 'ERROR'
75 /** Interface for Post options */
76 export interface POSTAPIRESOURCE {
77 apiURLHeader: APIURLHEADER;
80 /** Interface for ApiURL Header */
81 export interface APIURLHEADER {
83 httpOptions?: APIHEADERS;
85 /** Interface for the Get Method with response type */
86 export interface GETAPIURLHEADER {
90 /** Interface for Httpoptions Header */
91 interface APIHEADERS {
94 /** Interface for the Error */
95 export interface ERRORDATA {
96 error: ERRORDETAILSDATA;
98 /** Interface for the Error Details */
99 interface ERRORDETAILSDATA {
105 /** Handle the URL params */
106 export interface URLPARAMS {
110 forceDeleteType?: boolean;
112 memberIndex?: object;
122 executedActions?: EXECUTEDACTIONS[];
124 /** Handle the Delete params */
125 export interface DELETEPARAMS {
128 projectName?: string;
133 productName?: string;
136 /** Interface for the Delete Details */
137 export interface MODALCLOSERESPONSEDATA {
141 /** Interface for the modal closer */
142 export interface MODALCLOSERESPONSEWITHCP {
144 connection_point?: string;
147 /** Interface for local storage settings */
148 export interface LOCALSTORAGE {
154 project_name?: string;
158 token_state?: string;
160 /** Interface for Tar settings */
161 export interface TARSETTINGS {
164 readAsString?: Function;
166 header_offset?: Number;
172 /** Interface for File Settings */
173 export interface FILESETTINGS {
179 /** Interface for Package information */
180 export interface PACKAGEINFO {
182 packageType?: string;
186 /** Interface For the Pagination pager in ng-smarttable */
187 export interface PAGERSMARTTABLE {
191 /** Interface for breadcrumb item */
192 export interface BREADCRUMBITEM {
196 /** Interface For the Pagination pager in ng-smarttable */
197 export interface SMARTTABLECLASS {
198 // tslint:disable-next-line: no-reserved-keywords
201 /** Constants of the VIM Types */
202 export const VIM_TYPES: TYPESECTION[] = [
203 { value: 'openstack', title: 'Openstack' },
204 { value: 'aws', title: 'AWS' },
205 { value: 'vmware', title: 'VMware vCD' },
206 { value: 'openvim', title: 'OpenVIM' },
207 { value: 'opennebula', title: 'OpenNebula' },
208 { value: 'azure', title: 'Azure' }
210 /** Constants of the SDN Types */
211 export const SDN_TYPES: TYPESECTION[] = [
212 { value: 'arista', title: 'Arista' },
213 { value: 'floodlightof', title: 'Floodlight openflow' },
214 { value: 'odlof', title: 'OpenDaylight openflow' },
215 { value: 'onosof', title: 'ONOS openflow' },
216 { value: 'onos_vpls', title: 'ONOS vpls' }
218 /** Constants of the WIM Types */
219 export const WIM_TYPES: TYPESECTION[] = [
220 { value: 'arista', title: 'Arista' },
221 { value: 'dynpac', title: 'DynPac' },
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' },
226 { value: 'tapi', title: 'TAPI' }
228 /** Constants of the OSM Repo Types */
229 export const OSMREPO_TYPES: TYPESECTION[] = [
230 { value: 'osm', title: 'OSM' }
232 /** Interface for List, Add WIM & SDN Types */
233 export interface TYPESECTION {
237 /** Interface for PRIMITIVETYPES */
238 export interface PRIMITIVETYPES {
242 /** Interface for the PRIMITIVEDATA */
243 export interface PRIMITIVEDATA {
246 /** Constant for VIM type Openstack's Config */
247 export const TYPEOPENSTACK: {} = {
250 sdn_port_mapping: '',
251 project_domain_id: '',
252 vim_network_name: '',
253 project_domain_name: '',
257 user_domain_name: '',
258 availability_zone: '',
261 dataplane_physical_net: '',
264 use_internal_endpoint: '',
267 use_existing_flavors: ''
269 /** Constant for VIM type AWS's Config */
270 export const TYPEAWS: {} = {
273 sdn_port_mapping: '',
275 vim_network_name: '',
281 /** Constant for VIM type VMWARE's Config */
282 export const TYPEVMWARE: {} = {
285 sdn_port_mapping: '',
287 vim_network_name: '',
292 vcenter_password: '',
301 /** Constant for VIM type OPENVIMNEBULA's Config */
302 export const TYPEOPENVIMNEBULA: {} = {
304 sdn_port_mapping: '',
305 vim_network_name: '',
308 /** Constant for VIM type AZURE's Config */
309 export const TYPEAZURE: {} = {
316 /** Constant for VIM other type Config */
317 export const TYPEOTERS: {} = {
319 sdn_port_mapping: '',
320 vim_network_name: '',
322 use_internal_endpoint: '',
324 use_existing_flavors: ''
326 /** Interface for Domains */
327 export interface DOMAINS {
328 project_domain_name: string;
329 user_domain_name: string;
331 /** Interface for Login */
332 export interface LOGINPARAMS {