diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-03-16 17:03:56 -0400 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-03-26 07:16:16 +0100 |
| commit | bea9d49615563f73fe8be6ef5e71f96cc8fc1be3 (patch) | |
| tree | bcc24592446368884d481713eefd07f3e7c8fb09 /openstack/common/plugin | |
| parent | f9cb5279429921e20f0a55e9046f8a78649aa8ad (diff) | |
| download | oslo-bea9d49615563f73fe8be6ef5e71f96cc8fc1be3.tar.gz oslo-bea9d49615563f73fe8be6ef5e71f96cc8fc1be3.tar.xz oslo-bea9d49615563f73fe8be6ef5e71f96cc8fc1be3.zip | |
Add generic PasteDeploy app and filter factories
These generic factories allow us to dump copied and pasted
app_factory and filter_factory methods.
The main difference is the paste configuration changes from:
[app:myapp]
paste.app_factory = myapp:app_factory
...
[filter:myfilter]
paste.filter_factory = myapp:filter_factory
to this:
[app:myapp]
paste.app_factory = openstack.common.pastedeploy:app_factory
openstack.app_factory = myapp:App
...
[filter:myfilter]
paste.filter_factory = openstack.common.pastedeploy:filter_factory
openstack.filter_factory = myapp:Filter
Apart from reducing code duplication, this will also allow us to have
the generic factories inject other data into the apps and filters.
This could implemented as a new feature in PasteDeploy itself - e.g.
allow the loadapp() caller supply a python object which is passed on
to the factories.
In the meantime, Glance has code like this to pass a ConfigOpts instance
to factories. Keystone is moving a similar way, as will other projects
as they move away from a global config object.
Change-Id: I928d1f6da154f0f41edd624e25b8918a0e12cb28
Diffstat (limited to 'openstack/common/plugin')
0 files changed, 0 insertions, 0 deletions
