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,
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',
78 /** Interface for Post options */
79 export interface POSTAPIRESOURCE {
80 apiURLHeader: APIURLHEADER;
83 /** Interface for ApiURL Header */
84 export interface APIURLHEADER {
86 httpOptions?: APIHEADERS;
88 /** Interface for the Get Method with response type */
89 export interface GETAPIURLHEADER {
93 /** Interface for Httpoptions Header */
94 interface APIHEADERS {
97 /** Interface for the Error */
98 export interface ERRORDATA {
99 error: ERRORDETAILSDATA;
101 /** Interface for the Error Details */
102 interface ERRORDETAILSDATA {
108 /** Handle the URL params */
109 export interface URLPARAMS {
113 forceDeleteType?: boolean;
115 memberIndex?: object;
125 executedActions?: EXECUTEDACTIONS[];
127 /** Handle the Delete params */
128 export interface DELETEPARAMS {
131 projectName?: string;
136 productName?: string;
139 /** Interface for the Delete Details */
140 export interface MODALCLOSERESPONSEDATA {
144 /** Interface for the modal closer */
145 export interface MODALCLOSERESPONSEWITHCP {
147 connection_point?: string;
150 /** Interface for local storage settings */
151 export interface LOCALSTORAGE {
157 project_name?: string;
161 token_state?: string;
163 /** Interface for Tar settings */
164 export interface TARSETTINGS {
167 readAsString?: Function;
169 header_offset?: Number;
175 /** Interface for File Settings */
176 export interface FILESETTINGS {
182 /** Interface for Package information */
183 export interface PACKAGEINFO {
185 packageType?: string;
189 /** Interface For the Pagination pager in ng-smarttable */
190 export interface PAGERSMARTTABLE {
194 /** Interface for breadcrumb item */
195 export interface BREADCRUMBITEM {
199 /** Interface For the Pagination pager in ng-smarttable */
200 export interface SMARTTABLECLASS {
201 // tslint:disable-next-line: no-reserved-keywords
204 /** Constants of the VIM Types */
205 export const VIM_TYPES: TYPESECTION[] = [
206 { value: 'openstack', title: 'Openstack' },
207 { value: 'aws', title: 'AWS' },
208 { value: 'vmware', title: 'VMware vCD' },
209 { value: 'openvim', title: 'OpenVIM' },
210 { value: 'opennebula', title: 'OpenNebula' },
211 { value: 'azure', title: 'Azure' },
212 { value: 'dummy', title: 'Dummy' }
214 /** Constants of the SDN Types */
215 export const SDN_TYPES: TYPESECTION[] = [
216 { value: 'arista', title: 'Arista' },
217 { value: 'floodlightof', title: 'Floodlight openflow' },
218 { value: 'odlof', title: 'OpenDaylight openflow' },
219 { value: 'onosof', title: 'ONOS openflow' },
220 { value: 'onos_vpls', title: 'ONOS vpls' }
222 /** Constants of the WIM Types */
223 export const WIM_TYPES: TYPESECTION[] = [
224 { value: 'arista', title: 'Arista' },
225 { value: 'dynpac', title: 'DynPac' },
226 { value: 'floodlightof', title: 'Floodlight openflow' },
227 { value: 'odlof', title: 'OpenDaylight openflow' },
228 { value: 'onosof', title: 'ONOS openflow' },
229 { value: 'onos_vpls', title: 'ONOS vpls' },
230 { value: 'tapi', title: 'TAPI' }
232 /** Constants of the OSM Repo Types */
233 export const OSMREPO_TYPES: TYPESECTION[] = [
234 { value: 'osm', title: 'OSM' }
236 /** Interface for List, Add WIM & SDN Types */
237 export interface TYPESECTION {
241 /** Interface for PRIMITIVETYPES */
242 export interface PRIMITIVETYPES {
246 /** Interface for the PRIMITIVEDATA */
247 export interface PRIMITIVEDATA {
250 /** Constant for VIM type Openstack's Config */
251 export const TYPEOPENSTACK: {} = {
254 sdn_port_mapping: '',
255 project_domain_id: '',
256 vim_network_name: '',
257 project_domain_name: '',
261 user_domain_name: '',
262 availability_zone: '',
265 dataplane_physical_net: '',
268 use_internal_endpoint: '',
271 use_existing_flavors: ''
273 /** Constant for VIM type AWS's Config */
274 export const TYPEAWS: {} = {
277 sdn_port_mapping: '',
279 vim_network_name: '',
285 /** Constant for VIM type VMWARE's Config */
286 export const TYPEVMWARE: {} = {
289 sdn_port_mapping: '',
291 vim_network_name: '',
296 vcenter_password: '',
305 /** Constant for VIM type OPENVIMNEBULA's Config */
306 export const TYPEOPENVIMNEBULA: {} = {
308 sdn_port_mapping: '',
309 vim_network_name: '',
312 /** Constant for VIM type AZURE's Config */
313 export const TYPEAZURE: {} = {
320 /** Constant for VIM other type Config */
321 export const TYPEOTERS: {} = {
323 sdn_port_mapping: '',
324 vim_network_name: '',
326 use_internal_endpoint: '',
328 use_existing_flavors: ''
330 /** Interface for Domains */
331 export interface DOMAINS {
332 project_domain_name: string;
333 user_domain_name: string;
335 /** Interface for Login */
336 export interface LOGINPARAMS {
339 old_password?: string;
341 /** Interface for the LABELVALUE */
342 export interface LABELVALUE {