In order to validate correct input values for IP addresses new Opt was
introduced. Validation is done on parsing level so there is no need to
explicitly check for valid ip address in the code.
Requirement for netaddr package was added.
DocImpact
Change-Id: I9adc30d9b989e8c636fefd435885c4c363ca540c
Partial-Bug: #1284684
The original implentation of _Namespace._get_cli_value relied on the
fact that _Namespace.default doesn't exist and accessing it would raise
an AttributeError. This attribute was being caught for another reason so
the logic just worked.
The more correct thing to do would have been to just raise a KeyError.
This change does that and removes the need to catch an AttributeErrors.
Change-Id: I963b31ea6ea8ab5180314be7cd2450395263e1af
Closes-bug: #1284968
Add a warning explaining that options in groups cannot be used with
the interpolation syntax.
Reformat note to use directive so it is highlighted.
Add "docs" section to tox.ini to make testing doc build easier.
Change-Id: If5106aa44d4c87abe84a7fb7a250541bba9f5068
Add some tests to show the broken behaviour in #127993 and to help
ensure that fixing it doesn't break correct behaviour in other places.
Related-Bug: #1279973
Change-Id: I69b2c4e3f27a3e193ca10cef32dd752d6a6fcc8b
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.
Change-Id: I8f59083d1c0673b94fa94acb37f11a5dd0ee040d
This commit adds a sample to the developer documentation on setting
an option as required. Previously there was no example and it just
stated it could be done, which was a little confusing.
Change-Id: I1eb96422fd4ac8a83a5ac9397905b58fa7d6c8e0
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.
Change-Id: I22aebd928a96258c08fcaa363aed0f739825fc7e
Partial-Bug: #1321274
Adds the config fixture from incubator and the associated tests,
updating both as appropriate for the new location.
bp graduate-config-fixture
Change-Id: I5a748c3b92b26c23101a565b7ca6790b8d00ec76
Since Python 3.4, argparse has been printing the version on stdout rather than
on stderr as it used to. We should fix this now because:
- this is an issue when packaging oslo-config in Debian Sid, which uses Python
3.4;
- it will be needed when Openstack switches to 3.4 anyway.
Change-Id: I6a84009acb8621d62465c4cd2573200a07b6b4ab
Add section titles to the module docstring for cfg.py so
http://docs.openstack.org/developer/oslo.config/cfg.html is broken up
and easier to scan quickly.
Fix a couple of minor markup issues at the same time.
Change-Id: I03df6842b29e62de1b3c923218f174cf65fdefdb
As _Namespace is used to hold key-values for user options,
avoid using conflict-prone names for internal purposes.
Namely, prefix ours with '_'.
For example, consider the following.
conf.register_cli_opt(cfg.BoolOpt('parser'))
In this case, the option would get added to the namespace
object as a "parser" attribute, which would conflict with
the existing name in the object.
Change-Id: Ibaf8408a118e07a8a598f87ac10a91312683df40
Closes-Bug: #1284969
When running "tox" without specifying the environment, we want py33 to
run before py2x so testr creates its database using a format available
in both versions of python.
Change-Id: If068685116156f30a7c4fe1f3a88f1a3e1a2fe00
Some of our consuming projects are setting defaults or overrides
on config objects that look like $state_path/some/file and we're
no longer handling that correctly since commit
2422d4118c97734067ea0b37ae159bc2e3c492c5
Change-Id: I4324bda6f3de3cdf05f8eb3cf16052c04018dec8
Closes-Bug: #1282250
Improve help strings to follow the style guide:
* Capitalize first word of each help string
* Finish help strings with "."
* Improve wording and follow usual capitalization
Change-Id: Iecab34edd35175dcf1cccd4676e5cd91752549ad
There is wrong explaination of option parsing order in config files
and on command line. That is only the later one takes action.
The sample code shows only the later one takes action.
See http://paste.openstack.org/show/64229/
Change-Id: I4d48df1b551bb130dc25fe32303fa2d0b1fecffd
Having the sphinx theme in the same namespace package
as the production code has been causing issues with
devstack installations. The solution settled on was
to rename oslo.sphinx to oslosphinx because oslo.sphinx
is not a "production" library.
See the linked bug report for more background details.
Closes-Bug: #1277168
Change-Id: I419fe50d66fa0c1ac48deca2286ae7c4b922d72d