aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py')
-rw-r--r--src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py32
1 files changed, 8 insertions, 24 deletions
diff --git a/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py b/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
index 0b13762..1a1cb3c 100644
--- a/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
+++ b/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
@@ -31,7 +31,6 @@ try:
SERVICE_NAME = next(iter(yaml_config_file.keys()))
except ValueError:
SERVICE_NAME = "" # Fill me
- VSP_FILE_PATH = "" # Fill me
CLOUD_REGION_CLOUD_OWNER = "clearwater-ims-cloud-owner"
CLOUD_REGION_TYPE = "openstack"
@@ -55,26 +54,11 @@ SERVICE_INSTANCE_NAME = "clearwater-ims_service_instance"
# Assuming a cloud.yaml is available, use the openstack client
# to retrieve cloud info and avoid data duplication
TEST_CLOUD = os.getenv('OS_TEST_CLOUD')
-try:
- if TEST_CLOUD is not None:
- cloud = openstack.connect(cloud=TEST_CLOUD)
- VIM_USERNAME = cloud.config.auth['username']
- VIM_PASSWORD = cloud.config.auth['password']
- VIM_SERVICE_URL = cloud.config.auth['auth_url']
- TENANT_ID = cloud.config.auth['project_id']
- TENANT_NAME = cloud.config.auth['project_name']
- CLOUD_REGION_ID = cloud.config.region_name
- CLOUD_DOMAIN = cloud.config.auth['project_domain_name']
- else:
- raise KeyError
-except KeyError:
- # If you do not use the cloud.yaml as imput for your openstack
- # put the input data here
- # Note if 1 parameter is missing in the clouds.yaml, we fallback here
- TENANT_ID = "" # Fill me
- TENANT_NAME = "" # Fill me
- VIM_USERNAME = "" # Fill me
- VIM_PASSWORD = "" # Fill me
- VIM_SERVICE_URL = "" # Fill me
- CLOUD_REGION_ID = "RegionOne" # Update me if needed
- CLOUD_DOMAIN = "Default" # Update me if needed
+cloud = openstack.connect(cloud=TEST_CLOUD)
+VIM_USERNAME = cloud.config.auth.get('username','Fill me')
+VIM_PASSWORD = cloud.config.auth.get('password','Fill me')
+VIM_SERVICE_URL = cloud.config.auth.get('auth_url','Fill me')
+TENANT_ID = cloud.config.auth.get('project_id','Fill me')
+TENANT_NAME = cloud.config.auth.get('project_name','Fill me')
+CLOUD_REGION_ID = cloud.config.get('region_name','RegionOne')
+CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name','Default')