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.
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 {
203 /** Constants of the VIM Types */
204 export const VIM_TYPES: TYPESECTION[] = [
205 { value: 'openstack', title: 'Openstack' },
206 { value: 'aws', title: 'AWS' },
207 { value: 'vmware', title: 'VMware vCD' },
208 { value: 'openvim', title: 'OpenVIM' },
209 { value: 'opennebula', title: 'OpenNebula' },
210 { value: 'azure', title: 'Azure' },
211 { value: 'dummy', title: 'Dummy' }
213 /** Constants of the SDN Types */
214 export const SDN_TYPES: TYPESECTION[] = [
215 { value: 'arista', title: 'Arista' },
216 { value: 'floodlightof', title: 'Floodlight openflow' },
217 { value: 'odlof', title: 'OpenDaylight openflow' },
218 { value: 'onosof', title: 'ONOS openflow' },
219 { value: 'onos_vpls', title: 'ONOS vpls' }
221 /** Constants of the WIM Types */
222 export const WIM_TYPES: TYPESECTION[] = [
223 { value: 'arista', title: 'Arista' },
224 { value: 'dynpac', title: 'DynPac' },
225 { value: 'floodlightof', title: 'Floodlight openflow' },
226 { value: 'odlof', title: 'OpenDaylight openflow' },
227 { value: 'onosof', title: 'ONOS openflow' },
228 { value: 'onos_vpls', title: 'ONOS vpls' },
229 { value: 'tapi', title: 'TAPI' }
231 /** Constants of the OSM Repo Types */
232 export const OSMREPO_TYPES: TYPESECTION[] = [
233 { value: 'osm', title: 'OSM' }
235 /** Interface for List, Add WIM & SDN Types */
236 export interface TYPESECTION {
240 /** Interface for PRIMITIVETYPES */
241 export interface PRIMITIVETYPES {
245 /** Interface for the PRIMITIVEDATA */
246 export interface PRIMITIVEDATA {
249 /** Constant for VIM type Openstack's Config */
250 export const TYPEOPENSTACK: {} = {
253 sdn_port_mapping: '',
254 project_domain_id: '',
255 vim_network_name: '',
256 project_domain_name: '',
260 user_domain_name: '',
261 availability_zone: '',
264 dataplane_physical_net: '',
267 use_internal_endpoint: '',
270 use_existing_flavors: ''
272 /** Constant for VIM type AWS's Config */
273 export const TYPEAWS: {} = {
276 sdn_port_mapping: '',
278 vim_network_name: '',
284 /** Constant for VIM type VMWARE's Config */
285 export const TYPEVMWARE: {} = {
288 sdn_port_mapping: '',
290 vim_network_name: '',
295 vcenter_password: '',
304 /** Constant for VIM type OPENVIMNEBULA's Config */
305 export const TYPEOPENVIMNEBULA: {} = {
307 sdn_port_mapping: '',
308 vim_network_name: '',
311 /** Constant for VIM type AZURE's Config */
312 export const TYPEAZURE: {} = {
319 /** Constant for VIM other type Config */
320 export const TYPEOTERS: {} = {
322 sdn_port_mapping: '',
323 vim_network_name: '',
325 use_internal_endpoint: '',
327 use_existing_flavors: ''
329 /** Interface for Domains */
330 export interface DOMAINS {
331 project_domain_name: string;
332 user_domain_name: string;
334 /** Interface for Login */
335 export interface LOGINPARAMS {
338 old_password?: string;
340 /** Interface for the LABELVALUE */
341 export interface LABELVALUE {