summaryrefslogtreecommitdiffstats
path: root/openstack/common/authutils.py
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-05-29 08:27:05 +0100
committerMark McLoughlin <markmc@redhat.com>2012-05-29 08:27:05 +0100
commite42276a50a3a1a2b4eb0af871154bf802cda1f00 (patch)
tree3005932bb499cc64550d9997d990942ad7b15ada /openstack/common/authutils.py
parentf96acd8a9f0cef80b6e0eb2f9cf980702bba4043 (diff)
downloadoslo-e42276a50a3a1a2b4eb0af871154bf802cda1f00.tar.gz
oslo-e42276a50a3a1a2b4eb0af871154bf802cda1f00.tar.xz
oslo-e42276a50a3a1a2b4eb0af871154bf802cda1f00.zip
cfg: move constructor args to __call__() args
In order to effectively use a global ConfigOpts object, you need to be able to initialize the global object with none of the information we currently require at construction. By moving those constructor args to the __call__() method, we enable the global object usage model but also make the API generally more flexible. For example, you can now reset the object and re-use it for parsing a different set of config files with the same options. There are a couple of other minor behavior changes as a result: - print_usage() and print_help() no longer works before the object has been called to parse options - registration of duplicate short options are no longer detected until the options are parsed - the --config-file and --config-dir options aren't registered until just before parsing the options since the default set of config files can be specified at that time - find_file() can't be used until after the options have been parsed, again because of the late registration of --config-file and --config-dir Finally, an unregister_opt() method is added to support the re-registeration of the --config-file and --config-dir options. Change-Id: I650d8e299e92cbc5d10da47a7ce1b73ca8066bd0
Diffstat (limited to 'openstack/common/authutils.py')
0 files changed, 0 insertions, 0 deletions