aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/onaptests/configuration/ubuntu16_nomulticloud_settings.py (renamed from src/onaptests/configuration/ubuntu16_nomulticloud_noyaml_settings.py)14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/onaptests/configuration/ubuntu16_nomulticloud_noyaml_settings.py b/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py
index b3076f6..ae716e7 100644
--- a/src/onaptests/configuration/ubuntu16_nomulticloud_noyaml_settings.py
+++ b/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py
@@ -1,5 +1,6 @@
import os
import openstack
+from yaml import load
from .settings import * # pylint: disable=W0614
@@ -8,10 +9,18 @@ from .settings import * # pylint: disable=W0614
# pylint: disable=bad-whitespace
# The ONAP part
USE_MULTICLOUD = False
+SERVICE_YAML_TEMPLATE = "templates/vnf-services/ubuntu16test-service.yaml"
VENDOR_NAME = "basicvm_vendor"
VSP_NAME = "basicvm_ubuntu_vsp"
-SERVICE_NAME = "basicvm-ubuntu-service"
+try:
+ # Try to retrieve the SERVICE NAME from the yaml file
+ with open(SERVICE_YAML_TEMPLATE, "r") as yaml_template:
+ yaml_config_file = load(yaml_template)
+ SERVICE_NAME = next(iter(yaml_config_file.keys()))
+except ValueError:
+ SERVICE_NAME = "" # Fill me
+
VF_NAME = "basicvm_ubuntu_vf"
CLOUD_REGION_CLOUD_OWNER = "basicvm-cloud-owner"
@@ -30,10 +39,11 @@ PROJECT = "basicvm-project"
LINE_OF_BUSINESS = "basicvm-lob"
PLATFORM = "basicvm-platform"
-SERVICE_INSTANCE_NAME = "basicvm_ubuntu16_service_instance"
+SERVICE_INSTANCE_NAME = "basicvm_ubuntu16_service_instance_3"
VSP_FILE_PATH = "templates/heat_files/ubuntu16/ubuntu16.zip"
+
# The cloud Part
# Assuming a cloud.yaml is available, use the openstack client
# to retrieve cloud info and avoid data duplication