diff options
author | Cedric Ollivier <cedric.ollivier@orange.com> | 2018-01-04 09:44:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-04 09:44:12 +0000 |
commit | 171a354252112e6b1590358120c818cc7ce20c3b (patch) | |
tree | f2d5ff5cc0e4a8744979b6b66f959914696d272d /functest/opnfv_tests/openstack | |
parent | ef1a20eb5cee095d6f8d15fba0ae533e9e4b9730 (diff) | |
parent | 6c466ea8e3fe2818f5efd0191d081ddf917b947d (diff) |
Merge "Config physical network when creating tempest net"
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r-- | functest/opnfv_tests/openstack/rally/rally.py | 18 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index c16e6d13..eefd3eb4 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -492,10 +492,28 @@ class RallyBase(testcase.TestCase): self.creators.append(image_creator) LOGGER.debug("Creating network '%s'...", network_name) + + rally_network_type = None + rally_physical_network = None + rally_segmentation_id = None + + if hasattr(CONST, 'rally_network_type'): + rally_network_type = CONST.__getattribute__( + 'rally_network_type') + if hasattr(CONST, 'rally_physical_network'): + rally_physical_network = CONST.__getattribute__( + 'rally_physical_network') + if hasattr(CONST, 'rally_segmentation_id'): + rally_segmentation_id = CONST.__getattribute__( + 'rally_segmentation_id') + network_creator = deploy_utils.create_network( self.os_creds, NetworkConfig( name=network_name, shared=True, + network_type=rally_network_type, + physical_network=rally_physical_network, + segmentation_id=rally_segmentation_id, subnet_settings=[SubnetConfig( name=subnet_name, cidr=self.RALLY_PRIVATE_SUBNET_CIDR) diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 58882b99..5481b13b 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -363,11 +363,29 @@ class TempestResourcesManager(object): user_id = None logger.debug("Creating private network for Tempest suite") + + tempest_network_type = None + tempest_physical_network = None + tempest_segmentation_id = None + + if hasattr(CONST, 'tempest_network_type'): + tempest_network_type = CONST.__getattribute__( + 'tempest_network_type') + if hasattr(CONST, 'tempest_physical_network'): + tempest_physical_network = CONST.__getattribute__( + 'tempest_physical_network') + if hasattr(CONST, 'tempest_segmentation_id'): + tempest_segmentation_id = CONST.__getattribute__( + 'tempest_segmentation_id') + network_creator = deploy_utils.create_network( self.os_creds, NetworkConfig( name=CONST.__getattribute__( 'tempest_private_net_name') + self.guid, project_name=project_name, + network_type=tempest_network_type, + physical_network=tempest_physical_network, + segmentation_id=tempest_segmentation_id, subnet_settings=[SubnetConfig( name=CONST.__getattribute__( 'tempest_private_subnet_name') + self.guid, |