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 { VNFD } from 'VNFDModel';
23 * @file Model for Commonly used information.
25 // tslint:disable: completed-docs
29 export enum CONSTANTNUMBER {
31 osmapviewlong = 77.673,
32 osmapviewlat = 19.166,
33 chennailong = 80.2809,
35 bangalorelong = 77.5868,
36 bangalorelat = 12.9718,
39 tirvandrumlong = 76.9544,
40 tirvandrumlat = 8.5009,
42 paginationDefaultValue = 10,
49 export enum CONFIGCONSTANT {
50 operationalStateFirstStep = 'init',
51 operationalStateSecondStep = 'running',
52 operationalStateThirdStep = 'failed',
53 operationalStateFourthStep = 'scaling',
54 configStateFirstStep = 'init',
55 configStateSecondStep = 'configured',
56 configStateThirdStep = 'failed',
57 historyStateFirstStep = 'PROCESSING',
58 historyStateSecondStep = 'COMPLETED',
59 historyStateThirdStep = 'FAILED',
60 wimOperationalStateFirstStep = 'PROCESSING',
61 wimOperationalStateStateSecondStep = 'ENABLED',
62 wimOperationalStateThirdStep = 'ERROR',
63 vimOperationalStateFirstStep = 'PROCESSING',
64 vimOperationalStateStateSecondStep = 'ENABLED',
65 vimOperationalStateThirdStep = 'ERROR',
66 sdnOperationalStateFirstStep = 'PROCESSING',
67 sdnOperationalStateStateSecondStep = 'ENABLED',
68 sdnOperationalStateThirdStep = 'ERROR',
69 k8OperationalStateFirstStep = 'PROCESSING',
70 k8OperationalStateStateSecondStep = 'ENABLED',
71 k8OperationalStateThirdStep = 'ERROR'
73 /** Interface for Post options */
74 export interface POSTAPIRESOURCE {
75 apiURLHeader: APIURLHEADER;
78 /** Interface for ApiURL Header */
79 export interface APIURLHEADER {
81 httpOptions?: APIHEADERS;
83 /** Interface for the Get Method with response type */
84 export interface GETAPIURLHEADER {
88 /** Interface for Httpoptions Header */
89 interface APIHEADERS {
92 /** Interface for the Error */
93 export interface ERRORDATA {
94 error: ERRORDETAILSDATA;
96 /** Interface for the Error Details */
97 interface ERRORDETAILSDATA {
103 /** Handle the URL params */
104 export interface URLPARAMS {
108 forceDeleteType?: boolean;
110 memberIndex?: object;
119 /** Handle the Delete params */
120 export interface DELETEPARAMS {
123 projectName?: string;
128 productName?: string;
131 /** Interface for the Delete Details */
132 export interface MODALCLOSERESPONSEDATA {
136 /** Interface for the modal closer */
137 export interface MODALCLOSERESPONSEWITHCP {
139 connection_point?: string;
142 /** Interface for local storage settings */
143 export interface LOCALSTORAGE {
149 project_name?: string;
153 token_state?: string;
155 /** Interface for Tar settings */
156 export interface TARSETTINGS {
159 readAsString?: Function;
161 header_offset?: Number;
167 /** Interface for File Settings */
168 export interface FILESETTINGS {
174 /** Interface for Package information */
175 export interface PACKAGEINFO {
177 packageType?: string;
181 /** Interface For the Pagination pager in ng-smarttable */
182 export interface PAGERSMARTTABLE {
186 /** Interface for breadcrumb item */
187 export interface BREADCRUMBITEM {
191 /** Interface For the Pagination pager in ng-smarttable */
192 export interface SMARTTABLECLASS {
193 // tslint:disable-next-line: no-reserved-keywords
196 /** Constants of the VIM Types */
197 export const VIM_TYPES: TYPESECTION[] = [
198 { value: 'openstack', title: 'Openstack' },
199 { value: 'aws', title: 'AWS' },
200 { value: 'vmware', title: 'VMware vCD' },
201 { value: 'openvim', title: 'OpenVIM' },
202 { value: 'opennebula', title: 'OpenNebula' },
203 { value: 'azure', title: 'Azure' }
205 /** Constants of the SDN Types */
206 export const SDN_TYPES: TYPESECTION[] = [
207 { value: 'arista', title: 'Arista' },
208 { value: 'floodlightof', title: 'Floodlight openflow' },
209 { value: 'odlof', title: 'OpenDaylight openflow' },
210 { value: 'onosof', title: 'ONOS openflow' },
211 { value: 'onos_vpls', title: 'ONOS vpls' }
213 /** Constants of the WIM Types */
214 export const WIM_TYPES: TYPESECTION[] = [
215 { value: 'arista', title: 'Arista' },
216 { value: 'dynpac', title: 'DynPac' },
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' },
221 { value: 'tapi', title: 'TAPI' }
223 /** Constants of the OSM Repo Types */
224 export const OSMREPO_TYPES: TYPESECTION[] = [
225 { value: 'osm', title: 'OSM' }
227 /** Interface for List, Add WIM & SDN Types */
228 export interface TYPESECTION {
232 /** Interface for PRIMITIVETYPES */
233 export interface PRIMITIVETYPES {
237 /** Interface for the PRIMITIVEDATA */
238 export interface PRIMITIVEDATA {
241 /** Constant for VIM type Openstack's Config */
242 export const TYPEOPENSTACK: {} = {
245 sdn_port_mapping: '',
246 project_domain_id: '',
247 vim_network_name: '',
248 project_domain_name: '',
252 user_domain_name: '',
253 availabilityZone: '',
256 dataplane_physical_net: '',
259 use_internal_endpoint: '',
262 use_existing_flavors: ''
264 /** Constant for VIM type AWS's Config */
265 export const TYPEAWS: {} = {
268 sdn_port_mapping: '',
270 vim_network_name: '',
276 /** Constant for VIM type VMWARE's Config */
277 export const TYPEVMWARE: {} = {
280 sdn_port_mapping: '',
282 vim_network_name: '',
287 vcenter_password: '',
296 /** Constant for VIM type OPENVIMNEBULA's Config */
297 export const TYPEOPENVIMNEBULA: {} = {
299 sdn_port_mapping: '',
300 vim_network_name: '',
303 /** Constant for VIM type AZURE's Config */
304 export const TYPEAZURE: {} = {
311 /** Constant for VIM other type Config */
312 export const TYPEOTERS: {} = {
314 sdn_port_mapping: '',
315 vim_network_name: '',
317 use_internal_endpoint: '',
319 use_existing_flavors: ''
321 /** Interface for Domains */
322 export interface DOMAINS {
323 project_domain_name: string;
324 user_domain_name: string;
326 /** Interface for Login */
327 export interface LOGINPARAMS {