diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/keypairs.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/contrib/keypairs.py b/nova/api/openstack/compute/contrib/keypairs.py index db503ffdd..ab264f9da 100644 --- a/nova/api/openstack/compute/contrib/keypairs.py +++ b/nova/api/openstack/compute/contrib/keypairs.py @@ -108,6 +108,15 @@ class KeypairController(object): raise webob.exc.HTTPNotFound() return webob.Response(status_int=202) + @wsgi.serializers(xml=KeypairTemplate) + def show(self, req, id): + """Return data for the given key name.""" + context = req.environ['nova.context'] + authorize(context) + + keypair = self.api.get_key_pair(context, context.user_id, id) + return {'keypair': keypair} + @wsgi.serializers(xml=KeypairsTemplate) def index(self, req): """ |
