OpenStack library for config
Go to file
Chris Dent ea8a0f6a8b Add support for looking in environment for config
An _environment source is added that looks in os.environ for
values.

Using the environment is on by default, but can be shut down
by setting `use_env` to False when __call__ is called.

The enviroment is inspected before any other sources
of config data but the value is used after command line
arguments and before config file options.

This is done by checking both the command line and config
files and then inspecting the location of the result. If
it is command_line, we use it. If not, we use the environment
value (if any). If there's no environment value, the config
file value is used. If checking the command line and config
file results in a KeyError, the environment value is used,
if set.

The names of the environment variables follow the rules
described in oslo_config.sources._environment.

A new exception has been added: ConfigSourceValueError, this
is the superclass of the existing ConfigFileValueError. The
code in _do_get has been updated to only use
ConfigFileValueError when it is in fact a file from whence a
ValueError came.

Documentation has been updated and a rlease note created to
indicate the new functionality.

Change-Id: I3245c40ebdcc96f8e3b2dc0bab3b4aa71d07ad15
2018-10-17 20:49:05 +01:00
.zuul.d add lib-forward-testing-python3 test job 2018-08-11 18:20:12 -04:00
doc Add support for looking in environment for config 2018-10-17 20:49:05 +01:00
oslo_config Add support for looking in environment for config 2018-10-17 20:49:05 +01:00
releasenotes Add support for looking in environment for config 2018-10-17 20:49:05 +01:00
.coveragerc Fix coverage configuration and execution 2015-10-05 17:20:49 -04:00
.gitignore Add * to .coverage in .gitignore 2016-04-12 17:19:12 +00:00
.gitreview Rename oslo-config to oslo.config. 2013-03-14 12:04:19 -07:00
.testr.conf Upgrade testing to use testr. 2013-05-03 17:26:07 -04:00
CONTRIBUTING.rst trivial change to contributing instructions 2018-02-19 09:51:56 -05:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 22:32:03 +08:00
LICENSE Add LICENSE file 2013-02-17 09:25:32 +00:00
README.rst Add release notes link to README 2018-06-21 13:15:22 +08:00
bindep.txt Add bindep.txt file to prevent fallback to generic list 2018-03-20 10:26:47 -05:00
lower-constraints.txt Merge "Add config_source option" 2018-07-13 16:08:32 +00:00
requirements.txt Add config_source option 2018-06-25 10:17:12 +02:00
setup.cfg Add config_source option 2018-06-25 10:17:12 +02:00
setup.py Updated from global requirements 2017-03-03 00:02:50 +00:00
test-requirements.txt Merge "Add config_source option" 2018-07-13 16:08:32 +00:00
tox.ini tox: Fix typo 2018-06-18 12:33:08 +01:00

README.rst

Team and repository tags

image

Oslo Configuration Library

Latest Version

Downloads

The Oslo configuration API supports parsing command line arguments and .ini style configuration files.