Merge "Make default-types APIs compatible with V3.67" into stable/2024.1
This commit is contained in:
commit
dc7998fc26
@ -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}', '']:
|
||||||
|
# project_id is optional
|
||||||
|
mapper.connect(
|
||||||
|
"default-types", "%s/default-types/{id}" % path_prefix,
|
||||||
controller=self.resources['default_types'],
|
controller=self.resources['default_types'],
|
||||||
action='create_update',
|
action='create_update',
|
||||||
conditions={"method": ['PUT']})
|
conditions={"method": ['PUT']})
|
||||||
|
|
||||||
mapper.connect("default-types", "/default-types",
|
mapper.connect(
|
||||||
|
"default-types", "%s/default-types" % path_prefix,
|
||||||
controller=self.resources['default_types'],
|
controller=self.resources['default_types'],
|
||||||
action='index',
|
action='index',
|
||||||
conditions={"method": ['GET']})
|
conditions={"method": ['GET']})
|
||||||
|
|
||||||
mapper.connect("default-types", "/default-types/{id}",
|
mapper.connect(
|
||||||
|
"default-types", "%s/default-types/{id}" % path_prefix,
|
||||||
controller=self.resources['default_types'],
|
controller=self.resources['default_types'],
|
||||||
action='detail',
|
action='detail',
|
||||||
conditions={"method": ['GET']})
|
conditions={"method": ['GET']})
|
||||||
|
|
||||||
mapper.connect("default-types", "/default-types/{id}",
|
mapper.connect(
|
||||||
|
"default-types", "%s/default-types/{id}" % path_prefix,
|
||||||
controller=self.resources['default_types'],
|
controller=self.resources['default_types'],
|
||||||
action='delete',
|
action='delete',
|
||||||
conditions={"method": ['DELETE']})
|
conditions={"method": ['DELETE']})
|
||||||
|
Loading…
Reference in New Issue
Block a user