802 Commits

Author SHA1 Message Date
Thomas Bechtold
f24b04ea87 Add defaults for config-dir
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
2016-11-30 06:58:12 +01:00
Gevorg Davoian
42af1ad069 Fix conversion to item_type on __call__ in List type
Change-Id: I365eec5785023135ce6aaceaec425e23fe4301f0
Closes-Bug: #1640962
2016-11-16 16:39:58 +00:00
Mehdi Abaakouk
38246b6f4f doc: Fix Range type version
The range type have been merged in 3.18 and not 3.16

Change-Id: I34d13696a9cb349120d58a5ea036866dcf63db15
2016-11-04 15:37:43 +01:00
OpenStack Proposal Bot
a684d7b7fc Updated from global requirements
Change-Id: I844fd8d94cc5a77d2eb0c70ff23ef1ac959bcc36
2016-11-02 15:39:03 +00:00
Jenkins
30af7defd7 Merge "Fixup list types handling tuples" 2016-10-25 16:09:21 +00:00
Joshua Harlow
0be235e46b Fixup list types handling tuples
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
2016-10-25 10:20:21 +02:00
OpenStack Proposal Bot
2096e72f72 Updated from global requirements
Change-Id: I1dfd0fd5415b7fabb90755bf8ca17f4b5c8da762
2016-10-22 01:25:52 +00:00
howardlee
33018edc39 [TrivialFix] Replace 'assertTrue(a in b)' with 'assertIn(a, b)'
Change-Id: I35e5895dc965a2e8cb4bcdf1f316c34b08aeee40
2016-10-19 20:12:05 +08:00
Jenkins
d57e5380be Merge "Fix wrong usage of DuplicateOptError" 3.18.0 2016-10-13 12:58:16 +00:00
Jenkins
4a691931f3 Merge "Enable release notes translation" 2016-10-12 13:44:34 +00:00
ChangBo Guo(gcb)
8cb33529fb Fix wrong usage of DuplicateOptError
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
2016-10-12 11:54:51 +00:00
Jenkins
602bbff80a Merge "Disable warning for missing oslo.config.opts.defaults" 2016-10-07 14:20:44 +00:00
Andreas Jaeger
a17d135e36 Enable release notes translation
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
2016-10-06 20:41:54 +02:00
OpenStack Proposal Bot
a8178f5880 Updated from global requirements
Change-Id: I475da83b3f93bf5aafc71734de29b320450e0eb8
2016-10-06 17:01:01 +00:00
Chandan Kumar
14aa577263 Disable warning for missing oslo.config.opts.defaults
* 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
2016-10-06 14:54:59 +00:00
OpenStack Proposal Bot
f578e99be8 Updated from global requirements
Change-Id: I0935962222cfa5c74c60b11fe4336c255e6b983c
2016-09-28 16:59:29 +00:00
OpenStack Proposal Bot
236defa3c3 Updated from global requirements
Change-Id: I27d8e927b1ba52130c23f23549675580a7eab914
2016-09-27 10:06:16 +00:00
ChangBo Guo(gcb)
0715a15f7c Add doc about config option name and comment in config file
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
2016-09-23 16:24:33 +08:00
Jenkins
73154eb9c2 Merge "modify the home-page info with the developer documentation" 2016-09-23 03:43:44 +00:00
Jenkins
8ef4a05f70 Merge "Correct nits in Iedf808" 2016-09-20 09:41:18 +00:00
avnish
ae9663aab3 modify the home-page info with the developer documentation
Change-Id: I424238bf258fe68db243f8909f9abda45c881a5a
2016-09-20 12:35:07 +05:30
Jenkins
647e109a60 Merge "Add 'schemes' argument to URIOpt" 2016-09-19 12:19:09 +00:00
Stephen Finucane
6506d13b6c Correct nits in Iedf808
Give some examples of what a 'scheme' is.

Change-Id: I12978e0412a51bc9dbc096c0e4e4e09652187599
2016-09-19 11:14:25 +01:00
Jenkins
b0079286c8 Merge "Fix missing option types to config doc" 2016-09-18 03:57:28 +00:00
OpenStack Proposal Bot
214dad4ff3 Updated from global requirements
Change-Id: Iac028eb972f64f0bdb8b1977343f409a30338a1f
2016-09-15 20:24:58 +00:00
Eric Brown
50cc62d822 Fix missing option types to config doc
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
2016-09-14 14:00:53 -07:00
Stephen Finucane
2966f314c6 Add 'schemes' argument to URIOpt
Some configuration options only allow a specific scheme, like 'http'
and 'https'. Enable validation of this at the config file level.

Change-Id: Iedf808f1809845cd230181c6e335f71aad089922
2016-09-14 13:09:15 +01:00
Jenkins
5b700c7b21 Merge "Fix repr for tuples in choices" 2016-09-12 21:46:35 +00:00
Jenkins
9dd974dec3 Merge "Add some documentation about option deprecation" 2016-09-10 10:32:05 +00:00
John L. Villalovos
a45025bddc Fix repr for tuples in choices
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
2016-09-09 06:34:15 -07:00
Gevorg Davoian
6374819a18 Add some documentation about option deprecation
Change-Id: Ie1334a554b9587aac1b46717163ebeda2fb29092
Closes-Bug: #1618236
2016-09-09 15:19:11 +03:00
Jenkins
f532b94cd4 Merge "test: add enforce_type test" 2016-09-08 13:53:56 +00:00
Jenkins
de62c17fcc Merge "standardize release note page ordering" 2016-09-08 13:34:18 +00:00
Mehdi Abaakouk
539e54e5fe test: add enforce_type test
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
2016-09-08 13:54:45 +02:00
Doug Hellmann
916fa73312 standardize release note page ordering
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>
2016-09-07 16:50:43 -04:00
Jenkins
5f26113389 Merge "Ensure test_config_dir_doesnt_exist() dir doesn't exist" 2016-09-07 13:34:11 +00:00
Mehdi Abaakouk
fcc344d954 Warn user about enforce_type default change
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
2016-09-06 18:03:00 +02:00
Corey Bryant
0dad997bca Ensure test_config_dir_doesnt_exist() dir doesn't exist
This ensures that the directory used by test_config_dir_doesnt_exist()
doesn't exist.

Change-Id: I87b4dc4fa6c8edde5d037ff7241c868318c8d177
Closes-Bug: #1619800
2016-09-02 17:51:50 -04:00
Jenkins
9d0c1cbc73 Merge "Update reno for stable/newton" 2016-08-30 18:13:06 +00:00
Jenkins
23eaec2881 Merge "Add HostnameOpt and URIOpt types to sphinxext" 2016-08-30 16:07:06 +00:00
Doug Hellmann
02dd34dfe9 Update reno for stable/newton
Change-Id: I0e867b547b62e6c9b029f14aa6c159efc603f6ec
2016-08-30 10:13:52 +00:00
Jenkins
cd7f54fe13 Merge "Add missing exceptions to the documentation" 2016-08-30 10:01:13 +00:00
Eric Brown
b5e745dbe8 Add HostnameOpt and URIOpt types to sphinxext
The type descriptions for two recently introduced options (HostnameOpt
and URIOpt) was missing from sphinxext.

Change-Id: Ibaa47a948a1eb983ddb628398564c79468e781c8
2016-08-29 20:57:33 -07:00
Jenkins
9c6775ad08 Merge "Add Range type" 2016-08-30 02:50:50 +00:00
Eric Brown
b35606d54a Add missing exceptions to the documentation
A few newly introduced exceptions were not part of the docs.
The following were missing:
* NotInitializedError
* ConfigFilesPermissionDeniedError
* ConfigDirNotFoundError
* DefaultValueError

Change-Id: I0c986e4709c67f8bcb9e8e70fa55e4ce9f275acd
2016-08-28 16:42:48 -07:00
Adam Harwell
fadf8ee831 Add IPOpt and PortOpt names for sphinxext
Change-Id: I836a7f54c30cff04b1a4ae68256b0ffb2683cebd
2016-08-25 14:31:10 -05:00
OpenStack Proposal Bot
2377612116 Updated from global requirements
Change-Id: Ie86cda18070bb485b8648d3043460e3366d48490
2016-08-25 01:40:57 +00:00
Trevor McCasland
a3c590e806 Add Range type
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>
2016-08-22 17:39:19 +01:00
OpenStack Proposal Bot
8db0b7c23d Updated from global requirements
Change-Id: I9b19239de9c816b43aa701ecd2e6536fa0ca99b7
2016-08-18 05:55:44 +00:00
Jenkins
d2c2b3a611 Merge "Add set_override method test with ListOpt" 2016-08-12 21:49:06 +00:00