Rewriting admin-only calls as server actions

Change-Id: I3345dac84675aa8e7eb6cd72180ca53296937082
This commit is contained in:
Brian Waldon 2011-11-16 15:06:57 -08:00
parent d14e421ade
commit 49efa22054

View File

@ -282,25 +282,25 @@ class ServerManager(local_base.BootingManagerWithFind):
"""
Pause the server.
"""
self.api.client.post('/servers/%s/pause' % base.getid(server))
self._action('pause', server, None)
def unpause(self, server):
"""
Unpause the server.
"""
self.api.client.post('/servers/%s/unpause' % base.getid(server))
self._action('unpause', server, None)
def suspend(self, server):
"""
Suspend the server.
"""
self.api.client.post('/servers/%s/suspend' % base.getid(server))
self._action('suspend', server, None)
def resume(self, server):
"""
Resume the server.
"""
self.api.client.post('/servers/%s/resume' % base.getid(server))
self._action('resume', server, None)
def rescue(self, server):
"""