Merge "Use plain routes list for os-floating-ips endpoint instead of stevedore"
This commit is contained in:
commit
951063b3a9
|
@ -201,6 +201,9 @@ hardcoded_extensions = [
|
|||
{'name': 'FlavorAccess',
|
||||
'description': 'Flavor access support.',
|
||||
'alias': 'os-flavor-access'},
|
||||
{'name': 'FloatingIps',
|
||||
'description': 'Floating IPs support.',
|
||||
'alias': 'os-floating-ips'},
|
||||
{'name': 'Keypairs',
|
||||
'description': 'Keypair Support.',
|
||||
'alias': 'os-keypairs'}
|
||||
|
|
|
@ -36,7 +36,6 @@ from nova.policies import floating_ips as fi_policies
|
|||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
ALIAS = 'os-floating-ips'
|
||||
|
||||
|
||||
def _translate_floating_ip_view(floating_ip):
|
||||
|
@ -327,19 +326,3 @@ class FloatingIPActionController(wsgi.Controller):
|
|||
msg = _("Floating IP %(address)s is not associated with instance "
|
||||
"%(id)s.") % {'address': address, 'id': id}
|
||||
raise webob.exc.HTTPConflict(explanation=msg)
|
||||
|
||||
|
||||
class FloatingIps(extensions.V21APIExtensionBase):
|
||||
"""Floating IPs support."""
|
||||
|
||||
name = "FloatingIps"
|
||||
alias = ALIAS
|
||||
version = 1
|
||||
|
||||
def get_resources(self):
|
||||
resource = [extensions.ResourceExtension(ALIAS,
|
||||
FloatingIPController())]
|
||||
return resource
|
||||
|
||||
def get_controller_extensions(self):
|
||||
return []
|
||||
|
|
|
@ -101,6 +101,10 @@ flavor_extraspec_controller = functools.partial(_create_controller,
|
|||
flavors_extraspecs.FlavorExtraSpecsController, [], [])
|
||||
|
||||
|
||||
floating_ips_controller = functools.partial(_create_controller,
|
||||
floating_ips.FloatingIPController, [], [])
|
||||
|
||||
|
||||
server_controller = functools.partial(_create_controller,
|
||||
servers.ServersController,
|
||||
[
|
||||
|
@ -191,6 +195,14 @@ ROUTE_LIST = (
|
|||
('/os-aggregates/{id}/action', {
|
||||
'POST': [aggregates_controller, 'action'],
|
||||
}),
|
||||
('/os-floating-ips', {
|
||||
'GET': [floating_ips_controller, 'index'],
|
||||
'POST': [floating_ips_controller, 'create']
|
||||
}),
|
||||
('/os-floating-ips/{id}', {
|
||||
'GET': [floating_ips_controller, 'show'],
|
||||
'DELETE': [floating_ips_controller, 'delete']
|
||||
}),
|
||||
('/os-keypairs', {
|
||||
'GET': [keypairs_controller, 'index'],
|
||||
'POST': [keypairs_controller, 'create']
|
||||
|
|
|
@ -87,7 +87,6 @@ nova.api.v21.extensions =
|
|||
fixed_ips = nova.api.openstack.compute.fixed_ips:FixedIps
|
||||
floating_ip_dns = nova.api.openstack.compute.floating_ip_dns:FloatingIpDns
|
||||
floating_ip_pools = nova.api.openstack.compute.floating_ip_pools:FloatingIpPools
|
||||
floating_ips = nova.api.openstack.compute.floating_ips:FloatingIps
|
||||
floating_ips_bulk = nova.api.openstack.compute.floating_ips_bulk:FloatingIpsBulk
|
||||
fping = nova.api.openstack.compute.fping:Fping
|
||||
hosts = nova.api.openstack.compute.hosts:Hosts
|
||||
|
|
Loading…
Reference in New Issue