From fa74f5c59da8e1641d97333d0b8ee6147fb17947 Mon Sep 17 00:00:00 2001 From: Mark Washenberger Date: Thu, 20 Oct 2011 14:31:24 -0400 Subject: Support using server uuids when accessing consoles. This adds support to the nova/console/api.py for instance_ids being uuids. Additionally, it updates the openstack console controller to get around some int() casts and modifies testing to exercise the server-uuid path. Change-Id: I0641f2c4857d0d1e07abc7d70880590741769b9a --- nova/api/openstack/consoles.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/consoles.py b/nova/api/openstack/consoles.py index d42d34069..7d8c0523e 100644 --- a/nova/api/openstack/consoles.py +++ b/nova/api/openstack/consoles.py @@ -54,7 +54,7 @@ class Controller(object): """Returns a list of consoles for this instance""" consoles = self.console_api.get_consoles( req.environ['nova.context'], - int(server_id)) + server_id) return dict(consoles=[_translate_keys(console) for console in consoles]) @@ -62,14 +62,14 @@ class Controller(object): """Creates a new console""" self.console_api.create_console( req.environ['nova.context'], - int(server_id)) + server_id) def show(self, req, server_id, id): """Shows in-depth information on a specific console""" try: console = self.console_api.get_console( req.environ['nova.context'], - int(server_id), + server_id, int(id)) except exception.NotFound: raise exc.HTTPNotFound() @@ -83,7 +83,7 @@ class Controller(object): """Deletes a console""" try: self.console_api.delete_console(req.environ['nova.context'], - int(server_id), + server_id, int(id)) except exception.NotFound: raise exc.HTTPNotFound() -- cgit