diff options
| author | Chris Yeoh <cyeoh@au1.ibm.com> | 2013-06-04 21:57:18 +0930 |
|---|---|---|
| committer | Chris Yeoh <cyeoh@au1.ibm.com> | 2013-06-07 10:34:14 +0930 |
| commit | e3d7f1edf958ea9a76ab29d87677f70ffaef2bde (patch) | |
| tree | 417c56125b56d753b5fdf9fa07678de873806d69 /nova/api | |
| parent | ca29b25a424098f2de3710ca7ec39b13eeff6b56 (diff) | |
| download | nova-e3d7f1edf958ea9a76ab29d87677f70ffaef2bde.tar.gz nova-e3d7f1edf958ea9a76ab29d87677f70ffaef2bde.tar.xz nova-e3d7f1edf958ea9a76ab29d87677f70ffaef2bde.zip | |
Port rescue API to v3 Part 2
This patch contains the changes required to adapt the rescue
extension and the corresponding unittest to the v3 framework
Partially implements blueprint nova-v3-api
Change-Id: Iaa6d0cf7708b0887512db952b1e26ccde75d24ef
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/plugins/v3/rescue.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/nova/api/openstack/compute/plugins/v3/rescue.py b/nova/api/openstack/compute/plugins/v3/rescue.py index c89d11117..ded18bb1a 100644 --- a/nova/api/openstack/compute/plugins/v3/rescue.py +++ b/nova/api/openstack/compute/plugins/v3/rescue.py @@ -19,15 +19,16 @@ import webob from webob import exc from nova.api.openstack import common -from nova.api.openstack import extensions as exts +from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception from nova import utils +ALIAS = "os-rescue" CONF = cfg.CONF -authorize = exts.extension_authorizer('compute', 'rescue') +authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS) class RescueController(wsgi.Controller): @@ -82,15 +83,18 @@ class RescueController(wsgi.Controller): return webob.Response(status_int=202) -class Rescue(exts.ExtensionDescriptor): +class Rescue(extensions.V3APIExtensionBase): """Instance rescue mode.""" name = "Rescue" - alias = "os-rescue" - namespace = "http://docs.openstack.org/compute/ext/rescue/api/v1.1" - updated = "2011-08-18T00:00:00+00:00" + alias = ALIAS + namespace = "http://docs.openstack.org/compute/ext/rescue/api/v3" + version = 1 + + def get_resources(self): + return [] def get_controller_extensions(self): controller = RescueController() - extension = exts.ControllerExtension(self, 'servers', controller) + extension = extensions.ControllerExtension(self, 'servers', controller) return [extension] |
