oslo.config/oslo_config
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
..
sources Add support for looking in environment for config 2018-10-17 20:49:05 +01:00
tests Add support for looking in environment for config 2018-10-17 20:49:05 +01:00
__init__.py Move files out of the namespace package 2014-12-12 16:13:29 -05:00
_i18n.py Update URLs in documents according to document migration 2017-07-12 22:32:03 +08:00
_list_opts.py ensure we do not modify private data from drivers 2018-07-17 12:35:13 -04:00
cfg.py Add support for looking in environment for config 2018-10-17 20:49:05 +01:00
cfgfilter.py Fix typo 'importopt' to 'import_opt' adding the missing _ 2018-04-06 17:47:17 +02:00
fixture.py track config file and command line locations for user settings 2018-03-15 10:14:03 -04:00
generator.py Provide descriptions for choices 2017-12-13 14:33:03 +00:00
iniparser.py Move files out of the namespace package 2014-12-12 16:13:29 -05:00
sphinxconfiggen.py sphinxconfiggen to generate multiple sample files 2016-05-11 17:06:00 -05:00
sphinxext.py sphinxext: Stop emitting lines multiple times 2018-08-03 11:27:50 -04:00
types.py Properly initialize HostAddress 2018-05-07 22:21:17 +00:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:23 -05:00