Follow-up patch for 7c5a04c114
This patch addresses the change in message text suggested in the
review 7c5a04c114
.
Change-Id: Iddb693e4271a12d28f5b8eb954a4579d5a5d2571
This commit is contained in:
parent
40af9848ac
commit
8d3aa1bb28
|
@ -82,9 +82,9 @@ class AgentClient(object):
|
||||||
try:
|
try:
|
||||||
response = self.session.post(url, params=request_params, data=body)
|
response = self.session.post(url, params=request_params, data=body)
|
||||||
except requests.ConnectionError as e:
|
except requests.ConnectionError as e:
|
||||||
msg = (_('Failed to invoke agent command %(method)s for node '
|
msg = (_('Failed to connect to the agent running on node %(node)s '
|
||||||
'%(node)s. Error: %(error)s') %
|
'for invoking command %(method)s. Error: %(error)s') %
|
||||||
{'method': method, 'node': node.uuid, 'error': e})
|
{'node': node.uuid, 'method': method, 'error': e})
|
||||||
LOG.error(msg)
|
LOG.error(msg)
|
||||||
raise exception.AgentConnectionFailed(reason=msg)
|
raise exception.AgentConnectionFailed(reason=msg)
|
||||||
except requests.RequestException as e:
|
except requests.RequestException as e:
|
||||||
|
|
|
@ -145,9 +145,9 @@ class TestAgentClient(base.TestCase):
|
||||||
e = self.assertRaises(exception.AgentConnectionFailed,
|
e = self.assertRaises(exception.AgentConnectionFailed,
|
||||||
self.client._command,
|
self.client._command,
|
||||||
self.node, method, params)
|
self.node, method, params)
|
||||||
self.assertEqual('Connection to agent failed: Failed to invoke '
|
self.assertEqual('Connection to agent failed: Failed to connect to '
|
||||||
'agent command %(method)s for node %(node)s. '
|
'the agent running on node %(node)s for invoking '
|
||||||
'Error: %(error)s' %
|
'command %(method)s. Error: %(error)s' %
|
||||||
{'method': method, 'node': self.node.uuid,
|
{'method': method, 'node': self.node.uuid,
|
||||||
'error': error}, str(e))
|
'error': error}, str(e))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue