blob: 159b2c900c99b7cd3ee0df872daf2817704d17f7 [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 */
SANDHYA.JS4a7a5422021-05-15 15:35:22 +053021// tslint:disable: completed-docs
kumaran.m3b4814a2020-05-01 19:48:54 +053022import { NSInstanceDetails } from 'NSInstanceModel';
kumaran.m3b4814a2020-05-01 19:48:54 +053023/** Interface for VimAccountDetails */
24export interface VimAccountDetails {
25 description: string;
26 'vim_tenant_name': string;
27 schema_version: string;
28 schema_type: string;
29 config: CONFIG;
30 _id: string;
31 vim_password: string;
32 _admin: ADMIN;
33 vim_url: string;
34 vim_user: string;
35 vim_type: string;
36 name: string;
SANDHYA.JS4a7a5422021-05-15 15:35:22 +053037 resources?: RESOURCES;
kumaran.m3b4814a2020-05-01 19:48:54 +053038}
39
40/** Interface for _ADMIN */
41interface ADMIN {
42 projects_write: string[];
SANDHYA.JS4a7a5422021-05-15 15:35:22 +053043 deployed?: Deployed;
kumaran.m3b4814a2020-05-01 19:48:54 +053044 operationalState: string;
45 modified: string;
46 projects_read: string[];
47 'detailed-status': string;
48 created: string;
49}
50
51/** Interface for Deployed */
52interface Deployed {
53 'RO-account': string;
54 RO: string;
55}
56
57/** Interface for Config */
58export interface CONFIG {
59 sdn_controller?: string;
60 use_floating_ip?: string;
61 location?: string;
62 sdn_port_mapping?: string;
63 vim_network_name?: string;
64 security_groups?: string;
Barath Kumar R1245fc82021-04-16 13:34:06 +053065 availability_zone?: string;
kumaran.m3b4814a2020-05-01 19:48:54 +053066 region_name?: string;
67 insecure?: string;
68 use_existing_flavors?: string;
69 use_internal_endpoint?: string;
70 additional_conf?: string;
71 APIversion?: string;
72 project_domain_id?: string;
73 project_domain_name?: string;
74 user_domain_id?: string;
75 user_domain_name?: string;
76 keypair?: string;
77 dataplane_physical_net?: string;
78 microversion?: string;
79 vpc_cidr_block?: string;
80 flavor_info?: string;
81 orgname?: string;
82 vcenter_ip?: string;
83 vcenter_port?: string;
84 admin_username?: string;
85 vcenter_user?: string;
86 admin_password?: string;
87 vcenter_password?: string;
88 nsx_manager?: string;
89 vrops_site?: string;
90 nsx_user?: string;
91 vrops_user?: string;
92 nsx_password?: string;
93 vrops_password?: string;
94 subscription_id?: string;
95 resource_group?: string;
96 vnet_name?: string;
97 flavors_pattern?: string;
98}
99
100/** Interface for VIMData */
101export interface VIMData {
102 name?: string;
103 identifier: string;
104 'type': string;
105 operationalState: string;
106 description: string;
107 page?: string;
108 instancesData?: NSInstanceDetails[];
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530109 resources?: RESOURCES;
kumaran.m3b4814a2020-05-01 19:48:54 +0530110}
111/** Interface for VIMLOCATION */
112export interface VIMLOCATION {
113 features: FEATURES[];
114 'type': string;
115}
116/** Interface for FEATURES */
117export interface FEATURES {
118 geometry: GEOMETRY;
119 'type': string;
120 properties: PROPERTIES;
121}
122/** Interface for GEOMETRY */
123interface GEOMETRY {
124 coordinates: [];
125}
126/** Interface for PROPERTIES */
127interface PROPERTIES {
128 extent: [];
129 country: string;
130 name: string;
131 state: string;
132}
SANDHYA.JS4a7a5422021-05-15 15:35:22 +0530133/** Interface for the RESOURCES */
134export interface RESOURCES {
135 compute: object;
136 storage: object;
137 network: object;
138}
139/** Interface for the RESOURCESDATA */
140export interface RESOURCESDATA {
141 heading: string;
142 length: number;
143 data: RESOURCESCHARTDATA[];
144}
145/** Interface for the RESOURCESCHARTDATA */
146export interface RESOURCESCHARTDATA {
147 title: string;
148 values: CHARTVALUES;
149 data: number[];
150 colorValues: Color[];
151}
152/** Interface common use for the Chart */
153export interface CHARTVALUES {
154 total: number;
155 used?: number;
156 remaining?: number;
157}
158/** Interface for the CHARTRANGE */
159export interface CHARTRANGE {
160 percentage: number;
161 nearlyFull: number;
162 full: number;
163}
164/** Interface for the COLOR */
165export interface Color {
166 backgroundColor?: string[] | string;
167 borderColor?: string[] | string;
168}
169/** Constant Values for the resources titles */
170export enum CONFIGRESOURCESTITLE {
171 ram = 'RAM',
172 instances = 'Instances',
173 vcpus = 'VCPUs',
174 snapshots = 'Volume Snapshots',
175 storage = 'Volume Storage',
176 volumes = 'Volumes',
177 floating_ips = 'Floating IPs',
178 security_group = 'Security Group',
179 subnets = 'Subnets',
180 networks = 'Networks',
181 ports = 'Ports',
182 routers = 'Routers'
183}
184
185/** constant values for color */
186export enum RANGECOLOR {
187 used = '#29c3be',
188 nearlyfull = '#f0ad4e',
189 full = '#d9534f'
kumaran.m3b4814a2020-05-01 19:48:54 +0530190}