Merge "Use plain routes list for os-volumes instead of stevedore"
This commit is contained in:
commit
c24448dd22
|
@ -91,6 +91,7 @@ from nova.api.openstack.compute import suspend_server
|
|||
from nova.api.openstack.compute import tenant_networks
|
||||
from nova.api.openstack.compute import used_limits
|
||||
from nova.api.openstack.compute import virtual_interfaces
|
||||
from nova.api.openstack.compute import volumes
|
||||
from nova.api.openstack import wsgi
|
||||
import nova.conf
|
||||
|
||||
|
@ -365,6 +366,10 @@ virtual_interfaces_controller = functools.partial(_create_controller,
|
|||
virtual_interfaces.ServerVirtualInterfaceController, [], [])
|
||||
|
||||
|
||||
volumes_controller = functools.partial(_create_controller,
|
||||
volumes.VolumeController, [], [])
|
||||
|
||||
|
||||
# NOTE(alex_xu): This is structure of this route list as below:
|
||||
# (
|
||||
# ('Route path': {
|
||||
|
@ -696,6 +701,17 @@ ROUTE_LIST = (
|
|||
'GET': [tenant_networks_controller, 'show'],
|
||||
'DELETE': [tenant_networks_controller, 'delete']
|
||||
}),
|
||||
('/os-volumes', {
|
||||
'GET': [volumes_controller, 'index'],
|
||||
'POST': [volumes_controller, 'create'],
|
||||
}),
|
||||
('/os-volumes/detail', {
|
||||
'GET': [volumes_controller, 'detail'],
|
||||
}),
|
||||
('/os-volumes/{id}', {
|
||||
'GET': [volumes_controller, 'show'],
|
||||
'DELETE': [volumes_controller, 'delete']
|
||||
}),
|
||||
('/os-volumes_boot', {
|
||||
'GET': [server_controller, 'index'],
|
||||
'POST': [server_controller, 'create']
|
||||
|
|
|
@ -608,10 +608,6 @@ class Volumes(extensions.V21APIExtensionBase):
|
|||
def get_resources(self):
|
||||
resources = []
|
||||
|
||||
res = extensions.ResourceExtension(
|
||||
ALIAS, VolumeController(), collection_actions={'detail': 'GET'})
|
||||
resources.append(res)
|
||||
|
||||
res = extensions.ResourceExtension('os-volume_attachments',
|
||||
VolumeAttachmentController(),
|
||||
parent=dict(
|
||||
|
|
Loading…
Reference in New Issue