diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-05-29 08:27:05 +0100 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-05-29 08:27:05 +0100 |
| commit | 141fe5b9741296f72b0695a85089fd1a0b2c2173 (patch) | |
| tree | 9c734c76e43862cc41e5fe8783f5dd868a13974f /openstack/common/plugin/plugin.py | |
| parent | 3308e123ad4a0699e95e209dcd94cb0dedf7e63b (diff) | |
| download | oslo-141fe5b9741296f72b0695a85089fd1a0b2c2173.tar.gz oslo-141fe5b9741296f72b0695a85089fd1a0b2c2173.tar.xz oslo-141fe5b9741296f72b0695a85089fd1a0b2c2173.zip | |
cfg: add a global CONF object
Implements blueprint cfg-global-object
Add an instance of the CommonConfigOpts class to the cfg module's
global namespace.
The usage pattern is:
from openstack.common import cfg
opts = [
cfg.StrOpt('foo', default='blaa'),
cfg.StrOpt('bar', default='blaa'),
]
CONF = cfg.CONF
CONF.register_opts(opts)
def do_something_later():
print CONF.foo, CONF.bar
def main():
CONF(project='pulsar')
Change-Id: I77e87b1e186c243b2638a4b1c202f865249dafce
Diffstat (limited to 'openstack/common/plugin/plugin.py')
0 files changed, 0 insertions, 0 deletions
