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.
26 export enum CONSTANTNUMBER {
28 osmapviewlong = 77.673,
29 osmapviewlat = 19.166,
30 chennailong = 80.2809,
32 bangalorelong = 77.5868,
33 bangalorelat = 12.9718,
36 tirvandrumlong = 76.9544,
37 tirvandrumlat = 8.5009,
39 paginationDefaultValue = 10,
46 export enum CONFIGCONSTANT {
47 operationalStateFirstStep = 'init',
48 operationalStateSecondStep = 'running',
49 operationalStateThirdStep = 'failed',
50 configStateFirstStep = 'init',
51 configStateSecondStep = 'configured',
52 configStateThirdStep = 'failed',
53 historyStateFirstStep = 'PROCESSING',
54 historyStateSecondStep = 'COMPLETED',
55 historyStateThirdStep = 'FAILED',
56 wimOperationalStateFirstStep = 'PROCESSING',
57 wimOperationalStateStateSecondStep = 'ENABLED',
58 wimOperationalStateThirdStep = 'ERROR',
59 vimOperationalStateFirstStep = 'PROCESSING',
60 vimOperationalStateStateSecondStep = 'ENABLED',
61 vimOperationalStateThirdStep = 'ERROR',
62 sdnOperationalStateFirstStep = 'PROCESSING',
63 sdnOperationalStateStateSecondStep = 'ENABLED',
64 sdnOperationalStateThirdStep = 'ERROR',
65 k8OperationalStateFirstStep = 'PROCESSING',
66 k8OperationalStateStateSecondStep = 'ENABLED',
67 k8OperationalStateThirdStep = 'ERROR'
69 /** Interface for Post options */
70 export interface POSTAPIRESOURCE {
71 apiURLHeader: APIURLHEADER;
74 /** Interface for ApiURL Header */
75 export interface APIURLHEADER {
77 httpOptions?: APIHEADERS;
79 /** Interface for the Get Method with response type */
80 export interface GETAPIURLHEADER {
84 /** Interface for Httpoptions Header */
85 interface APIHEADERS {
88 /** Interface for the Error */
89 export interface ERRORDATA {
90 error: ERRORDETAILSDATA;
92 /** Interface for the Error Details */
93 interface ERRORDETAILSDATA {
99 /** Handle the URL params */
100 export interface URLPARAMS {
104 forceDeleteType?: boolean;
106 memberIndex?: object;
111 /** Handle the Delete params */
112 export interface DELETEPARAMS {
116 projectName?: string;
123 /** Interface for the Delete Details */
124 export interface MODALCLOSERESPONSEDATA {
128 /** Interface for the modal closer */
129 export interface MODALCLOSERESPONSEWITHCP {
131 connection_point?: string;
134 /** Interface for local storage settings */
135 export interface LOCALSTORAGE {
141 project_name?: string;
145 token_state?: string;
147 /** Interface for Tar settings */
148 export interface TARSETTINGS {
151 readAsString?: Function;
153 header_offset?: Number;
156 /** Interface for Package information */
157 export interface PACKAGEINFO {
159 packageType?: string;
163 /** Interface For the Pagination pager in ng-smarttable */
164 export interface PAGERSMARTTABLE {
168 /** Interface for breadcrumb item */
169 export interface BREADCRUMBITEM {
173 /** Interface For the Pagination pager in ng-smarttable */
174 export interface SMARTTABLECLASS {
175 // tslint:disable-next-line: no-reserved-keywords
178 /** Constants of the VIM Types */
179 export const VIM_TYPES: TYPESECTION[] = [
180 { value: 'openstack', title: 'Openstack' },
181 { value: 'aws', title: 'AWS' },
182 { value: 'vmware', title: 'VMware vCD' },
183 { value: 'openvim', title: 'OpenVIM' },
184 { value: 'opennebula', title: 'OpenNebula' },
185 { value: 'azure', title: 'Azure' }
187 /** Constants of the SDN Types */
188 export const SDN_TYPES: TYPESECTION[] = [
189 { value: 'arista', title: 'Arista' },
190 { value: 'floodlightof', title: 'Floodlight openflow' },
191 { value: 'odlof', title: 'OpenDaylight openflow' },
192 { value: 'onosof', title: 'ONOS openflow' },
193 { value: 'onos_vpls', title: 'ONOS vpls' }
195 /** Constants of the WIM Types */
196 export const WIM_TYPES: TYPESECTION[] = [
197 { value: 'arista', title: 'Arista' },
198 { value: 'dynpac', title: 'DynPac' },
199 { value: 'floodlightof', title: 'Floodlight openflow' },
200 { value: 'odlof', title: 'OpenDaylight openflow' },
201 { value: 'onosof', title: 'ONOS openflow' },
202 { value: 'onos_vpls', title: 'ONOS vpls' },
203 { value: 'tapi', title: 'TAPI' }
205 /** Constants of the OSM Repo Types */
206 export const OSMREPO_TYPES: TYPESECTION[] = [
207 { value: 'osm', title: 'OSM' }
209 /** Interface for List, Add WIM & SDN Types */
210 export interface TYPESECTION {
214 /** Interface for VIM type Openstack's Config */
215 export const TYPEOPENSTACK: {} = {
218 sdn_port_mapping: '',
219 project_domain_id: '',
220 vim_network_name: '',
221 project_domain_name: '',
225 user_domain_name: '',
226 availabilityZone: '',
229 dataplane_physical_net: '',
232 use_internal_endpoint: '',
235 use_existing_flavors: ''
237 /** Interface for VIM type AWS's Config */
238 export const TYPEAWS: {} = {
241 sdn_port_mapping: '',
243 vim_network_name: '',
249 /** Interface for VIM type VMWARE's Config */
250 export const TYPEVMWARE: {} = {
253 sdn_port_mapping: '',
255 vim_network_name: '',
260 vcenter_password: '',
269 /** Interface for VIM type OPENVIMNEBULA's Config */
270 export const TYPEOPENVIMNEBULA: {} = {
272 sdn_port_mapping: '',
273 vim_network_name: '',
276 /** Interface for VIM type AZURE's Config */
277 export const TYPEAZURE: {} = {
284 /** Interface for VIM other type Config */
285 export const TYPEOTERS: {} = {
287 sdn_port_mapping: '',
288 vim_network_name: '',
290 use_internal_endpoint: '',
292 use_existing_flavors: ''