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';
21 * @file Model for Commonly used information.
23 // tslint:disable: completed-docs
27 export enum CONSTANTNUMBER {
29 osmapviewlong = 77.673,
30 osmapviewlat = 19.166,
31 chennailong = 80.2809,
33 bangalorelong = 77.5868,
34 bangalorelat = 12.9718,
37 tirvandrumlong = 76.9544,
38 tirvandrumlat = 8.5009,
40 paginationDefaultValue = 10,
47 export enum CONFIGCONSTANT {
48 operationalStateFirstStep = 'init',
49 operationalStateSecondStep = 'running',
50 operationalStateThirdStep = 'failed',
51 configStateFirstStep = 'init',
52 configStateSecondStep = 'configured',
53 configStateThirdStep = 'failed',
54 historyStateFirstStep = 'PROCESSING',
55 historyStateSecondStep = 'COMPLETED',
56 historyStateThirdStep = 'FAILED',
57 wimOperationalStateFirstStep = 'PROCESSING',
58 wimOperationalStateStateSecondStep = 'ENABLED',
59 wimOperationalStateThirdStep = 'ERROR',
60 vimOperationalStateFirstStep = 'PROCESSING',
61 vimOperationalStateStateSecondStep = 'ENABLED',
62 vimOperationalStateThirdStep = 'ERROR',
63 sdnOperationalStateFirstStep = 'PROCESSING',
64 sdnOperationalStateStateSecondStep = 'ENABLED',
65 sdnOperationalStateThirdStep = 'ERROR',
66 k8OperationalStateFirstStep = 'PROCESSING',
67 k8OperationalStateStateSecondStep = 'ENABLED',
68 k8OperationalStateThirdStep = 'ERROR'
70 /** Interface for Post options */
71 export interface POSTAPIRESOURCE {
72 apiURLHeader: APIURLHEADER;
75 /** Interface for ApiURL Header */
76 export interface APIURLHEADER {
78 httpOptions?: APIHEADERS;
80 /** Interface for the Get Method with response type */
81 export interface GETAPIURLHEADER {
85 /** Interface for Httpoptions Header */
86 interface APIHEADERS {
89 /** Interface for the Error */
90 export interface ERRORDATA {
91 error: ERRORDETAILSDATA;
93 /** Interface for the Error Details */
94 interface ERRORDETAILSDATA {
100 /** Handle the URL params */
101 export interface URLPARAMS {
105 forceDeleteType?: boolean;
107 memberIndex?: object;
112 /** Handle the Delete params */
113 export interface DELETEPARAMS {
116 projectName?: string;
121 productName?: string;
124 /** Interface for the Delete Details */
125 export interface MODALCLOSERESPONSEDATA {
129 /** Interface for the modal closer */
130 export interface MODALCLOSERESPONSEWITHCP {
132 connection_point?: string;
135 /** Interface for local storage settings */
136 export interface LOCALSTORAGE {
142 project_name?: string;
146 token_state?: string;
148 /** Interface for Tar settings */
149 export interface TARSETTINGS {
152 readAsString?: Function;
154 header_offset?: Number;
160 /** Interface for File Settings */
161 export interface FILESETTINGS {
167 /** Interface for Package information */
168 export interface PACKAGEINFO {
170 packageType?: string;
174 /** Interface For the Pagination pager in ng-smarttable */
175 export interface PAGERSMARTTABLE {
179 /** Interface for breadcrumb item */
180 export interface BREADCRUMBITEM {
184 /** Interface For the Pagination pager in ng-smarttable */
185 export interface SMARTTABLECLASS {
186 // tslint:disable-next-line: no-reserved-keywords
189 /** Constants of the VIM Types */
190 export const VIM_TYPES: TYPESECTION[] = [
191 { value: 'openstack', title: 'Openstack' },
192 { value: 'aws', title: 'AWS' },
193 { value: 'vmware', title: 'VMware vCD' },
194 { value: 'openvim', title: 'OpenVIM' },
195 { value: 'opennebula', title: 'OpenNebula' },
196 { value: 'azure', title: 'Azure' }
198 /** Constants of the SDN Types */
199 export const SDN_TYPES: TYPESECTION[] = [
200 { value: 'arista', title: 'Arista' },
201 { value: 'floodlightof', title: 'Floodlight openflow' },
202 { value: 'odlof', title: 'OpenDaylight openflow' },
203 { value: 'onosof', title: 'ONOS openflow' },
204 { value: 'onos_vpls', title: 'ONOS vpls' }
206 /** Constants of the WIM Types */
207 export const WIM_TYPES: TYPESECTION[] = [
208 { value: 'arista', title: 'Arista' },
209 { value: 'dynpac', title: 'DynPac' },
210 { value: 'floodlightof', title: 'Floodlight openflow' },
211 { value: 'odlof', title: 'OpenDaylight openflow' },
212 { value: 'onosof', title: 'ONOS openflow' },
213 { value: 'onos_vpls', title: 'ONOS vpls' },
214 { value: 'tapi', title: 'TAPI' }
216 /** Constants of the OSM Repo Types */
217 export const OSMREPO_TYPES: TYPESECTION[] = [
218 { value: 'osm', title: 'OSM' }
220 /** Interface for List, Add WIM & SDN Types */
221 export interface TYPESECTION {
225 /** Interface for PRIMITIVETYPES */
226 export interface PRIMITIVETYPES {
230 /** Interface for the PRIMITIVEDATA */
231 export interface PRIMITIVEDATA {
234 /** Constant for VIM type Openstack's Config */
235 export const TYPEOPENSTACK: {} = {
238 sdn_port_mapping: '',
239 project_domain_id: '',
240 vim_network_name: '',
241 project_domain_name: '',
245 user_domain_name: '',
246 availabilityZone: '',
249 dataplane_physical_net: '',
252 use_internal_endpoint: '',
255 use_existing_flavors: ''
257 /** Constant for VIM type AWS's Config */
258 export const TYPEAWS: {} = {
261 sdn_port_mapping: '',
263 vim_network_name: '',
269 /** Constant for VIM type VMWARE's Config */
270 export const TYPEVMWARE: {} = {
273 sdn_port_mapping: '',
275 vim_network_name: '',
280 vcenter_password: '',
289 /** Constant for VIM type OPENVIMNEBULA's Config */
290 export const TYPEOPENVIMNEBULA: {} = {
292 sdn_port_mapping: '',
293 vim_network_name: '',
296 /** Constant for VIM type AZURE's Config */
297 export const TYPEAZURE: {} = {
304 /** Constant for VIM other type Config */
305 export const TYPEOTERS: {} = {
307 sdn_port_mapping: '',
308 vim_network_name: '',
310 use_internal_endpoint: '',
312 use_existing_flavors: ''
314 /** Interface for Domains */
315 export interface DOMAINS {
316 project_domain_name: string;
317 user_domain_name: string;
319 /** Interface for Login */
320 export interface LOGINPARAMS {