Remove some useless log messages
'Waiting for function _invoke_api to return' doesn't give any information and only makes log files hard to read. Also reduce logging when polling NFC leases. Change-Id: I08653a0f529a186405695cbcfb9fc9018c93f856
This commit is contained in:
parent
9b7e1deb2c
commit
c9357e8677
oslo_vmware
@ -119,7 +119,6 @@ class RetryDecorator(object):
|
||||
def func(*args, **kwargs):
|
||||
loop = loopingcall.DynamicLoopingCall(_func, *args, **kwargs)
|
||||
evt = loop.start(periodic_interval_max=self._max_sleep_time)
|
||||
LOG.debug("Waiting for function %s to return.", func_name)
|
||||
return evt.wait()
|
||||
|
||||
return func
|
||||
@ -463,13 +462,13 @@ class VMwareAPISession(object):
|
||||
|
||||
:param lease: lease whose state is to be polled
|
||||
"""
|
||||
LOG.debug("Invoking VIM API to read state of lease: %s.", lease)
|
||||
try:
|
||||
state = self.invoke_api(vim_util,
|
||||
'get_object_property',
|
||||
self.vim,
|
||||
lease,
|
||||
'state')
|
||||
'state',
|
||||
skip_op_id=True)
|
||||
except exceptions.VimException:
|
||||
with excutils.save_and_reraise_exception():
|
||||
LOG.exception(_LE("Error occurred while checking "
|
||||
|
@ -474,7 +474,8 @@ class VMwareAPISessionTest(base.TestCase):
|
||||
api_session.invoke_api.assert_called_with(vim_util,
|
||||
'get_object_property',
|
||||
api_session.vim, lease,
|
||||
'state')
|
||||
'state',
|
||||
skip_op_id=True)
|
||||
self.assertEqual(num_states, api_session.invoke_api.call_count)
|
||||
|
||||
def test_wait_for_lease_ready_with_error_state(self):
|
||||
@ -491,7 +492,8 @@ class VMwareAPISessionTest(base.TestCase):
|
||||
api_session.wait_for_lease_ready,
|
||||
lease)
|
||||
exp_calls = [mock.call(vim_util, 'get_object_property',
|
||||
api_session.vim, lease, 'state')] * 2
|
||||
api_session.vim, lease, 'state',
|
||||
skip_op_id=True)] * 2
|
||||
exp_calls.append(mock.call(vim_util, 'get_object_property',
|
||||
api_session.vim, lease, 'error'))
|
||||
self.assertEqual(exp_calls, api_session.invoke_api.call_args_list)
|
||||
@ -510,7 +512,8 @@ class VMwareAPISessionTest(base.TestCase):
|
||||
api_session.invoke_api.assert_called_once_with(vim_util,
|
||||
'get_object_property',
|
||||
api_session.vim,
|
||||
lease, 'state')
|
||||
lease, 'state',
|
||||
skip_op_id=True)
|
||||
|
||||
def test_wait_for_lease_ready_with_invoke_api_exception(self):
|
||||
api_session = self._create_api_session(True)
|
||||
@ -522,7 +525,7 @@ class VMwareAPISessionTest(base.TestCase):
|
||||
lease)
|
||||
api_session.invoke_api.assert_called_once_with(
|
||||
vim_util, 'get_object_property', api_session.vim, lease,
|
||||
'state')
|
||||
'state', skip_op_id=True)
|
||||
|
||||
def _poll_task_well_known_exceptions(self, fault,
|
||||
expected_exception):
|
||||
|
Loading…
x
Reference in New Issue
Block a user