WSGI middleware for OpenStack API controllers.
Bases: routes.mapper.Mapper
Create and connect a new Route to the Mapper.
Usage:
m = Mapper()
m.connect(':controller/:action/:id')
m.connect('date/:year/:month/:day', controller="blog",
action="view")
m.connect('archives/:page', controller="blog", action="by_page",
requirements = { 'page':'\d{1,2}' })
m.connect('category_list', 'archives/category/:section',
controller='blog', action='category',
section='home', type='list')
m.connect('home', '', controller='blog', action='view',
section='home')
Match a URL against against one of the routes contained.
Will return None if no valid match is found, otherwise a result dict and a route object is returned.
resultdict, route_obj = m.match('/joe/sixpack')
Bases: oslo_service.wsgi.Router
Routes requests on the API to the appropriate controller and method.
Simple paste factory, cinder.wsgi.Router
doesn’t have.
Bases: cinder.api.openstack.APIMapper
Base resource path handler
This method is compatible with resource paths that include a project_id and those that don’t. Including project_id in the URLs was a legacy API requirement; and making API requests against such endpoints won’t work for users that don’t belong to a particular project.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.