aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/ci/config_functest.yaml5
-rw-r--r--functest/opnfv_tests/openstack/snaps/health_check.py3
-rw-r--r--functest/opnfv_tests/openstack/snaps/smoke.py3
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_suite_builder.py15
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py5
5 files changed, 23 insertions, 8 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index 2f108a1d..70615710 100644
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -57,6 +57,11 @@ snaps:
centos:
disk_file:
/home/opnfv/functest/images/CentOS-7-x86_64-GenericCloud.qcow2
+ # netconf_override:
+ # network_type: vlan
+ # physical_network: physnet2
+ # segmentation_id: 2366
+
# All of these values are optional and will override the values retrieved
# by the RC file
# os_creds_override:
diff --git a/functest/opnfv_tests/openstack/snaps/health_check.py b/functest/opnfv_tests/openstack/snaps/health_check.py
index 1b8d0537..837c2eae 100644
--- a/functest/opnfv_tests/openstack/snaps/health_check.py
+++ b/functest/opnfv_tests/openstack/snaps/health_check.py
@@ -40,5 +40,6 @@ class HealthCheck(SnapsTestRunner):
ext_net_name=self.ext_net_name,
use_keystone=self.use_keystone,
flavor_metadata=self.flavor_metadata,
- image_metadata=self.image_metadata))
+ image_metadata=self.image_metadata,
+ netconf_override=self.netconf_override))
return super(self.__class__, self).run()
diff --git a/functest/opnfv_tests/openstack/snaps/smoke.py b/functest/opnfv_tests/openstack/snaps/smoke.py
index 537315e7..ded149d0 100644
--- a/functest/opnfv_tests/openstack/snaps/smoke.py
+++ b/functest/opnfv_tests/openstack/snaps/smoke.py
@@ -39,5 +39,6 @@ class SnapsSmoke(SnapsTestRunner):
use_keystone=self.use_keystone,
flavor_metadata=self.flavor_metadata,
image_metadata=self.image_metadata,
- use_floating_ips=self.use_fip)
+ use_floating_ips=self.use_fip,
+ netconf_override=self.netconf_override)
return super(self.__class__, self).run()
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_suite_builder.py b/functest/opnfv_tests/openstack/snaps/snaps_suite_builder.py
index fb20e4fd..3e7c0a39 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_suite_builder.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_suite_builder.py
@@ -230,6 +230,7 @@ def add_openstack_api_tests(suite, os_creds, ext_net_name, use_keystone=True,
def add_openstack_integration_tests(suite, os_creds, ext_net_name,
use_keystone=True, flavor_metadata=None,
image_metadata=None, use_floating_ips=True,
+ netconf_override=None,
log_level=logging.INFO):
"""
Adds tests written to exercise all long-running OpenStack integration tests
@@ -251,6 +252,8 @@ def add_openstack_integration_tests(suite, os_creds, ext_net_name,
(i.e. {'hw:mem_page_size': 'large'})
:param use_floating_ips: when true, all tests requiring Floating IPs will
be added to the suite
+ :param netconf_override: dict() containing the reconfigured network_type,
+ physical_network and segmentation_id
:param log_level: the logging level
:return: None as the tests will be adding to the 'suite' parameter object
"""
@@ -355,32 +358,32 @@ def add_openstack_integration_tests(suite, os_creds, ext_net_name,
CreateInstanceSimpleTests, os_creds=os_creds,
ext_net_name=ext_net_name, use_keystone=use_keystone,
flavor_metadata=flavor_metadata, image_metadata=image_metadata,
- log_level=log_level))
+ netconf_override=netconf_override, log_level=log_level))
suite.addTest(OSIntegrationTestCase.parameterize(
CreateInstancePortManipulationTests, os_creds=os_creds,
ext_net_name=ext_net_name, use_keystone=use_keystone,
flavor_metadata=flavor_metadata, image_metadata=image_metadata,
- log_level=log_level))
+ netconf_override=netconf_override, log_level=log_level))
suite.addTest(OSIntegrationTestCase.parameterize(
InstanceSecurityGroupTests, os_creds=os_creds,
ext_net_name=ext_net_name, use_keystone=use_keystone,
flavor_metadata=flavor_metadata, image_metadata=image_metadata,
- log_level=log_level))
+ netconf_override=netconf_override, log_level=log_level))
suite.addTest(OSIntegrationTestCase.parameterize(
CreateInstanceOnComputeHost, os_creds=os_creds,
ext_net_name=ext_net_name, use_keystone=use_keystone,
flavor_metadata=flavor_metadata, image_metadata=image_metadata,
- log_level=log_level))
+ netconf_override=netconf_override, log_level=log_level))
suite.addTest(OSIntegrationTestCase.parameterize(
CreateInstanceFromThreePartImage, os_creds=os_creds,
ext_net_name=ext_net_name, use_keystone=use_keystone,
flavor_metadata=flavor_metadata, image_metadata=image_metadata,
- log_level=log_level))
+ netconf_override=netconf_override, log_level=log_level))
suite.addTest(OSIntegrationTestCase.parameterize(
CreateInstanceVolumeTests, os_creds=os_creds,
ext_net_name=ext_net_name, use_keystone=use_keystone,
flavor_metadata=flavor_metadata, image_metadata=image_metadata,
- log_level=log_level))
+ netconf_override=netconf_override, log_level=log_level))
suite.addTest(OSIntegrationTestCase.parameterize(
CreateStackSuccessTests, os_creds=os_creds, ext_net_name=ext_net_name,
use_keystone=use_keystone,
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 023f1bbd..6dc8288b 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
@@ -41,6 +41,11 @@ class SnapsTestRunner(unit.Suite):
else:
self.ext_net_name = snaps_utils.get_ext_net_name(self.os_creds)
+ self.netconf_override = None
+ if hasattr(CONST, 'snaps_network_config'):
+ self.netconf_override = CONST.__getattribute__(
+ 'snaps_network_config')
+
self.use_fip = (
CONST.__getattribute__('snaps_use_floating_ips') == 'True')
self.use_keystone = (