Use trailing slash in the agent command URL
Currently every call results in a redirect /commands -> /commands/ Change-Id: I711a1626ac8fc621114d283d899b6cf7315057f6
This commit is contained in:
parent
123cb22c73
commit
cc29461d20
|
@ -45,7 +45,7 @@ class AgentClient(object):
|
|||
raise exception.IronicException(_('Agent driver requires '
|
||||
'agent_url in '
|
||||
'driver_internal_info'))
|
||||
return ('%(agent_url)s/%(api_version)s/commands' %
|
||||
return ('%(agent_url)s/%(api_version)s/commands/' %
|
||||
{'agent_url': agent_url,
|
||||
'api_version': CONF.agent.agent_api_version})
|
||||
|
||||
|
|
|
@ -70,7 +70,8 @@ class TestAgentClient(base.TestCase):
|
|||
|
||||
def test__get_command_url(self):
|
||||
command_url = self.client._get_command_url(self.node)
|
||||
expected = self.node.driver_internal_info['agent_url'] + '/v1/commands'
|
||||
expected = ('%s/v1/commands/'
|
||||
% self.node.driver_internal_info['agent_url'])
|
||||
self.assertEqual(expected, command_url)
|
||||
|
||||
def test__get_command_url_fail(self):
|
||||
|
|
Loading…
Reference in New Issue