aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/configuration/multi_vnf_ubuntu_settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/configuration/multi_vnf_ubuntu_settings.py')
-rw-r--r--src/onaptests/configuration/multi_vnf_ubuntu_settings.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/onaptests/configuration/multi_vnf_ubuntu_settings.py b/src/onaptests/configuration/multi_vnf_ubuntu_settings.py
index 1b9d4a2..a23d72e 100644
--- a/src/onaptests/configuration/multi_vnf_ubuntu_settings.py
+++ b/src/onaptests/configuration/multi_vnf_ubuntu_settings.py
@@ -4,16 +4,19 @@ from pathlib import Path
import openstack
from jinja2 import Environment, PackageLoader
from onaptests.utils.resources import get_resource_location
+from .settings import IF_VALIDATION
from .settings import * # noqa
+
VNF_FILENAME_PREFIX = "multi-vnf-ubuntu"
SERVICE_NAME = f"multivnfubuntu{str(uuid.uuid4().hex)[:6]}"
+SERVICE_DETAILS = "Onboarding, distribution and instanitation of an Mutli VM service using macro"
# We need to create a service file with a random service name,
# to be sure that we force onboarding
def generate_service_config_yaml_file(filename):
- """ generate the service file with a random service name
+ """generate the service file with a random service name
from a jinja template"""
env = Environment(
@@ -25,7 +28,7 @@ def generate_service_config_yaml_file(filename):
file_name = get_resource_location(f"templates/vnf-services/{filename}.yaml")
- with open(file_name, 'w+') as file_to_write:
+ with open(file_name, 'w+', encoding="utf-8") as file_to_write:
file_to_write.write(rendered_template)
@@ -50,15 +53,16 @@ COMPLEX_DATA_CENTER_CODE = "nlt"
GLOBAL_CUSTOMER_ID = "ubuntu-customer"
-TEST_CLOUD = os.getenv('OS_TEST_CLOUD') # Get values from clouds.yaml
-cloud = openstack.connect(cloud=TEST_CLOUD)
-VIM_USERNAME = cloud.config.auth.get('username', 'nso')
-VIM_PASSWORD = cloud.config.auth.get('password', 'Password123')
-VIM_SERVICE_URL = cloud.config.auth.get('auth_url', 'https://10.195.194.215:5000')
-TENANT_ID = cloud.config.auth.get('project_id', 'e2710e84063b421fab08189818761d55')
-TENANT_NAME = cloud.config.auth.get('project_name', 'nso')
-CLOUD_REGION_ID = cloud.config.auth.get('region_name', 'nso215')
-CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name', 'Default')
+if not IF_VALIDATION:
+ TEST_CLOUD = os.getenv('OS_TEST_CLOUD') # Get values from clouds.yaml
+ cloud = openstack.connect(cloud=TEST_CLOUD)
+ VIM_USERNAME = cloud.config.auth.get('username', 'nso')
+ VIM_PASSWORD = cloud.config.auth.get('password', 'Password123')
+ VIM_SERVICE_URL = cloud.config.auth.get('auth_url', 'https://10.195.194.215:5000')
+ TENANT_ID = cloud.config.auth.get('project_id', 'e2710e84063b421fab08189818761d55')
+ TENANT_NAME = cloud.config.auth.get('project_name', 'nso')
+ CLOUD_REGION_ID = cloud.config.auth.get('region_name', 'nso215')
+ CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name', 'Default')
OWNING_ENTITY = "seb"
PROJECT = "Project-UbuntuDemo"