Feature 11001: Robot framework linting for E2E tests
[osm/tests.git] / robot-systest / resources / basic_01-crud_operations_on_vim_targets_data.py
index ea31ace..2e3f95b 100644 (file)
@@ -15,19 +15,28 @@ import yaml
 from get_clouds_yaml_info import get_values_from_cloud, get_vim_values
 
 
+# Variables to be used by the testsuite
+VIM_ACCOUNT_TYPE = ""
+VIM_NAME_PREFIX = ""
+VIM_USER = ""
+VIM_PASSWORD = ""
+VIM_AUTH_URL = ""
+VIM_TENANT = ""
+VIM_CONFIG = ""
+
 # VIM configuration
 cloud_type = os.environ.get("CLOUD_TYPE", "openstack")
 if cloud_type == "openstack":
     # Openstack VIM
-    vim_account_type = "openstack"
-    vim_name_prefix = "basic01"
+    VIM_ACCOUNT_TYPE = "openstack"
+    VIM_NAME_PREFIX = "basic01"
     # Get credentias from Openstack Clouds file
     cloud, os_cloud = get_values_from_cloud()
     (
-        vim_user,
-        vim_password,
-        vim_auth_url,
-        vim_tenant,
+        VIM_USER,
+        VIM_PASSWORD,
+        VIM_AUTH_URL,
+        VIM_TENANT,
         vim_user_domain_name,
         vim_project_domain_name,
         vim_insecure,
@@ -41,7 +50,7 @@ if cloud_type == "openstack":
         vim_config_dict["user_domain_name"] = vim_user_domain_name
     if vim_insecure:
         vim_config_dict["insecure"] = True
-    vim_config = "'{}'".format(
+    VIM_CONFIG = "'{}'".format(
         yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip(
             "\r\n"
         )
@@ -49,12 +58,12 @@ if cloud_type == "openstack":
 
 elif cloud_type == "azure":
     # Azure VIM
-    vim_account_type = "azure"
-    vim_name_prefix = "basic01"
-    vim_auth_url = "http://www.azure.com"
-    vim_user = os.environ.get("AZURE_CLIENT_ID")
-    vim_password = os.environ.get("AZURE_SECRET")
-    vim_tenant = os.environ.get("AZURE_TENANT")
+    VIM_ACCOUNT_TYPE = "azure"
+    VIM_NAME_PREFIX = "basic01"
+    VIM_AUTH_URL = "http://www.azure.com"
+    VIM_USER = os.environ.get("AZURE_CLIENT_ID")
+    VIM_PASSWORD = os.environ.get("AZURE_SECRET")
+    VIM_TENANT = os.environ.get("AZURE_TENANT")
 
     # Extra config
     vim_config_dict = {}
@@ -68,7 +77,7 @@ elif cloud_type == "azure":
         vim_config_dict["vnet_name"] = os.environ.get("VNET_NAME")
     if "AZURE_FLAVORS_PATTERN" in os.environ:
         vim_config_dict["flavors_pattern"] = os.environ.get("AZURE_FLAVORS_PATTERN")
-    vim_config = "'{}'".format(
+    VIM_CONFIG = "'{}'".format(
         yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip(
             "\r\n"
         )