1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
15 from get_clouds_yaml_info
import get_values_from_cloud
, get_vim_values
18 # Variables to be used by the testsuite
19 VIM_ACCOUNT_TYPE
= "openstack"
20 VIM_NAME
= "basic_08_vim_test"
28 cloud_type
= os
.environ
.get("CLOUD_TYPE", "openstack")
29 if cloud_type
== "openstack":
31 VIM_ACCOUNT_TYPE
= "openstack"
32 vim_name_prefix
= "basic32"
33 # Get credentias from Openstack Clouds file
34 cloud
, os_cloud
= get_values_from_cloud()
41 vim_project_domain_name
,
43 ) = get_vim_values(cloud
, os_cloud
)
45 # Availability Zone config
46 vim_config_dict
= {"storage_availability_zone": "storage_az"}
47 VIM_CONFIG
= "'{}'".format(
48 yaml
.safe_dump(vim_config_dict
, default_flow_style
=True, width
=10000).rstrip(
54 raise Exception("VIM type not supported: '" + cloud_type
+ "'")