Fix server power-off bug
* Wrong HTTP method used to power-off server * Use PUT instead of GET
This commit is contained in:
@@ -38,7 +38,7 @@ class ServersTest(utils.TestCase):
|
||||
|
||||
def test_server_power_off(self):
|
||||
cs.servers.power_off(1)
|
||||
cs.assert_called('GET', '/servers/1?action=power-off')
|
||||
cs.assert_called('PUT', '/servers/1?action=power-off')
|
||||
|
||||
def test_server_reset(self):
|
||||
cs.servers.reset(1)
|
||||
|
@@ -124,7 +124,7 @@ class ServerManager(base.ManagerWithFind):
|
||||
url = '/servers/%s?action=%s' % (base.getid(server), action)
|
||||
if force:
|
||||
url = '%s&force=true' % url
|
||||
return self.api.client.get(url)
|
||||
return self.api.client.put(url, body={})
|
||||
|
||||
def reset(self, server, using_pxe=False, **kwargs):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user