Commit Graph

750 Commits

Author SHA1 Message Date
Andreas Jaeger 7dfe42032f Retire repo
This repo was created by accident, use deb-python-oslo.config
instead.

Needed-By: I1ac1a06931c8b6dd7c2e73620a0302c29e605f03
Change-Id: I81894aea69b9d09b0977039623c26781093a397a
2017-04-17 19:35:14 +02:00
Adit Sarfaty 14ec2c67eb Add Port type to allow configuration of a list of tcp/ip ports
There was already a PortOpt, but this is not composable with ListOpt.
The new type inherits from Integer and therefore supports min/max
value and choices. For example, openstack/vmware-nsx wants to use this
to configure a default list of ports for a firewall rule.

Change-Id: I83bbec6add8ce2951e94e69ec14bb6d8137d4f0c
2016-08-11 12:05:59 +03:00
Jenkins 2449197425 Merge "Advanced Option" 2016-08-05 10:47:18 +00:00
Brian Stajkowski 4cf28c7e3b Advanced Option
Allows for an option to be tagged with advanced true/
false, notifying the end user about uncommon usage.
Such an option is not normally used, and will be
moved to the bottom of the respective namespace.
Only options set to true (default: false) will be
tagged as such in generated sample files.

Change-Id: I2689aba283e473bb293bf0cf0c1c4bcb5979d115
Implements: blueprint advanced-option
2016-08-02 14:39:50 -05:00
Doug Hellmann b40925328e disable lazy translation in sphinx extension
The sphinx extension depends on all of the help text associated with an
option being regular strings. When oslo_i18n's lazy translation feature
is turned on, the marker functions return Message objects that do not
support all of the features of strings. Add a step to turn off lazy
evaluation when the oslo_context.sphinxext extension is activated.

Change-Id: Icaec4691135cd07d96994f01498e0f9d2e09af58
Closes-Bug: #1605648
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-07-27 11:35:04 -04:00
Jenkins cdfe1c9028 Merge "Make error message more clear" 2016-07-26 21:44:11 +00:00
Jenkins ae78112ebc Merge "update docs for sphinxconfiggen" 2016-07-26 12:45:31 +00:00
ChangBo Guo(gcb) 2fdc1cf5e9 Trivial: adjust import order to fit the import order guideline
debtcollector is third-party library, not standard library, hacking
may remove the check recently, but let's follow the import rule in[1]

[1]http://docs.openstack.org/developer/hacking/#import-order-template

Change-Id: If55e7343e546b49a59cbf74f6bfe574f10d4a9f5
2016-07-25 19:24:16 +08:00
ChangBo Guo(gcb) c11571933e Make error message more clear
This commit adjusts sentence about option name and group in
error messages to make it more clear and friendly.

TrivialFix

Change-Id: I0f23e9e0ff0499509621c5ae7b1fc4573d6037a7
2016-07-25 17:33:57 +08:00
Jenkins fbe660df29 Merge "Add min and max values to Float type and Opt" 2016-07-22 06:29:30 +00:00
Adit Sarfaty 15d3ab88f2 Add min and max values to Float type and Opt
Just like Integers, Floats configuration should also have a minimum and
maximum possible values.
For example, the vmware-nsx plugin needs it for the QoS support.
See https://review.openstack.org/#/c/344763/

Change-Id: If1c47444e0c12b68d9d9cb645b8251e4462cfd49
2016-07-21 14:38:23 +03:00
Jenkins 6a0ef5bc50 Merge "Remove discover from test-requirements" 2016-07-20 20:16:23 +00:00
yan.haifeng 61224ce932 Fix parameters of assertEqual are misplaced
Many assertEqual sentences don't follow assertEqual(expected, actual),
this patch fix all of them.

Change-Id: Ia2fbad7a952039fbba4cddc3308721a19dd099d1
Closes-Bug: 1604213
2016-07-19 11:52:55 +08:00
OpenStack Proposal Bot 55c2026576 Updated from global requirements
Change-Id: Iafa292f1a77b03291311b4c1c34ea6daff6f943d
2016-07-17 23:58:38 +00:00
Eric Brown 8ed5f7555d Add max_length to URIOpt
Currently StrOpt has a max_length parameter to restrict the length
of the value, but URIOpt does not. The keystone project actually
has use for a max_length to restrict a URI used for the SAML2
entity ID.

Reference patch:
https://review.openstack.org/#/c/341514

Change-Id: I39d012b0b7ebeddf6067016487ac8258461dda30
2016-07-14 11:34:39 -07:00
Thomas Bechtold f48a89774f Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Ia458d58b8aeed621f1edc25fcb14d7499199fda4
2016-07-14 07:58:19 +02:00
Doug Hellmann 6f2c57ca10 update docs for sphinxconfiggen
We landed the feature to let the sphinx integration work with multiple
input and output files, but we didn't update the docs for it.

Change-Id: I1ef3f91aed3bdbcfdff4f8afc5fa325b34008495
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-07-13 16:16:28 -04:00
Eric Brown 9b05dc903f Add URIOpt to doced option types
The URIOpt was missing from the documentation on various
options.

Change-Id: Id659ecb9b81bad202582ff3f5f0c67164fbfaa22
Closes-Bug: #1602747
2016-07-13 08:38:32 -07:00
Jenkins 11456e00c4 Merge "Add Python 3.5 classifier and venv" 2016-07-11 17:48:53 +00:00
Jenkins 93568350c8 Merge "Enabling your project for mutable-config" 2016-07-11 15:17:56 +00:00
Eric Brown 335b1845b7 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I688d8d5ded43878cc3330d67c7749c208d821767
2016-07-09 22:39:20 -07:00
Alexis Lee d174a4e3c0 Enabling your project for mutable-config
Change-Id: I1c71a2d571bba619434360a4319c7305c5880642
2016-07-07 11:37:30 +01:00
Alfredo Moralejo 7539018066 Add namespace to _list_opts() in test
After https://review.openstack.org/#/c/334014/, loading
NamedExtensionManager will fail when names is not an
iterable. In test test_list_ignores_doubles we are passing
None as namespace so it's failing.

Change-Id: I98e083c88a9d3db90bfeb9d5019d85bf01db6ca8
2016-06-28 10:49:17 +02:00
Doug Hellmann a08ec74803 decode subprocess output so doc build works on python3
Change-Id: I26e10f62710c32c7cfb8dd30544b34dfe244f3b2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-06-25 17:16:21 -04:00
OpenStack Proposal Bot 71110708c5 Updated from global requirements
Change-Id: I7b88d217acfa5fe72c27cde8f299e6acb90a0c18
2016-06-24 03:16:26 +00:00
OpenStack Proposal Bot 4f97c6f8be Updated from global requirements
Change-Id: Iafc3e2072dbed7d724a965bb5c67c1b49461e071
2016-06-21 18:04:17 +00:00
Jenkins d8e71b9d10 Merge "fixture: Provide parameter enforce_type for method config" 2016-06-20 22:06:57 +00:00
Jenkins d4b7650ee0 Merge "Add URIOpt" 2016-06-17 11:02:08 +00:00
Masaki Matsushita 45ee2bed52 Add URIOpt
This change add URIOpt which validates string as URI.

Closes-Bug: #1500398
Change-Id: Ie8736b8654b9feb2a2b174159f08dbea03568d84
2016-06-17 13:39:39 +09:00
Jenkins 035b61029d Merge "Add support for a deprecated version" 2016-06-16 18:31:29 +00:00
Stephen Finucane 1543359b2b Add support for a deprecated version
It is possible to deprecate an option, but there's no clear way to
state when this deprecation occured and when the option will actually
go away. This leaves the user with a decision to make. Nova, for
example, frequently includes the release that the option was removed in
as part of the help message like so:

    "memcached_servers" opt is deprecated in Mitaka. In Newton release
    oslo.cache config options should be used as this option will be
    removed.

This is a decision that the user shouldn't have to make. Add a
'deprecated_since' parameter to allow users to specify this information
in a uniform manner. The parameter allows for any string value.

A future work item would add a hacking or tox check to compare this
parameter against the expected deprecation version. For example, to
ensure all Nova parameters deprecated in '13.0' should be removed in
'14.0'. This will be done on a per-project basis.

Change-Id: Ic894358006606f123e31611f068d9b6192d42616
2016-06-16 13:58:23 +01:00
Jenkins 5a5201f824 Merge "Support template substitution of DictOpt" 2016-06-16 00:00:03 +00:00
Jenkins 91002b6f45 Merge "Handle some native python types in config generation" 2016-06-15 23:59:57 +00:00
OpenStack Proposal Bot cd2021be9e Updated from global requirements
Change-Id: I5b62ba2fac94d3829b08f9704ed56c9e2251307d
2016-06-14 21:09:36 +00:00
Jenkins b5d65b025c Merge "Required Option" 2016-06-14 12:11:22 +00:00
Yibo Cai 5ee4092665 Support template substitution of DictOpt
Closes-Bug: #1590274

Change-Id: Idc07e92b06d2ef0a09834bd19f74282081e545f7
Signed-off-by: Yibo Cai <yibo.cai@linaro.org>
2016-06-12 12:23:52 +08:00
ChangBo Guo(gcb) bba5a89feb fixture: Provide parameter enforce_type for method config
This allows fixture to check config option's type and value before
overriding, that ensure testing as same as production enviroment.

Change-Id: I958d04c92cfeacd134aaf2e0a758e0defdb607e2
2016-06-08 13:14:45 +08:00
Jenkins bb0f7e3880 Merge "generator: format string default value for List type properly" 2016-06-02 14:47:31 +00:00
Edan David 613fdcfd50 Fix typo: 'olso' to 'oslo'
Change-Id: If8965fe31f12bb924cb6036afbff17ddf163a78c
2016-06-02 01:29:42 -04:00
Ihar Hrachyshka 1b3af11d9c Return [] for .config_dirs when config files are not parsed
Currently, we raise NoSuchOptError in case config files were not parsed
yet, which does not seem like correct behaviour for the property (since
it is never expected to be an option defined).

Instead of raising, let's return an empty list.

Related-Bug: #1587359
Change-Id: Ia66e9d26b011c0f7bd3d1383d9282554cf300f29
2016-05-31 20:10:41 +02:00
Ihar Hrachyshka 75e1c30663 generator: format string default value for List type properly
List type allows to pass string values as default values, which are then
handled by splitting on commas. For formatting matters, if the default
value is of string type, there is no special conversion needed, and we
can reuse the value as-is.

Change-Id: Ie9ecdfc064e886f6138b1fa9e839d8f95a7df339
Closes-Bug: #1586366
2016-05-27 14:51:54 +02:00
OpenStack Proposal Bot 90e81843dd Updated from global requirements
Change-Id: Icfce152d5bd702d1e58de81cde099d6998d39beb
2016-05-26 17:03:44 +00:00
Brian Stajkowski 229a7624c7 Required Option
Required options currently are not pushed to the
top of each section, and they are also not marked
as required.  This will mark the option as required
and push it to the top, uncommented.  This will
allow users to know for sure what options are
minimally required to get the service started.

Change-Id: Ic194498ec695d268cce0a26d19f9469ba800412e
Implements: blueprint oslo-generator-required
2016-05-26 08:29:59 -07:00
OpenStack Proposal Bot 792a43fbf4 Updated from global requirements
Change-Id: Ie3c5d1a17e3058fa48e658e2f70f25ce0ed968e2
2016-05-25 15:01:48 +00:00
Jenkins d829109cb4 Merge "Added i18n formatting to log messages" 2016-05-24 21:18:18 +00:00
Jenkins e7b6cef9db Merge "Incorrect group name when deprecated_group is not specified" 2016-05-24 21:12:39 +00:00
Jenkins e7bb0e142a Merge "Make sure ConfigType is an abstract class" 2016-05-24 19:50:38 +00:00
ChangBo Guo(gcb) 1c02ce8ff3 Make sure ConfigType is an abstract class
Use the abstract class to ensure that all types provide the
method _formatter.

Change-Id: Ifa2e9ca7b91d71887d2bd4ce2e6bb21c2f616722
2016-05-24 12:48:58 +08:00
Ronald Bradford 20e6e90b44 Added i18n formatting to log messages
Change-Id: I22143feee4ab936aac91b14f4dafb6fcdde07d7e
2016-05-23 13:38:09 -04:00
ChangBo Guo(gcb) d3a4c98d9a Remove duplicated code in method test_equal of HostnameTypeTests
Change-Id: I869458c7364c5b5de1ddce05b953b7a04ff4150f
2016-05-23 17:28:04 +08:00