OpenStack library for config
a289afed93
Currently, the default options value provided are not validated, which can trigger fun things like a IntOpt having a "foobar" as default value, with code failing later when the option is being used. This patch introduces a _validate_value method that can be used to validate the default value to the expected type. ConfigOpts.__call__ gains a validate_default_values arguments that can trigger default value validation. The argument is False by default in order to not break existing code. Ultimately, we could in a later version validate the default at Opt object creation time, which would be much better, but that may break existing code, so we'll see. Change-Id: I6c1998a3be3f1579139317cd85d56b42cabf89db |
||
---|---|---|
doc/source | ||
oslo | ||
tests | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
CONTRIBUTING.rst | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
Oslo Configuration Library
The Oslo configuration API supports parsing command line arguments and .ini style configuration files.