aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sfc/lib/config.py13
-rw-r--r--sfc/tests/functest/config.yaml4
-rw-r--r--sfc/tests/functest/sfc_parent_function.py9
3 files changed, 26 insertions, 0 deletions
diff --git a/sfc/lib/config.py b/sfc/lib/config.py
index 69e1769d..e6149081 100644
--- a/sfc/lib/config.py
+++ b/sfc/lib/config.py
@@ -103,6 +103,19 @@ class CommonConfig(object):
"defaults.image_format", self.config_file)
self.image_url = ft_utils.get_parameter_from_yaml(
"defaults.image_url", self.config_file)
+ try:
+ self.vnf_image_name = ft_utils.get_parameter_from_yaml(
+ "defaults.vnf_image_name", self.config_file)
+ self.vnf_image_url = ft_utils.get_parameter_from_yaml(
+ "defaults.vnf_image_url", self.config_file)
+ self.vnf_image_format = ft_utils.get_parameter_from_yaml(
+ "defaults.vnf_image_format", self.config_file)
+ except ValueError:
+ # If the parameter does not exist we use the default
+ self.vnf_image_name = self.image_name
+ self.vnf_image_url = self.image_url
+ self.vnf_image_format = self.image_format
+
self.dir_functest_data = getattr(config.CONF, 'dir_functest_data')
diff --git a/sfc/tests/functest/config.yaml b/sfc/tests/functest/config.yaml
index d18a0033..9c743553 100644
--- a/sfc/tests/functest/config.yaml
+++ b/sfc/tests/functest/config.yaml
@@ -25,6 +25,10 @@ defaults:
vnfd-dir: "vnfd-templates"
vnfd-default-params-file: "test-vnfd-default-params.yaml"
+ # [OPTIONAL] Only when deploying VNFs without the default image (vxlan_tool)
+ # vnf_image_name: xxx
+ # vnf_image_format: yyy
+ # vnf_image_url: zzz
testcases:
sfc_one_chain_two_service_functions:
diff --git a/sfc/tests/functest/sfc_parent_function.py b/sfc/tests/functest/sfc_parent_function.py
index 336d8d42..a16fa6a7 100644
--- a/sfc/tests/functest/sfc_parent_function.py
+++ b/sfc/tests/functest/sfc_parent_function.py
@@ -33,6 +33,7 @@ class SfcCommonTestCase(object):
self.router = None
self.sg = None
self.image_creator = None
+ self.vnf_image_creator = None
self.creators = None
self.odl_ip = None
self.odl_port = None
@@ -133,6 +134,14 @@ class SfcCommonTestCase(object):
self.sg = openstack_sfc.create_security_group(
testcase_config.secgroup_name)
+ # Image for the vnf is registered
+ self.vnf_image_creator = openstack_sfc.register_glance_image(
+ COMMON_CONFIG.vnf_image_name,
+ COMMON_CONFIG.vnf_image_url,
+ COMMON_CONFIG.vnf_image_format,
+ 'public')
+
+ # Image for the client/server is registered
self.image_creator = openstack_sfc.register_glance_image(
COMMON_CONFIG.image_name,
COMMON_CONFIG.image_url,