diff options
| author | Chris Yeoh <cyeoh@au1.ibm.com> | 2013-06-13 14:48:02 +0930 |
|---|---|---|
| committer | Chris Yeoh <cyeoh@au1.ibm.com> | 2013-06-13 15:00:04 +0930 |
| commit | d3dbc09ae0b020d42e776dd7d3aa920b13c02837 (patch) | |
| tree | 0457ad155c169eab42606dc0cebf1133df27124c /nova/api | |
| parent | 71ece4a73c86995685fcbc8de2237f4fd70d0f53 (diff) | |
| download | nova-d3dbc09ae0b020d42e776dd7d3aa920b13c02837.tar.gz nova-d3dbc09ae0b020d42e776dd7d3aa920b13c02837.tar.xz nova-d3dbc09ae0b020d42e776dd7d3aa920b13c02837.zip | |
Port certificates API to v3 Part 2
This patch contains the changes required to adapt the certificates
extension and the corresponding unittests to the v3 framework
Partially implements blueprint nova-v3-api
Change-Id: If4fe7e8524ba0181b50722281f594e0a80cd49ed
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/plugins/v3/certificates.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/nova/api/openstack/compute/plugins/v3/certificates.py b/nova/api/openstack/compute/plugins/v3/certificates.py index 64a6e26fe..4af679ebe 100644 --- a/nova/api/openstack/compute/plugins/v3/certificates.py +++ b/nova/api/openstack/compute/plugins/v3/certificates.py @@ -22,7 +22,8 @@ from nova.api.openstack import xmlutil import nova.cert.rpcapi from nova import network -authorize = extensions.extension_authorizer('compute', 'certificates') +ALIAS = "os-certificates" +authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS) def make_certificate(elem): @@ -85,21 +86,21 @@ class CertificatesController(object): return {'certificate': _translate_certificate_view(cert, pk)} -class Certificates(extensions.ExtensionDescriptor): +class Certificates(extensions.V3APIExtensionBase): """Certificates support.""" name = "Certificates" - alias = "os-certificates" + alias = ALIAS namespace = ("http://docs.openstack.org/compute/ext/" - "certificates/api/v1.1") - updated = "2012-01-19T00:00:00+00:00" + "certificates/api/v3") + version = 1 def get_resources(self): - resources = [] - - res = extensions.ResourceExtension('os-certificates', - CertificatesController(), - member_actions={}) - resources.append(res) - + resources = [ + extensions.ResourceExtension('os-certificates', + CertificatesController(), + member_actions={})] return resources + + def get_controller_extensions(self): + return [] |
