diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-08-23 14:27:51 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-08-23 18:05:14 +0800 |
commit | 3e95a1cd0721924e89e2cfd2960d4736bc6c5588 (patch) | |
tree | bdf6513aab04c9ed1ed5f7bcabf10b9a72e93490 /testcases/vnf | |
parent | 43a98904445a7151b586f996ae5d0e858fa24b98 (diff) |
when create/get/update failed return None rather than False
In openstack_util.py, when create/get/update network or other resources failed,
False is returned, which is incompatible with success return value such as id, network_nic.
JIRA: FUNCTEST-427
Change-Id: Id2f55d8524e5aff150ba6bfb799085377a63baa4
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testcases/vnf')
-rwxr-xr-x | testcases/vnf/vIMS/vIMS.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testcases/vnf/vIMS/vIMS.py b/testcases/vnf/vIMS/vIMS.py index dfbb6759..37376179 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") |