Merge "Use plain routes list for os-certificates endpoint instead of stevedore"
This commit is contained in:
commit
b6a74f5242
|
@ -17,8 +17,6 @@ import webob.exc
|
|||
from nova.api.openstack import extensions
|
||||
from nova.api.openstack import wsgi
|
||||
|
||||
ALIAS = "os-certificates"
|
||||
|
||||
|
||||
class CertificatesController(wsgi.Controller):
|
||||
"""The x509 Certificates API controller for the OpenStack API."""
|
||||
|
@ -32,21 +30,3 @@ class CertificatesController(wsgi.Controller):
|
|||
def create(self, req, body=None):
|
||||
"""Create a certificate."""
|
||||
raise webob.exc.HTTPGone()
|
||||
|
||||
|
||||
class Certificates(extensions.V21APIExtensionBase):
|
||||
"""Certificates support."""
|
||||
|
||||
name = "Certificates"
|
||||
alias = ALIAS
|
||||
version = 1
|
||||
|
||||
def get_resources(self):
|
||||
resources = [
|
||||
extensions.ResourceExtension(ALIAS,
|
||||
CertificatesController(),
|
||||
member_actions={})]
|
||||
return resources
|
||||
|
||||
def get_controller_extensions(self):
|
||||
return []
|
||||
|
|
|
@ -23,6 +23,7 @@ from nova.api.openstack.compute import agents
|
|||
from nova.api.openstack.compute import aggregates
|
||||
from nova.api.openstack.compute import assisted_volume_snapshots
|
||||
from nova.api.openstack.compute import availability_zone
|
||||
from nova.api.openstack.compute import certificates
|
||||
from nova.api.openstack.compute import config_drive
|
||||
from nova.api.openstack.compute import console_output
|
||||
from nova.api.openstack.compute import create_backup
|
||||
|
@ -100,6 +101,10 @@ availability_zone_controller = functools.partial(
|
|||
_create_controller, availability_zone.AvailabilityZoneController, [], [])
|
||||
|
||||
|
||||
certificates_controller = functools.partial(
|
||||
_create_controller, certificates.CertificatesController, [], [])
|
||||
|
||||
|
||||
keypairs_controller = functools.partial(
|
||||
_create_controller, keypairs.KeypairController, [], [])
|
||||
|
||||
|
@ -318,6 +323,12 @@ ROUTE_LIST = (
|
|||
('/os-instance_usage_audit_log/{id}', {
|
||||
'GET': [instance_usage_audit_log_controller, 'show']
|
||||
}),
|
||||
('/os-certificates', {
|
||||
'POST': [certificates_controller, 'create']
|
||||
}),
|
||||
('/os-certificates/{id}', {
|
||||
'GET': [certificates_controller, 'show']
|
||||
}),
|
||||
('/os-keypairs', {
|
||||
'GET': [keypairs_controller, 'index'],
|
||||
'POST': [keypairs_controller, 'create']
|
||||
|
|
|
@ -76,7 +76,6 @@ nova.api.v21.extensions =
|
|||
baremetal_nodes = nova.api.openstack.compute.baremetal_nodes:BareMetalNodes
|
||||
block_device_mapping = nova.api.openstack.compute.block_device_mapping:BlockDeviceMapping
|
||||
cells = nova.api.openstack.compute.cells:Cells
|
||||
certificates = nova.api.openstack.compute.certificates:Certificates
|
||||
cloudpipe = nova.api.openstack.compute.cloudpipe:Cloudpipe
|
||||
console_auth_tokens = nova.api.openstack.compute.console_auth_tokens:ConsoleAuthTokens
|
||||
consoles = nova.api.openstack.compute.consoles:Consoles
|
||||
|
|
Loading…
Reference in New Issue