Use find_test_caller in test_utils instead of in misc

find_test_caller is now moved from misc to test_utils, but there
are still some calling to find_test_caller which will cause "WARNING
tempest.lib.common.utils.misc [-] tempest.lib.common.utils.misc.
find_test_caller is deprecated in favor of tempest.lib.common.
utils.test_utils.find_test_caller".

Change-Id: Icbd4c7a45677b4bb031fc40d6b47dd6a72af6f02
This commit is contained in:
zhufl 2016-07-01 18:09:05 +08:00
parent 6406a4432d
commit 88c89b52aa
2 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ import copy
from oslo_log import log as logging
from tempest import exceptions
from tempest.lib.common.utils import misc as misc_utils
from tempest.lib.common.utils import test_utils
LOG = logging.getLogger(__name__)
@ -31,7 +31,7 @@ def get_network_from_name(name, compute_networks_client):
list returns a 404, there are no found networks, or the found network
is invalid
"""
caller = misc_utils.find_test_caller()
caller = test_utils.find_test_caller()
if not name:
raise exceptions.InvalidTestResource(type='network', name=name)
@ -84,7 +84,7 @@ def get_tenant_network(creds_provider, compute_networks_client,
tenant network is available in the creds provider
:returns: a dict with 'id' and 'name' of the network
"""
caller = misc_utils.find_test_caller()
caller = test_utils.find_test_caller()
net_creds = creds_provider.get_primary_creds()
network = getattr(net_creds, 'network', None)
if not network or not network.get('name'):

View File

@ -18,7 +18,7 @@ from oslo_log import log as logging
from tempest.common import image as common_image
from tempest import config
from tempest import exceptions
from tempest.lib.common.utils import misc as misc_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions as lib_exc
from tempest.lib.services.image.v1 import images_client as images_v1_client
@ -91,7 +91,7 @@ def wait_for_server_status(client, server_id, status, ready_wait=True,
'timeout': timeout})
message += ' Current status: %s.' % server_status
message += ' Current task state: %s.' % task_state
caller = misc_utils.find_test_caller()
caller = test_utils.find_test_caller()
if caller:
message = '(%s) %s' % (caller, message)
raise exceptions.TimeoutException(message)
@ -162,7 +162,7 @@ def wait_for_image_status(client, image_id, status):
'status': status,
'current_status': current_status,
'timeout': client.build_timeout})
caller = misc_utils.find_test_caller()
caller = test_utils.find_test_caller()
if caller:
message = '(%s) %s' % (caller, message)
raise exceptions.TimeoutException(message)
@ -235,7 +235,7 @@ def wait_for_bm_node_status(client, node_id, attr, status):
'status': status,
'timeout': client.build_timeout})
message += ' Current state of %s: %s.' % (attr, status_curr)
caller = misc_utils.find_test_caller()
caller = test_utils.find_test_caller()
if caller:
message = '(%s) %s' % (caller, message)
raise exceptions.TimeoutException(message)