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'
76 /** Interface for Post options */
77 export interface POSTAPIRESOURCE {
78 apiURLHeader: APIURLHEADER;
81 /** Interface for ApiURL Header */
82 export interface APIURLHEADER {
84 httpOptions?: APIHEADERS;
86 /** Interface for the Get Method with response type */
87 export interface GETAPIURLHEADER {
91 /** Interface for Httpoptions Header */
92 interface APIHEADERS {
95 /** Interface for the Error */
96 export interface ERRORDATA {
97 error: ERRORDETAILSDATA;
99 /** Interface for the Error Details */
100 interface ERRORDETAILSDATA {
106 /** Handle the URL params */
107 export interface URLPARAMS {
111 forceDeleteType?: boolean;
113 memberIndex?: object;
123 executedActions?: EXECUTEDACTIONS[];
125 /** Handle the Delete params */
126 export interface DELETEPARAMS {
129 projectName?: string;
134 productName?: string;
137 /** Interface for the Delete Details */
138 export interface MODALCLOSERESPONSEDATA {
142 /** Interface for the modal closer */
143 export interface MODALCLOSERESPONSEWITHCP {
145 connection_point?: string;
148 /** Interface for local storage settings */
149 export interface LOCALSTORAGE {
155 project_name?: string;
159 token_state?: string;
161 /** Interface for Tar settings */
162 export interface TARSETTINGS {
165 readAsString?: Function;
167 header_offset?: Number;
173 /** Interface for File Settings */
174 export interface FILESETTINGS {
180 /** Interface for Package information */
181 export interface PACKAGEINFO {
183 packageType?: string;
187 /** Interface For the Pagination pager in ng-smarttable */
188 export interface PAGERSMARTTABLE {
192 /** Interface for breadcrumb item */
193 export interface BREADCRUMBITEM {
197 /** Interface For the Pagination pager in ng-smarttable */
198 export interface SMARTTABLECLASS {
199 // tslint:disable-next-line: no-reserved-keywords
202 /** Constants of the VIM Types */
203 export const VIM_TYPES: TYPESECTION[] = [
204 { value: 'openstack', title: 'Openstack' },
205 { value: 'aws', title: 'AWS' },
206 { value: 'vmware', title: 'VMware vCD' },
207 { value: 'openvim', title: 'OpenVIM' },
208 { value: 'opennebula', title: 'OpenNebula' },
209 { value: 'azure', title: 'Azure' },
210 { value: 'dummy', title: 'Dummy' }
212 /** Constants of the SDN Types */
213 export const SDN_TYPES: TYPESECTION[] = [
214 { value: 'arista', title: 'Arista' },
215 { value: 'floodlightof', title: 'Floodlight openflow' },
216 { value: 'odlof', title: 'OpenDaylight openflow' },
217 { value: 'onosof', title: 'ONOS openflow' },
218 { value: 'onos_vpls', title: 'ONOS vpls' }
220 /** Constants of the WIM Types */
221 export const WIM_TYPES: TYPESECTION[] = [
222 { value: 'arista', title: 'Arista' },
223 { value: 'dynpac', title: 'DynPac' },
224 { value: 'floodlightof', title: 'Floodlight openflow' },
225 { value: 'odlof', title: 'OpenDaylight openflow' },
226 { value: 'onosof', title: 'ONOS openflow' },
227 { value: 'onos_vpls', title: 'ONOS vpls' },
228 { value: 'tapi', title: 'TAPI' }
230 /** Constants of the OSM Repo Types */
231 export const OSMREPO_TYPES: TYPESECTION[] = [
232 { value: 'osm', title: 'OSM' }
234 /** Interface for List, Add WIM & SDN Types */
235 export interface TYPESECTION {
239 /** Interface for PRIMITIVETYPES */
240 export interface PRIMITIVETYPES {
244 /** Interface for the PRIMITIVEDATA */
245 export interface PRIMITIVEDATA {
248 /** Constant for VIM type Openstack's Config */
249 export const TYPEOPENSTACK: {} = {
252 sdn_port_mapping: '',
253 project_domain_id: '',
254 vim_network_name: '',
255 project_domain_name: '',
259 user_domain_name: '',
260 availability_zone: '',
263 dataplane_physical_net: '',
266 use_internal_endpoint: '',
269 use_existing_flavors: ''
271 /** Constant for VIM type AWS's Config */
272 export const TYPEAWS: {} = {
275 sdn_port_mapping: '',
277 vim_network_name: '',
283 /** Constant for VIM type VMWARE's Config */
284 export const TYPEVMWARE: {} = {
287 sdn_port_mapping: '',
289 vim_network_name: '',
294 vcenter_password: '',
303 /** Constant for VIM type OPENVIMNEBULA's Config */
304 export const TYPEOPENVIMNEBULA: {} = {
306 sdn_port_mapping: '',
307 vim_network_name: '',
310 /** Constant for VIM type AZURE's Config */
311 export const TYPEAZURE: {} = {
318 /** Constant for VIM other type Config */
319 export const TYPEOTERS: {} = {
321 sdn_port_mapping: '',
322 vim_network_name: '',
324 use_internal_endpoint: '',
326 use_existing_flavors: ''
328 /** Interface for Domains */
329 export interface DOMAINS {
330 project_domain_name: string;
331 user_domain_name: string;
333 /** Interface for Login */
334 export interface LOGINPARAMS {
337 old_password?: string;
339 /** Interface for the LABELVALUE */
340 export interface LABELVALUE {