Support Routes==2.3
SubMapper.connect allows in Routes<=2.2 to define routes with/without a
name:
map.connect(route_name, route_path)
map.connect(route_path)
Routes==2.3 SubMapper.connect now requires a route name (but not
Mapper.connect). This change adds a route name when needed to support
Routes<=2.2 and Routes==2.3.
Conflicts:
neutron/api/extensions.py
Closes-Bug: #1563028
Change-Id: I655bfe7f047945896d63dd94c584acfe60d81b38
(cherry picked from commit c6efa6292c
)
This commit is contained in:
parent
2601b429c4
commit
761a1be425
|
@ -267,8 +267,9 @@ class ExtensionMiddleware(wsgi.Middleware):
|
|||
action=action,
|
||||
path_prefix=path_prefix,
|
||||
conditions=conditions) as submap:
|
||||
submap.connect(path)
|
||||
submap.connect("%s.:(format)" % path)
|
||||
submap.connect(path_prefix + path, path)
|
||||
submap.connect(path_prefix + path + "_format",
|
||||
"%s.:(format)" % path)
|
||||
|
||||
mapper.resource(resource.collection, resource.collection,
|
||||
controller=resource.controller,
|
||||
|
|
Loading…
Reference in New Issue