Utility methods for working with WSGI servers
Bases: heat.common.wsgi.BasePasteFactory
A Generic paste.deploy app factory.
This requires heat.app_factory to be set to a callable which returns a WSGI app when invoked. The format of the name is <module>:<callable> e.g.
[app:apiv1app] paste.app_factory = heat.common.wsgi:app_factory heat.app_factory = heat.api.cfn.v1:API
The WSGI app constructor must accept a ConfigOpts object and a local config dict as its two arguments.
Bases: object
A base class for paste app and filter factories.
Sub-classes must override the KEY class attribute and provide a __call__ method.
Bases: heat.common.wsgi.Middleware
Helper class that can be inserted into any WSGI application chain to get information about the request and response.
Bases: heat.common.wsgi.AppFactory
A Generic paste.deploy filter factory.
This requires heat.filter_factory to be set to a callable which returns a WSGI filter when invoked. The format is <module>:<callable> e.g.
[filter:cache] paste.filter_factory = heat.common.wsgi:filter_factory heat.filter_factory = heat.api.middleware.cache:CacheFilter
The WSGI filter constructor must accept a WSGI app, a ConfigOpts object and a local config dict as its three arguments.
Bases: object
Base WSGI middleware wrapper. These classes require an application to be initialized that will be called next. By default the middleware will simply call its wrapped app, or you can override __call__ to customize its behavior.
Bases: webob.request.Request
Add some Openstack API-specific logic to the base webob.Request.
Bases: object
WSGI app that handles (de)serialization and controller dispatch.
Reads routing information supplied by RoutesMiddleware and calls the requested action method upon its deserializer, controller, and serializer. Those three objects may implement any of the basic controller action methods (create, update, show, index, delete) along with any that may be specified in the api router. A ‘default’ method may also be implemented to be used in place of any non-implemented actions. Deserializer methods must accept a request argument and return a dictionary. Controller methods must accept a request argument. Additionally, they must also accept keyword arguments that represent the keys returned by the Deserializer. They may raise a webob.exc exception or return a dict, which will be serialized by requested content type.
Bases: object
WSGI middleware that maps incoming requests to WSGI apps.
Bases: object
Server class to manage multiple WSGI sockets and applications.
Bases: object
A thin wrapper that responds to write and logs.
Return a new instance of the eventlet wsgi server with the proper url limit in a way that’s compatible with eventlet 0.9.16 and 0.9.17.
Return the host and port to bind to.
Bind socket to bind ip:port in conf
note: Mostly comes from Swift with a few small changes...
Parameters: |
|
---|
Load a WSGI app from a PasteDeploy configuration.
Use deploy.loadapp() to load the app from the PasteDeploy configuration, ensuring that the supplied ConfigOpts object is passed to the app and filter constructors.
Parameters: |
|
---|---|
Returns: | the WSGI app |
Set up the generic paste app and filter factories.
Set things up so that:
paste.app_factory = heat.common.wsgi:app_factory
and
paste.filter_factory = heat.common.wsgi:filter_factory
work correctly while loading PasteDeploy configuration.
The app factories are constructed at runtime to allow us to pass a ConfigOpts object to the WSGI classes.
Parameters: | conf – a ConfigOpts object |
---|