blob: 433727626416fbfafc82c57104d1b8122a5b91cd [file] [log] [blame]
kumaran.m3b4814a2020-05-01 19:48:54 +05301/*
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 */
kumaran.m3b4814a2020-05-01 19:48:54 +053021import { NSInstanceDetails } from 'NSInstanceModel';
kumaran.m3b4814a2020-05-01 19:48:54 +053022/** Interface for VimAccountDetails */
23export 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;
SANDHYA.JS4a7a5422021-05-15 15:35:22 +053036 resources?: RESOURCES;
kumaran.m3b4814a2020-05-01 19:48:54 +053037}
38
39/** Interface for _ADMIN */
40interface ADMIN {
41 projects_write: string[];
SANDHYA.JS4a7a5422021-05-15 15:35:22 +053042 deployed?: Deployed;
kumaran.m3b4814a2020-05-01 19:48:54 +053043 operationalState: string;
44 modified: string;
45 projects_read: string[];
46 'detailed-status': string;
47 created: string;
48}
49
50/** Interface for Deployed */
51interface Deployed {
52 'RO-account': string;
53 RO: string;
54}
55
56/** Interface for Config */
57export 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;
Barath Kumar R1245fc82021-04-16 13:34:06 +053064 availability_zone?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053065 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 */
100export interface VIMData {
101 name?: string;
102 identifier: string;
103 'type': string;
104 operationalState: string;
105 description: string;
106 page?: string;
107 instancesData?: NSInstanceDetails[];
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530108 resources?: RESOURCES;
kumaran.m3b4814a2020-05-01 19:48:54 +0530109}
110/** Interface for VIMLOCATION */
111export interface VIMLOCATION {
112 features: FEATURES[];
113 'type': string;
114}
115/** Interface for FEATURES */
116export interface FEATURES {
117 geometry: GEOMETRY;
118 'type': string;
119 properties: PROPERTIES;
120}
121/** Interface for GEOMETRY */
122interface GEOMETRY {
123 coordinates: [];
124}
125/** Interface for PROPERTIES */
126interface PROPERTIES {
127 extent: [];
128 country: string;
129 name: string;
130 state: string;
131}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530132/** Interface for the RESOURCES */
133export interface RESOURCES {
134 compute: object;
135 storage: object;
136 network: object;
137}
138/** Interface for the RESOURCESDATA */
139export interface RESOURCESDATA {
140 heading: string;
141 length: number;
142 data: RESOURCESCHARTDATA[];
143}
144/** Interface for the RESOURCESCHARTDATA */
145export interface RESOURCESCHARTDATA {
146 title: string;
147 values: CHARTVALUES;
SANDHYA.JS0a34dfa2023-04-25 23:59:41 +0530148 data: CHARTDATA[];
149}
150/** Interface common use for the Chart */
151export interface CHARTDATA {
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530152 data: number[];
SANDHYA.JS0a34dfa2023-04-25 23:59:41 +0530153 backgroundColor?: string[] | string;
154 hoverBackgroundColor?: string[] | string;
155 hoverBorderColor?: string[] | string;
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530156}
157/** Interface common use for the Chart */
158export interface CHARTVALUES {
159 total: number;
160 used?: number;
161 remaining?: number;
162}
163/** Interface for the CHARTRANGE */
164export interface CHARTRANGE {
165 percentage: number;
166 nearlyFull: number;
167 full: number;
168}
169/** Interface for the COLOR */
170export interface Color {
171 backgroundColor?: string[] | string;
172 borderColor?: string[] | string;
173}
174/** Constant Values for the resources titles */
175export 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 */
191export enum RANGECOLOR {
192 used = '#29c3be',
193 nearlyfull = '#f0ad4e',
194 full = '#d9534f'
kumaran.m3b4814a2020-05-01 19:48:54 +0530195}