diff options
Diffstat (limited to 'testcases')
-rwxr-xr-x | testcases/OpenStack/tempest/run_tempest.py | 4 | ||||
-rwxr-xr-x | testcases/OpenStack/vPing/vping.py | 5 | ||||
-rw-r--r-- | testcases/OpenStack/vPing/vping_util.py | 4 | ||||
-rwxr-xr-x | testcases/features/promise.py | 6 | ||||
-rwxr-xr-x | testcases/features/sfc/set-up-tacker.sh | 1 | ||||
-rwxr-xr-x | testcases/vnf/vIMS/vIMS.py | 4 |
6 files changed, 10 insertions, 14 deletions
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py index 7d023f5df..64a5ed778 100755 --- a/testcases/OpenStack/tempest/run_tempest.py +++ b/testcases/OpenStack/tempest/run_tempest.py @@ -132,12 +132,12 @@ def create_tempest_resources(): tenant_id = os_utils.create_tenant(keystone_client, TENANT_NAME, TENANT_DESCRIPTION) - if tenant_id == '': + if not tenant_id: logger.error("Error : Failed to create %s tenant" % TENANT_NAME) user_id = os_utils.create_user(keystone_client, USER_NAME, USER_PASSWORD, None, tenant_id) - if user_id == '': + if not user_id: logger.error("Error : Failed to create %s user" % USER_NAME) logger.debug("Creating private network for Tempest suite") diff --git a/testcases/OpenStack/vPing/vping.py b/testcases/OpenStack/vPing/vping.py index 039e7ec5a..168ed4f8f 100755 --- a/testcases/OpenStack/vPing/vping.py +++ b/testcases/OpenStack/vPing/vping.py @@ -23,8 +23,6 @@ import functest.utils.functest_logger as ft_logger import vping_util as util parser = argparse.ArgumentParser() -image_exists = False - parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") parser.add_argument("-r", "--report", help="Create json result file", @@ -52,8 +50,7 @@ def main(): vmname_1 = util.get_vmname_1() vmname_2 = util.get_vmname_2() - global image_exists - image_exists, image_id = util.create_image() + image_id = util.create_image() flavor = util.get_flavor() diff --git a/testcases/OpenStack/vPing/vping_util.py b/testcases/OpenStack/vPing/vping_util.py index d3e081f6d..c16c5d659 100644 --- a/testcases/OpenStack/vPing/vping_util.py +++ b/testcases/OpenStack/vPing/vping_util.py @@ -153,7 +153,6 @@ def create_image(): image_id = os_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME) if image_id != '': logger.info("Using existing image '%s'..." % GLANCE_IMAGE_NAME) - image_exists = True else: logger.info("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME, GLANCE_IMAGE_PATH)) @@ -166,9 +165,8 @@ def create_image(): exit(EXIT_CODE) logger.debug("Image '%s' with ID=%s created successfully." % (GLANCE_IMAGE_NAME, image_id)) - image_exists = True - return image_exists, image_id + return image_id def get_flavor(): diff --git a/testcases/features/promise.py b/testcases/features/promise.py index 170f75494..f5db02617 100755 --- a/testcases/features/promise.py +++ b/testcases/features/promise.py @@ -87,7 +87,7 @@ def main(): logger.info("Creating tenant '%s'..." % TENANT_NAME) tenant_id = openstack_utils.create_tenant( keystone, TENANT_NAME, TENANT_DESCRIPTION) - if tenant_id == '': + if not tenant_id: logger.error("Error : Failed to create %s tenant" % TENANT_NAME) exit(-1) logger.debug("Tenant '%s' created successfully." % TENANT_NAME) @@ -114,7 +114,7 @@ def main(): user_id = openstack_utils.create_user( keystone, USER_NAME, USER_PWD, None, tenant_id) - if user_id == '': + if not user_id: logger.error("Error : Failed to create %s user" % USER_NAME) exit(-1) logger.debug("User '%s' created successfully." % USER_NAME) @@ -171,7 +171,7 @@ def main(): SUBNET_NAME, ROUTER_NAME, SUBNET_CIDR) - if network_dic is False: + if not network_dic: logger.error("Failed to create the private network...") exit(-1) diff --git a/testcases/features/sfc/set-up-tacker.sh b/testcases/features/sfc/set-up-tacker.sh index e88893391..8098ad997 100755 --- a/testcases/features/sfc/set-up-tacker.sh +++ b/testcases/features/sfc/set-up-tacker.sh @@ -1,3 +1,4 @@ +apt-get install -y git-core git clone https://gerrit.opnfv.org/gerrit/fuel fuel pushd fuel git checkout e7f7abc89161441548545f79f0299610c6e5b203 diff --git a/testcases/vnf/vIMS/vIMS.py b/testcases/vnf/vIMS/vIMS.py index dfbb6759c..373761794 100755 --- a/testcases/vnf/vIMS/vIMS.py +++ b/testcases/vnf/vIMS/vIMS.py @@ -277,7 +277,7 @@ def main(): tenant_id = os_utils.create_tenant( keystone, TENANT_NAME, TENANT_DESCRIPTION) - if tenant_id == '': + if not tenant_id: step_failure("init", "Error : Failed to create " + TENANT_NAME + " tenant") @@ -296,7 +296,7 @@ def main(): user_id = os_utils.create_user( keystone, TENANT_NAME, TENANT_NAME, None, tenant_id) - if user_id == '': + if not user_id: logger.error("Error : Failed to create %s user" % TENANT_NAME) logger.info("Update OpenStack creds informations") |