aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/configuration')
-rw-r--r--src/onaptests/configuration/basic_clamp_settings.py2
-rw-r--r--src/onaptests/configuration/basic_cnf_yaml_settings.py2
-rw-r--r--src/onaptests/configuration/basic_network_nomulticloud_settings.py2
-rw-r--r--src/onaptests/configuration/basic_onboard_settings.py2
-rw-r--r--src/onaptests/configuration/basic_vm_macro_settings.py2
-rw-r--r--src/onaptests/configuration/basic_vm_macro_stability_settings.py1
-rw-r--r--src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py1
-rw-r--r--src/onaptests/configuration/basic_vm_settings.py2
-rw-r--r--src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py2
-rw-r--r--src/onaptests/configuration/multi_vnf_ubuntu_settings.py82
-rw-r--r--src/onaptests/configuration/pnf_macro_settings.py3
11 files changed, 101 insertions, 0 deletions
diff --git a/src/onaptests/configuration/basic_clamp_settings.py b/src/onaptests/configuration/basic_clamp_settings.py
index 1c6ad61..c26c4e9 100644
--- a/src/onaptests/configuration/basic_clamp_settings.py
+++ b/src/onaptests/configuration/basic_clamp_settings.py
@@ -52,3 +52,5 @@ try:
except ValueError:
SERVICE_NAME = "" # Fill me
VF_NAME = "" # Fill me
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_cnf_yaml_settings.py b/src/onaptests/configuration/basic_cnf_yaml_settings.py
index b68b7df..38e551c 100644
--- a/src/onaptests/configuration/basic_cnf_yaml_settings.py
+++ b/src/onaptests/configuration/basic_cnf_yaml_settings.py
@@ -79,3 +79,5 @@ VIM_PASSWORD = cloud.config.auth.get('password','dummy123')
VIM_SERVICE_URL = cloud.config.auth.get('auth_url','http://10.12.25.2:5000/v3')
TENANT_ID = cloud.config.auth.get('project_id','123456')
TENANT_NAME = cloud.config.auth.get('project_name','dummy_test')
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_network_nomulticloud_settings.py b/src/onaptests/configuration/basic_network_nomulticloud_settings.py
index cc22601..ab9e5ab 100644
--- a/src/onaptests/configuration/basic_network_nomulticloud_settings.py
+++ b/src/onaptests/configuration/basic_network_nomulticloud_settings.py
@@ -66,3 +66,5 @@ 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.auth.get('region_name','RegionOne')
CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name','Default')
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_onboard_settings.py b/src/onaptests/configuration/basic_onboard_settings.py
index db7680d..2fa1820 100644
--- a/src/onaptests/configuration/basic_onboard_settings.py
+++ b/src/onaptests/configuration/basic_onboard_settings.py
@@ -66,3 +66,5 @@ VENDOR_NAME = "basic_onboard_vendor"
VF_NAME = "basic_onboard_vf"
VSP_NAME = "basic_onboard_vsp"
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_vm_macro_settings.py b/src/onaptests/configuration/basic_vm_macro_settings.py
index b29cd1d..2784f86 100644
--- a/src/onaptests/configuration/basic_vm_macro_settings.py
+++ b/src/onaptests/configuration/basic_vm_macro_settings.py
@@ -59,3 +59,5 @@ except (FileNotFoundError, ValueError):
raise onap_test_exceptions.TestConfigurationException
SERVICE_INSTANCE_NAME = f"basic_macro_{str(uuid4())}"
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_vm_macro_stability_settings.py b/src/onaptests/configuration/basic_vm_macro_stability_settings.py
index 06938c4..b2fe037 100644
--- a/src/onaptests/configuration/basic_vm_macro_stability_settings.py
+++ b/src/onaptests/configuration/basic_vm_macro_stability_settings.py
@@ -2,3 +2,4 @@ from .basic_vm_macro_settings import * # pylint: disable=W0614
SERVICE_YAML_TEMPLATE = Path(Path(__file__).parent.parent, "templates/vnf-services/" +
"basic_vm_macro_stability-service.yaml")
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py b/src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py
index 437bd13..51c74e5 100644
--- a/src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py
+++ b/src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py
@@ -41,3 +41,4 @@ PLATFORM = "sdktests_platform"
SERVICE_INSTANCE_NAME = "sdktests_service_instance_name"
SERVICE_YAML_TEMPLATE = sys.path[-1] + "/onaptests/templates/vnf-services/basic_vm-service.yaml"
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/basic_vm_settings.py b/src/onaptests/configuration/basic_vm_settings.py
index a62e0b1..2c7d85f 100644
--- a/src/onaptests/configuration/basic_vm_settings.py
+++ b/src/onaptests/configuration/basic_vm_settings.py
@@ -70,3 +70,5 @@ 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.auth.get('region_name','RegionOne')
CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name','Default')
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py b/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
index 1a1cb3c..d20d9ff 100644
--- a/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
+++ b/src/onaptests/configuration/clearwater_ims_nomulticloud_settings.py
@@ -62,3 +62,5 @@ 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')
+
+MODEL_YAML_TEMPLATE = None
diff --git a/src/onaptests/configuration/multi_vnf_ubuntu_settings.py b/src/onaptests/configuration/multi_vnf_ubuntu_settings.py
new file mode 100644
index 0000000..47795fd
--- /dev/null
+++ b/src/onaptests/configuration/multi_vnf_ubuntu_settings.py
@@ -0,0 +1,82 @@
+import uuid
+import os
+import sys
+from pathlib import Path
+import openstack
+from jinja2 import Environment, PackageLoader
+from .settings import * # pylint: disable=W0614
+
+VNF_FILENAME_PREFIX = "multi-vnf-ubuntu"
+SERVICE_NAME = f"multivnfubuntu{str(uuid.uuid4().hex)[:6]}"
+
+
+# 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
+ from a jinja template"""
+
+ env = Environment(
+ loader=PackageLoader('onaptests', 'templates/vnf-services'),
+ )
+ template = env.get_template(f"{filename}.yaml.j2")
+
+ rendered_template = template.render(service_name=SERVICE_NAME)
+
+ file_name = (sys.path[-1] + "/onaptests/templates/vnf-services/" +
+ f"{filename}.yaml")
+
+ with open(file_name, 'w+') as file_to_write:
+ file_to_write.write(rendered_template)
+
+
+CLEANUP_FLAG = True
+
+CDS_DD_FILE = Path(Path(__file__).parent.parent, "templates/artifacts/dd_nso_ubuntu.json")
+CDS_CBA_UNENRICHED = Path(Path(__file__).parent.parent, "templates/artifacts/nso_ubuntuvnf.zip")
+CDS_CBA_ENRICHED = "/tmp/UBUNTUVNF_enriched.zip"
+
+ONLY_INSTANTIATE = False
+USE_MULTICLOUD = False
+
+CLOUD_REGION_CLOUD_OWNER = "Bell-IaaS"
+CLOUD_REGION_TYPE = "openstack"
+CLOUD_REGION_VERSION = "v1"
+CLOUD_OWNER_DEFINED_TYPE = "VNF"
+
+AVAILABILITY_ZONE_NAME = "z1"
+AVAILABILITY_ZONE_TYPE = "nova"
+COMPLEX_PHYSICAL_LOCATION_ID = "nso-lab-ltec"
+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')
+
+OWNING_ENTITY = "seb"
+PROJECT = "Project-UbuntuDemo"
+LINE_OF_BUSINESS = "wireless"
+PLATFORM = "iaas-openstack"
+CLOUD_DOMAIN = "Default"
+
+VENDOR_NAME = 'ubuntu_xtesting_vendor'
+
+SERVICE_YAML_TEMPLATE = Path(Path(__file__).parent.parent, "templates/vnf-services/" +
+ f"{VNF_FILENAME_PREFIX}-service.yaml")
+
+MODEL_YAML_TEMPLATE = Path(Path(__file__).parent.parent, "templates/vnf-services/" +
+ f"{VNF_FILENAME_PREFIX}-model.yaml")
+
+
+generate_service_config_yaml_file(f"{VNF_FILENAME_PREFIX}-service")
+generate_service_config_yaml_file(f"{VNF_FILENAME_PREFIX}-model")
+
+SERVICE_INSTANCE_NAME = f"{SERVICE_NAME}_svc"
diff --git a/src/onaptests/configuration/pnf_macro_settings.py b/src/onaptests/configuration/pnf_macro_settings.py
index d9ccb1b..515fce1 100644
--- a/src/onaptests/configuration/pnf_macro_settings.py
+++ b/src/onaptests/configuration/pnf_macro_settings.py
@@ -48,3 +48,6 @@ SERVICE_INSTANCE_NAME = "TestPNFMacroInstantiation"
DCAE_VES_COLLECTOR_POD_NAME = "dcae-ves-collector"
PNF_WAIT_TIME = 60.0
PNF_REGISTRATION_NUMBER_OF_TRIES = 20
+
+# Disable YAML SDC model definition which means all SDC config reside in SERVICE_YAML_TEMPLATE
+MODEL_YAML_TEMPLATE = None