diff options
| author | Mark Washenberger <mark.washenberger@rackspace.com> | 2011-10-20 14:31:24 -0400 |
|---|---|---|
| committer | Mark Washenberger <mark.washenberger@rackspace.com> | 2011-10-26 14:54:11 -0400 |
| commit | fa74f5c59da8e1641d97333d0b8ee6147fb17947 (patch) | |
| tree | 2084eba44963d84be4efc48c9292074bd568f43d /nova/api | |
| parent | 5e9e3873e5ee3cf87b8aec801705ee24cedcd1aa (diff) | |
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
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/consoles.py | 8 |
1 files changed, 4 insertions, 4 deletions
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() |
