If no --config-dir switches are given on the command
line, use default directories to search for config
snippets.
This is similar to the default config-file support
oslo.config already includes. It is useful in environments
where command line arguments can not easily be added, like
mod_wsgi Apache envs.
Change-Id: I4df977911539777d1510e8b579375aca5b5f15f4
The addition to enforce_type now tries to convert the
value (even if enforcing is off) which can result in
types the list class was not handling now being handled.
One example is someone setting an override for a tuple
go through the same code path as for lists.
Related-Bug: #1635717
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: Icdce83d731642724ea3ce6920b84c25d61bd63c5
DuplicateOptError only accepts option name as constructor parameter,
but we pass instance of argparse.ArgumentError, which is wrong.
Raising DuplicateOptError is part of public API, so we can't expose
other exceptions, but make the error messag meaningful.
Change-Id: I73e29fd2be990b79bc439d09c903b015745460d3
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.
Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.
Change-Id: I9db09c7585e9e1041139970ca848f77b38424a6f
* Since oslo.config.opts.defaults is not implemented in most of the
component so warning related to this should be disabled
* Bump stevedore to 1.17.1 in requirements.txt
Depends-On: Iae5b2d497353af2c1698e67b9e6b9e09d5241275
Closes-Bug: #1629232
Change-Id: I912fcfffa9cb1fcc64da652b8180b382c3f1a711
Lines in a configuration file should not start with whitespace. A
configuration file also supports comments, which must start with '#' or
';'. This commit declare that.
Change-Id: Iddf3a929762486206452eab4a6bc1864f3e9e0cc
The Port type was missing from the cfg documentation. The PortOpt
used to use Integer type but was later converted to its own Port
type.
Change-Id: Iffb1ba01e7f8c751e9bde9ab8e903490fffdcbb3
Some configuration options only allow a specific scheme, like 'http'
and 'https'. Enable validation of this at the config file level.
Change-Id: Iedf808f1809845cd230181c6e335f71aad089922
Using the repr on an object which had used a tuple for the value in
choices, would cause an error.
TypeError: not all arguments converted during string formatting
Make code consistent for __repr__() with use of 'format'. And make code
consistent with use of 'if self.choices is not None'
Add additional tuple related unit tests
Change-Id: I76bb23b45a14348456572ad3af5bd6500a58fc96
Closes-Bug: #1621673
This adds a negative test to ensure we do not touch the type of the
overrided value when the application do not provide a valid type. This
ensures that we do break them by accidentally convert the value to the
right type.
Change-Id: Ie00e066fa962dfa8114730113ce581391fad1228
In order to support automatically updating the release notes when we
create stable branches, we want the pages to be in a standard order.
This patch updates the order to be reverse chronological, so the most
recent notes appear at the top.
Change-Id: Ib364dcc8eb31275a31c83b68d7914263b183e393
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We plan to change the enforce_type default to True.
https://review.openstack.org/#/c/328692
But this is going to break some project. This change
adds a deprecation warning to help them to track their broken
tests.
This should avoid people to change ton of tests file in all projects for
no real value. Specially for an option that in this end will be removed
from oslo.config when everybody have switched to the enforcing mode.
Related-Bug: #1517839
Change-Id: I438aeb766d663dbfe5dbd263fd166c25814204e8
This ensures that the directory used by test_config_dir_doesnt_exist()
doesn't exist.
Change-Id: I87b4dc4fa6c8edde5d037ff7241c868318c8d177
Closes-Bug: #1619800
The type descriptions for two recently introduced options (HostnameOpt
and URIOpt) was missing from sphinxext.
Change-Id: Ibaa47a948a1eb983ddb628398564c79468e781c8
A few newly introduced exceptions were not part of the docs.
The following were missing:
* NotInitializedError
* ConfigFilesPermissionDeniedError
* ConfigDirNotFoundError
* DefaultValueError
Change-Id: I0c986e4709c67f8bcb9e8e70fa55e4ce9f275acd
Add a type which accepts "1-3" to produce a range. This can be used to
EG find a free port in a range or validate that a user input is
acceptable.
It should be possible to make a ListOpt(Range) which will accept
"1-3,5-6".
Change-Id: I9a2727522f25535a25c53ac89cd5e0096c87fef9
Co-Authored-By: Alexis Lee <lxsli@hpe.com>