Merge "Make default-types APIs compatible with V3.67" into stable/2024.1

This commit is contained in:
Zuul 2024-09-26 23:14:52 +00:00 committed by Gerrit Code Review
commit dc7998fc26

View File

@ -210,22 +210,28 @@ class APIRouter(cinder.api.openstack.APIRouter):
member={'accept': 'POST'}) member={'accept': 'POST'})
self.resources['default_types'] = default_types.create_resource() self.resources['default_types'] = default_types.create_resource()
mapper.connect("default-types", "/default-types/{id}", for path_prefix in ['/{project_id}', '']:
controller=self.resources['default_types'], # project_id is optional
action='create_update', mapper.connect(
conditions={"method": ['PUT']}) "default-types", "%s/default-types/{id}" % path_prefix,
controller=self.resources['default_types'],
action='create_update',
conditions={"method": ['PUT']})
mapper.connect("default-types", "/default-types", mapper.connect(
controller=self.resources['default_types'], "default-types", "%s/default-types" % path_prefix,
action='index', controller=self.resources['default_types'],
conditions={"method": ['GET']}) action='index',
conditions={"method": ['GET']})
mapper.connect("default-types", "/default-types/{id}", mapper.connect(
controller=self.resources['default_types'], "default-types", "%s/default-types/{id}" % path_prefix,
action='detail', controller=self.resources['default_types'],
conditions={"method": ['GET']}) action='detail',
conditions={"method": ['GET']})
mapper.connect("default-types", "/default-types/{id}", mapper.connect(
controller=self.resources['default_types'], "default-types", "%s/default-types/{id}" % path_prefix,
action='delete', controller=self.resources['default_types'],
conditions={"method": ['DELETE']}) action='delete',
conditions={"method": ['DELETE']})