diff options
author | Ian Wienand <iwienand@redhat.com> | 2013-09-25 14:31:06 +1000 |
---|---|---|
committer | Ian Wienand <iwienand@redhat.com> | 2013-09-25 14:31:06 +1000 |
commit | 3d59667b781650039f5ba2c454dff39d860f879e (patch) | |
tree | 4beb7589f830ddc371d1e3a73e7d3cde9d2efbad | |
parent | 9dabbd0ff744ae9fde993861aaeae576c2e19597 (diff) | |
download | oslo-config-3d59667b781650039f5ba2c454dff39d860f879e.tar.gz |
Expand DeprecatedOpt documentation
It is not a priori obvious how deprecated options are chosen, so
expand the docstring a bit
Change-Id: If10b45fb042b4a4d6063129b693228fd6ca86b82
-rw-r--r-- | oslo/config/cfg.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/oslo/config/cfg.py b/oslo/config/cfg.py index 39b0e8a..4ac25a0 100644 --- a/oslo/config/cfg.py +++ b/oslo/config/cfg.py @@ -733,6 +733,13 @@ class DeprecatedOpt(object): cfg.CONF.register_group(cfg.OptGroup('blaa')) cfg.CONF.register_opt(cfg.StrOpt('foo', deprecated_opts=oldopts), group='blaa') + + Multi-value options will return all new and deprecated + options. For single options, if the new option is present + ("[blaa]/foo" above) it will override any deprecated options + present. If the new option is not present and multiple + deprecated options are present, the option corresponding to + the first element of deprecated_opts will be chosen. """ def __init__(self, name, group=None): |