Remove actions command from servers.
It appears that this command was inherited from the original cloudservers client code. It hasn't ever worked with nova. It is confusing now because we have the instance actions command. Fixes bug 1163033 Change-Id: Id0b36c01cdbd5034d0a7886b809269d838c36b45
This commit is contained in:
parent
593adf229a
commit
bc2ee484f5
@ -177,10 +177,6 @@ class Server(base.Resource):
|
||||
"""Diagnostics -- Retrieve server diagnostics."""
|
||||
return self.manager.diagnostics(self)
|
||||
|
||||
def actions(self):
|
||||
"""Actions -- Retrieve server actions."""
|
||||
return self.manager.actions(self)
|
||||
|
||||
def migrate(self):
|
||||
"""
|
||||
Migrate a server to a new host.
|
||||
@ -534,11 +530,6 @@ class ServerManager(local_base.BootingManagerWithFind):
|
||||
return self.api.client.get("/servers/%s/diagnostics" %
|
||||
base.getid(server))
|
||||
|
||||
def actions(self, server):
|
||||
"""Retrieve server actions."""
|
||||
return self._list("/servers/%s/actions" % base.getid(server),
|
||||
"actions")
|
||||
|
||||
def create(self, name, image, flavor, meta=None, files=None,
|
||||
reservation_id=None, min_count=None,
|
||||
max_count=None, security_groups=None, userdata=None,
|
||||
|
@ -1129,15 +1129,6 @@ def do_diagnostics(cs, args):
|
||||
utils.print_dict(cs.servers.diagnostics(server)[1])
|
||||
|
||||
|
||||
@utils.arg('server', metavar='<server>', help='Name or ID of server.')
|
||||
def do_actions(cs, args):
|
||||
"""Retrieve server actions."""
|
||||
server = _find_server(cs, args.server)
|
||||
utils.print_list(
|
||||
cs.servers.actions(server),
|
||||
["Created_At", "Action", "Error"])
|
||||
|
||||
|
||||
@utils.arg('server', metavar='<server>', help='Name or ID of server.')
|
||||
def do_root_password(cs, args):
|
||||
"""
|
||||
|
@ -398,20 +398,6 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
def get_servers_1234_diagnostics(self, **kw):
|
||||
return (200, {}, {'data': 'Fake diagnostics'})
|
||||
|
||||
def get_servers_1234_actions(self, **kw):
|
||||
return (200, {}, {'actions': [
|
||||
{
|
||||
'action': 'rebuild',
|
||||
'error': None,
|
||||
'created_at': '2011-12-30 11:45:36'
|
||||
},
|
||||
{
|
||||
'action': 'reboot',
|
||||
'error': 'Failed!',
|
||||
'created_at': '2011-12-30 11:40:29'
|
||||
},
|
||||
]})
|
||||
|
||||
#
|
||||
# Server Addresses
|
||||
#
|
||||
|
@ -338,18 +338,6 @@ class ServersTest(utils.TestCase):
|
||||
s.clear_password()
|
||||
cs.assert_called('DELETE', '/servers/1234/os-server-password')
|
||||
|
||||
def test_get_server_actions(self):
|
||||
s = cs.servers.get(1234)
|
||||
actions = s.actions()
|
||||
self.assertTrue(actions is not None)
|
||||
cs.assert_called('GET', '/servers/1234/actions')
|
||||
|
||||
actions_from_manager = cs.servers.actions(1234)
|
||||
self.assertTrue(actions_from_manager is not None)
|
||||
cs.assert_called('GET', '/servers/1234/actions')
|
||||
|
||||
self.assertEqual(actions, actions_from_manager)
|
||||
|
||||
def test_get_server_diagnostics(self):
|
||||
s = cs.servers.get(1234)
|
||||
diagnostics = s.diagnostics()
|
||||
|
@ -628,12 +628,6 @@ class ShellTest(utils.TestCase):
|
||||
self.run_command('diagnostics sample-server')
|
||||
self.assert_called('GET', '/servers/1234/diagnostics')
|
||||
|
||||
def test_actions(self):
|
||||
self.run_command('actions 1234')
|
||||
self.assert_called('GET', '/servers/1234/actions')
|
||||
self.run_command('actions sample-server')
|
||||
self.assert_called('GET', '/servers/1234/actions')
|
||||
|
||||
def test_set_meta_set(self):
|
||||
self.run_command('meta 1234 set key1=val1 key2=val2')
|
||||
self.assert_called('POST', '/servers/1234/metadata',
|
||||
|
Loading…
Reference in New Issue
Block a user