Fix Bug 2121: NG-UI uses unmaintained Chokidar version
[osm/NG-UI.git] / src / models / VimAccountModel.ts
1 /*
2  Copyright 2020 TATA ELXSI
3
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
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
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.
15
16  Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
17  */
18 /**
19  * @file  Model for VimAccount Details related information.
20  */
21 import { NSInstanceDetails } from 'NSInstanceModel';
22 /** Interface for VimAccountDetails */
23 export interface VimAccountDetails {
24     description: string;
25     'vim_tenant_name': string;
26     schema_version: string;
27     schema_type: string;
28     config: CONFIG;
29     _id: string;
30     vim_password: string;
31     _admin: ADMIN;
32     vim_url: string;
33     vim_user: string;
34     vim_type: string;
35     name: string;
36     resources?: RESOURCES;
37 }
38
39 /** Interface for _ADMIN */
40 interface ADMIN {
41     projects_write: string[];
42     deployed?: Deployed;
43     operationalState: string;
44     modified: string;
45     projects_read: string[];
46     'detailed-status': string;
47     created: string;
48 }
49
50 /** Interface for Deployed */
51 interface Deployed {
52     'RO-account': string;
53     RO: string;
54 }
55
56 /** Interface for Config */
57 export interface CONFIG {
58     sdn_controller?: string;
59     use_floating_ip?: string;
60     location?: string;
61     sdn_port_mapping?: string;
62     vim_network_name?: string;
63     security_groups?: string;
64     availability_zone?: string;
65     region_name?: string;
66     insecure?: string;
67     use_existing_flavors?: string;
68     use_internal_endpoint?: string;
69     additional_conf?: string;
70     APIversion?: string;
71     project_domain_id?: string;
72     project_domain_name?: string;
73     user_domain_id?: string;
74     user_domain_name?: string;
75     keypair?: string;
76     dataplane_physical_net?: string;
77     microversion?: string;
78     vpc_cidr_block?: string;
79     flavor_info?: string;
80     orgname?: string;
81     vcenter_ip?: string;
82     vcenter_port?: string;
83     admin_username?: string;
84     vcenter_user?: string;
85     admin_password?: string;
86     vcenter_password?: string;
87     nsx_manager?: string;
88     vrops_site?: string;
89     nsx_user?: string;
90     vrops_user?: string;
91     nsx_password?: string;
92     vrops_password?: string;
93     subscription_id?: string;
94     resource_group?: string;
95     vnet_name?: string;
96     flavors_pattern?: string;
97 }
98
99 /** Interface for VIMData */
100 export interface VIMData {
101     name?: string;
102     identifier: string;
103     'type': string;
104     operationalState: string;
105     description: string;
106     page?: string;
107     instancesData?: NSInstanceDetails[];
108     resources?: RESOURCES;
109 }
110 /** Interface for VIMLOCATION */
111 export interface VIMLOCATION {
112     features: FEATURES[];
113     'type': string;
114 }
115 /** Interface for FEATURES */
116 export interface FEATURES {
117     geometry: GEOMETRY;
118     'type': string;
119     properties: PROPERTIES;
120 }
121 /** Interface for GEOMETRY */
122 interface GEOMETRY {
123     coordinates: [];
124 }
125 /** Interface for PROPERTIES */
126 interface PROPERTIES {
127     extent: [];
128     country: string;
129     name: string;
130     state: string;
131 }
132 /** Interface for the RESOURCES */
133 export interface RESOURCES {
134     compute: object;
135     storage: object;
136     network: object;
137 }
138 /** Interface for the RESOURCESDATA */
139 export interface RESOURCESDATA {
140     heading: string;
141     length: number;
142     data: RESOURCESCHARTDATA[];
143 }
144 /** Interface for the RESOURCESCHARTDATA */
145 export interface RESOURCESCHARTDATA {
146     title: string;
147     values: CHARTVALUES;
148     data: CHARTDATA[];
149 }
150 /** Interface common use for the Chart */
151 export interface CHARTDATA {
152     data: number[];
153     backgroundColor?: string[] | string;
154     hoverBackgroundColor?: string[] | string;
155     hoverBorderColor?: string[] | string;
156 }
157 /** Interface common use for the Chart */
158 export interface CHARTVALUES {
159     total: number;
160     used?: number;
161     remaining?: number;
162 }
163 /** Interface for the CHARTRANGE */
164 export interface CHARTRANGE {
165     percentage: number;
166     nearlyFull: number;
167     full: number;
168 }
169 /** Interface for the COLOR */
170 export interface Color {
171     backgroundColor?: string[] | string;
172     borderColor?: string[] | string;
173 }
174 /** Constant Values for the resources titles */
175 export enum CONFIGRESOURCESTITLE {
176     ram = 'RAM',
177     instances = 'Instances',
178     vcpus = 'VCPUs',
179     snapshots = 'Volume Snapshots',
180     storage = 'Volume Storage',
181     volumes = 'Volumes',
182     floating_ips = 'Floating IPs',
183     security_group = 'Security Group',
184     subnets = 'Subnets',
185     networks = 'Networks',
186     ports = 'Ports',
187     routers = 'Routers'
188 }
189
190 /** constant values for color */
191 export enum RANGECOLOR {
192     used = '#29c3be',
193     nearlyfull = '#f0ad4e',
194     full = '#d9534f'
195 }