Commit Graph

902 Commits

Author SHA1 Message Date
Tony Breeds ea95d307c2 Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I733bb8cb495f56edf512656ccb47867b8214ac28
2017-09-12 16:05:28 -06:00
Doug Hellmann dfc70fa88e add rst output mode for config generator
When a documentation build fails, it can be difficult to determine
why. Providing RST output for the config generator will allow a
contributor to look at the documentation being parsed by Sphinx to
find issues.

Change-Id: I4f9babc243d4a307bedd84dd4ff60f82cd16f8db
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-20 13:11:01 -04:00
Doug Hellmann a98f7106e3 fix formatting of literal default values with spaces
When the RST parser encounters a literal value with spaces before the
closing backticks, it misinterprets that as an unclosed literal
expression. Fix the logic that used to add quotes around such lines,
both to make the values more visible to readers of the documentation
and to fix the parsing issue.

Change-Id: I1bfd675d6611c59f4b3cc4816d48dbb199340bec
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-20 11:26:25 -04:00
Jenkins 11c39ac065 Merge "fix an issue with looking up deprecated option names in code" 2017-07-19 06:13:29 +00:00
Jenkins 8e9761755d Merge "Fix python 3.6 escape char warnings in strings" 2017-07-18 21:15:20 +00:00
Doug Hellmann 204faeb1d3 fix an issue with looking up deprecated option names in code
In I6e28c25f04273f7def486fadd541babc8cf423cb we tried to add the
ability to look for a deprecated option using its old name but finding
the value associated with the new name, similar to how the lookup
works when reading values from config files. That patch did not
account for group values that are objects not strings. This fixes the
oversight.

Change-Id: I98e18e88626164b365466ff476125d41cc8641ec
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-18 16:24:11 -04:00
Doug Hellmann 2d0ba09bd6 handle option defaults that are not strings
The sample config generator and sphinx integration are breaking when
option defaults are not strings. This shows up in cinder, so this bug
is preventing cinder from adopting the sphinx integration for showing
configuration options.

Fix the rendering in the generator, and in the type class for list
options.

Change-Id: Ib8a248b6dc695b6afe4f1e760af836ac664fa137
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-18 13:49:25 -04:00
Eric Harney a9aa7c685a Fix python 3.6 escape char warnings in strings
In python 3.6, escape sequences that are not
recognized in string literals issue DeprecationWarnings.

Convert these to raw strings.

Change-Id: Ibfefa7467c29bcb30c65f3c5d296daa8cc1ff7be
2017-07-18 11:57:40 -04:00
ChangBo Guo(gcb) 608a15ea61 Update URLs in documents according to document migration
Change-Id: I197694efd17966a32548643368983efe66041197
2017-07-12 22:32:03 +08:00
Akihiro Motoki 938077097f doc: Specify openstackdocs theme
Change-Id: If3e04107bc2c4bb4c152e79650f8be870bf4721f
2017-07-08 23:00:24 +00:00
Jenkins e19ca8a493 Merge "Remove log translations" 2017-07-06 18:04:20 +00:00
OpenStack Proposal Bot 4b19d71cc9 Updated from global requirements
Change-Id: I7a7db4faa77394ef8180bc79cc039cdbc0338737
2017-07-06 14:02:31 +00:00
Jenkins 0804af69e3 Merge "sphinxext: Use lower logging level" 2017-07-06 08:14:52 +00:00
Jenkins ae80ab9884 Merge "sphinxext: Add arguments for oslo.config:group directive" 2017-07-06 08:14:28 +00:00
Jenkins 8dcc41a8d1 Merge "Enable some off-by-default checks" 2017-07-05 11:32:43 +00:00
bhavani.cr d5e3652d12 Remove log translations
Log messages are no longer being translated. This removes all use of the
_LE, _LI, and _LW translation markers to simplify logging and to avoid
confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I5407d08ff524f82146af4ac8153e17e7a801b1a0
refer:https://review.openstack.org/#/c/479262/
2017-07-05 16:58:15 +05:30
Stephen Finucane 53de7315d9 sphinxext: Use lower logging level
The plugin is *very* noisy for a project with as many configuration
options as nova. Most of the output is debug info at best, so mark it up
accordingly.

Change-Id: Ic806317852475258a2dc2c563af098788d4e9ccc
Related-Bug: #1702453
2017-07-05 11:58:22 +01:00
Stephen Finucane 7b27ee3e42 sphinxext: Add arguments for oslo.config:group directive
The 'oslo.config:group' directive was parsing content to extract the
name of the group. However, this had the side effect of picking up any
body text, resulting is super long titles. Correct this by adding a
single required argument to the directive.

This also has the side effect of not merging the content to a single
string, meaning formatting will be preserved as expected.

Change-Id: Ie2f011f4a2a0e4918b65bd2387ee2c41f4ae9ec2
Closes-Bug: #1702453
2017-07-05 11:58:05 +01:00
Doug Hellmann 675d62220c switch from oslosphinx to openstackdocstheme
Change-Id: I13211d11ae96a8bbc5f8bbb958473dbcf6e4c844
Depends-On: Ifc5512c0e2373cf3387e0e0498268eab092e52bb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-29 14:35:34 -04:00
Doug Hellmann c6dded3b6c import content from the configuration reference guide
This information used to be in openstack-manuals/doc/config-reference.

Change-Id: I219dee590a706924978ce8d2a2c151a6ae51c8b6
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-29 14:31:39 -04:00
Doug Hellmann dfdf595dc8 update the documentation URL in the readme
Change-Id: I633e03e09e9d3a7c73413122a9d5ea2a7b8522ed
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-29 14:31:39 -04:00
Jenkins 4848dfece9 Merge "rearrange docs based on new standard layout" 2017-06-28 08:40:05 +00:00
Jenkins a8482a323b Merge "add to group data model to for generator" 2017-06-28 08:21:24 +00:00
Doug Hellmann c9dd8f3a4b rearrange docs based on new standard layout
Change-Id: I5a86fc144c628772c750e8626d0728e3782ea469
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-27 17:17:27 -04:00
OpenStack Proposal Bot 4d0b52c475 Updated from global requirements
Change-Id: I16e4d425919b851ff3b7239bfe57b76fcacec862
2017-06-27 12:20:00 +00:00
blue55 3ac6be2b96 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I0a99014f983c24a8d36533e36cf56ed8d7a74c5c
2017-06-22 10:48:40 +08:00
Jenkins 83d69f888f Merge "Add snap package paths to default config dirs" 2017-06-19 15:09:31 +00:00
Doug Hellmann f74d47c8d0 add to group data model to for generator
Address some of the challenges the sample config generator has when
dealing with dynamically created groups and with options that may change
based on a driver or other plugin selection.

Change-Id: I66b195835a7db3e32b16ddac2166782ff8592806
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-14 18:40:52 -04:00
Corey Bryant 21e70e28b3 Add snap package paths to default config dirs
With snap packaging (see snapcraft.io) the package is installed into a
read-only squashfs filesystem, which includes the default config. For
example, $SNAP/etc/nova/nova.conf. To override the defaults, a separate
writable directory is used, and this directory is also unique to the snap.
For example, either $SNAP_COMMON/etc/nova/nova.conf, or
$SNAP_COMMON/etc/nova/nova.conf.d/ can be used to override config.

This patch adds these snap directories to the default config paths where
oslo looks for config.

For more details on $SNAP and $SNAP_COMMON please refer to
https://snapcraft.io/docs/reference/env.

Change-Id: I83627e0f215382aedc7b32163e0303b39e8bccf8
Closes-Bug: 1696830
2017-06-14 14:35:33 -04:00
OpenStack Proposal Bot 28b4e2b50b Updated from global requirements
Change-Id: Ied3e50a32ae6583333437e736d0911c4c168b6ca
2017-06-13 23:02:36 +00:00
Jenkins 9825b3746e Merge "Fix html_last_updated_fmt for Python3" 2017-06-13 19:16:42 +00:00
loooosy d94cdf8596 Fix html_last_updated_fmt for Python3
html_last_updated_fmt option is interpreted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.

Changing Popen to .check_output because of 3 reasons:
1. check_output() will raise CalledProcessError if
the called process returns a non-zero return code.
2. For consistency with keystone [1] and cinder [2]
3. It makes the code look much better.

[1] https://review.openstack.org/#/c/457142/
[2] https://review.openstack.org/#/c/433081

Change-Id: I8872866338d93bc8328391537198df6c7981859f
2017-06-13 11:09:21 +08:00
Sean Dague 6e420e9de5 Don't set enforce_type if we are using the default
The test fixture for oslo.config always sets enforce_type parameter in
set_default, however because of debtcollector, this means it also
always emits a deprecation warning as well, even when the caller never
set this parameter.

oslo.config's fixtures should not trigger deprecation warnings during
normal usage. So be extra careful and fix that.

Change-Id: I5471b5d164ff40785e07b5f66e1f4673cf716971
2017-06-12 14:26:24 -04:00
Jenkins acad0dac61 Merge "Add PyYAML as a requirement" 2017-06-12 16:31:02 +00:00
Stephen Finucane 010e6be5f9 Rework the 'oslo-config-generator' documentation
There's a lot of shuffling docs around, but the main point is to
document the application parameters and the support for multiple output
formats recently added.

Change-Id: I26827801df917619d4256ef4c718051f5c395a29
Implements: bp machine-readable-sample-config
2017-06-07 17:40:23 +01:00
Stephen Finucane acac6905f9 sphinxext: Log with 'str', not 'repr'
The latter results in 'u' prefixes to most strings, and 'str' generally
exposes something more human-readable than 'repr'.

Change-Id: I8cf0cc0593341c92a6798e75ee2aeff3115ebda5
2017-06-07 15:58:29 +01:00
Vu Cong Tuan 1a0ee9a787 Fix html_last_updated_fmt for Python3
Changing Popen to .check_output because of 2 reasons:
1. check_output() will raise CalledProcessError if
the called process returns a non-zero return code.
2. For consistency with keystone [1] and cinder [2]

[1] https://review.openstack.org/#/c/457142/
[2] https://review.openstack.org/#/c/433081

Change-Id: I1033016ffdaa83e216cffab7cf9713bee7fba758
2017-06-07 09:39:50 +07:00
Ben Nemec 297ba5a1f0 Cast generator_options to dict
At some point in the development of this feature, I cleaned up an
"unnecessary" loop that was writing the generator_options.  It turns
out this wasn't as unnecessary as I thought.  A ConfigOpts instance
looks dict-like enough to pass the unit tests, but when it's
actually passed to the yaml formatter it fails because yaml doesn't
know what to do with it.

Instead of reintroducing the loop, it seems just casting the
ConfigOpts to a dict will work.

Change-Id: I0aaac8485259cc80a430bb80684d1bfe1c7f91c3
2017-06-05 16:52:08 +00:00
Javier Pena e63f1f66d6 Add PyYAML as a requirement
https://review.openstack.org/451081 added a requirement on PyYAML
without explicitly including it in requirements.txt

Change-Id: Ib11f5262f3cfd451eeaf0bd4a0374ab7bbc38058
2017-06-05 10:11:35 +02:00
OpenStack Proposal Bot d32af197a7 Updated from global requirements
Change-Id: Ibc157e9f292013703b0309b9e51f8c3df27c5658
2017-06-02 22:05:05 +00:00
Ben Nemec a29c084cb1 Machine Readable Sample Config
Adds the ability for the sample config generator to output the
config data in the machine readable formats yaml and json.

bp machine-readable-sample-config

Change-Id: I236918f0c1da27358aace66914aae5c34afef301
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
2017-06-01 20:47:01 +00:00
ChangBo Guo(gcb) f0a915f596 Remove dependency oslo.i18n from test-requirements.txt
oslo.i18n is one of runtime requirements.

Change-Id: I77c7cb5e2d5a3c0f0c417db14de0fca2c69629ec
2017-05-24 17:54:36 +08:00
OpenStack Proposal Bot 741abca48e Updated from global requirements
Change-Id: I0c5efb33749823775358c2a5ea26c432615f4f62
2017-05-23 11:57:49 +00:00
OpenStack Proposal Bot ab3b8b69c3 Updated from global requirements
Change-Id: Id837615df6a245bdfe97633d7753e8d2560a9677
2017-05-17 03:56:27 +00:00
Jenkins 3290830993 Merge "Updated from global requirements" 2017-05-15 06:54:22 +00:00
OpenStack Proposal Bot a8046b48a7 Updated from global requirements
Change-Id: I2a473829436ebb156937733f8533cd6b1827fb47
2017-05-15 00:52:42 +00:00
Radomir Dopieralski 47d7c1c090 Handle multi-line default values in olso-config-generator
The oslo.config file format permits multi-line values for options,
however all the lines except for the first one need to be indented.

Right now oslo-config-generator fails to take that into account, and
instead outputs the formatted value as is, adding a comment character
only to the first line, and not commenting out or indenting the
subsequent lines.

This patch tries to fix that by adding a comment character and some
indentation to every newline in the formatted value.

Change-Id: I33381c8cfb59901ce6dfc07bd662f2edb56531dd
Closes-bug: #1689594
2017-05-10 10:59:40 +02:00
Chen 0b0200572d Clarify info on a comment
Change-Id: I3fb771520482262743e581ab74cbf0ab145f17fe
2017-05-04 21:08:16 +09:00
Doug Hellmann 12fd34b963 add deprecation_reason to log message
When we log the warning that an option is deprecated for removal,
include the reason if we have one. Previously the deprecation reason was
only visible in the sample configuration file.

Add some tests for the log messages emitted when deprecated options are
used.

Change-Id: I5e309a3651041580fdf529ff31e18bbd90714f35
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-04-25 11:01:42 -04:00
Takashi NATSUME 4cc7c6cb9b Fix string interpolation in ValueError
Change-Id: Ief34fbf75a28c46b95c08a4d7ae2cb831607a05b
Closes-Bug: #1684771
2017-04-21 09:06:51 +09:00