aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-12-27 01:35:01 +0000
committerLinda Wang <wangwulin@huawei.com>2017-12-27 02:24:25 +0000
commit6c466ea8e3fe2818f5efd0191d081ddf917b947d (patch)
treebad20eff4f59b2124615a2742fc001a203135c09 /functest/opnfv_tests/openstack/tempest
parentc411e0a16b804792c1b34cc819618e1bfbca3d9a (diff)
Config physical network when creating tempest net
When the network_type is vlan, physical_network and segmentation_id could be configured. This also supports to config physical network when creating rally net. Change-Id: I9770968537c1509c5712eada66925a4bf8f6678c Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py18
1 files changed, 18 insertions, 0 deletions
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,