diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-07-19 14:18:08 +0200 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-07-19 12:22:20 +0000 |
commit | 0f5113627629c6f858b697a0b3ff141c9492d564 (patch) | |
tree | f08418f28f25c675248d28fba4d235f5f1a9fc9d /testcases/OpenStack/vPing/vPing_userdata.py | |
parent | e1b54d27342edb88879fb1d32def49abb603a32a (diff) |
Exit with -1 return code if something fails in vping tests
Also, turn off debug info from paramiko python module in vping_ssh
JIRA: FUNCTEST-373
JIRA: FUNCTEST-374
Change-Id: I6168cae85db91b2dd6ceac591f12dd9295786b59
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/OpenStack/vPing/vPing_userdata.py')
-rwxr-xr-x | testcases/OpenStack/vPing/vPing_userdata.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testcases/OpenStack/vPing/vPing_userdata.py b/testcases/OpenStack/vPing/vPing_userdata.py index 8ea7d7905..164aea66f 100755 --- a/testcases/OpenStack/vPing/vPing_userdata.py +++ b/testcases/OpenStack/vPing/vPing_userdata.py @@ -195,7 +195,7 @@ def main(): GLANCE_IMAGE_PATH) if not image_id: logger.error("Failed to create a Glance image...") - return(EXIT_CODE) + exit(EXIT_CODE) logger.debug("Image '%s' with ID=%s created successfully." % (GLANCE_IMAGE_NAME, image_id)) @@ -208,7 +208,7 @@ def main(): if not network_dic: logger.error( "There has been a problem when creating the neutron network") - return(EXIT_CODE) + exit(EXIT_CODE) network_id = network_dic["net_id"] create_security_group(neutron_client) @@ -259,7 +259,7 @@ def main(): logger.error("Instance '%s' cannot be booted. Status is '%s'" % ( NAME_VM_1, os_utils.get_instance_status(nova_client, vm1))) - return (EXIT_CODE) + exit(EXIT_CODE) else: logger.info("Instance '%s' is ACTIVE." % NAME_VM_1) @@ -294,7 +294,7 @@ def main(): if not waitVmActive(nova_client, vm2): logger.error("Instance '%s' cannot be booted. Status is '%s'" % ( NAME_VM_2, os_utils.get_instance_status(nova_client, vm2))) - return (EXIT_CODE) + exit(EXIT_CODE) else: logger.info("Instance '%s' is ACTIVE." % NAME_VM_2) |