summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack/rally
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-08-25 11:20:17 +0800
committerMorgan Richomme <morgan.richomme@orange.com>2016-08-26 08:45:19 +0000
commit22ff0e22d78a72e5190ac2acd5aa4da76adc4bce (patch)
tree2e060b693956ab112ce1dff28e489377c1057387 /testcases/OpenStack/rally
parentf3da85065e34b3058cace165443f6f919f959a0b (diff)
refactor create shared network process to eliminate reduplicate
Some places shared network is created through create_network_full first, then update it to shared, abstract a uniformed method to eliminate reduplicate JIRA: FUNCTEST-437 Change-Id: I13c20ab061323188c5eb3b8c861674df38083c62 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn> (cherry picked from commit 007868e4810aaf9a2664b030281fe7c818fc3494)
Diffstat (limited to 'testcases/OpenStack/rally')
-rwxr-xr-xtestcases/OpenStack/rally/run_rally-cert.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py
index 279bcde0e..f3eb79d26 100755
--- a/testcases/OpenStack/rally/run_rally-cert.py
+++ b/testcases/OpenStack/rally/run_rally-cert.py
@@ -408,22 +408,12 @@ def main():
exit(-1)
logger.debug("Creating network '%s'..." % PRIVATE_NET_NAME)
- network_dict = os_utils.create_network_full(neutron_client,
- PRIVATE_NET_NAME,
- PRIVATE_SUBNET_NAME,
- ROUTER_NAME,
- PRIVATE_SUBNET_CIDR)
+ network_dict = os_utils.create_shared_network_full(PRIVATE_NET_NAME,
+ PRIVATE_SUBNET_NAME,
+ ROUTER_NAME,
+ PRIVATE_SUBNET_CIDR)
if not network_dict:
- logger.error("Failed to create network...")
- exit(-1)
- else:
- if not os_utils.update_neutron_net(neutron_client,
- network_dict['net_id'],
- shared=True):
- logger.error("Failed to update network...")
- exit(-1)
- else:
- logger.debug("Network '%s' available..." % PRIVATE_NET_NAME)
+ exit(1)
if args.test_name == "all":
for test_name in tests: