This patch updates the _format_opt method to return a dict instead of a
list. This makes the RST templates easier to read and maintain.
Change-Id: Ia1b494b8ec8ed1e523ebe7198bcba00594e21ac5
Support for flagmappings was useful in the days before OptGroup was
available. Today, it's mostly a burden and not necessary for projects
such as nova. Make this feature optional, allowing us to make use of
built-in oslo.config where available.
The actual flagmapping files themselves are found in another project and
cannot be removed here. This will be done in a separate change.
Change-Id: I27296954ad8ce2010fc464ad81c8da4859ba2531
We're going to add another code path for projects that rely on
oslo.config's 'OptGroup' to group their options. To minimize
duplication, we should drag the option formatting into its own
function.
Change-Id: I755489036758d589240d9c057e6fcb109de68fde
There's a rather complicated bit of code used to split blocks of text
into paragraphs. Replace this with something a little simpler that makes
use of our paragraph-ization rather than trying to rebuild blocks of
text.
Change-Id: I321ba57d0f7090afec34c6207f9a42493b8a3249
There is support for displaying deprecation information in a somewhat
structured manner (proper lists, emphasis on titles, etc.). However, the
deprecation information is still included in the help text rather than
in this flags section. This makes things more difficult than they need
to be.
Resolve this by instead including any deprecation information in the
flags section. This will transform output from something like this:
(String) DEPRECATED: Host to locate redis. Replaced by
[DEFAULT]/transport_url
to this:
(String) Host to locate redis.
Deprecated
Replaced by [DEFAULT]/transport_url
Which should be a little more obvious.
It's necessary to fix the template, which added the flags at the same
level as the title and description, resulting in varying numbers of
bullet points for the list.
Change-Id: Ifaee90a814fa3efee8b41eb0411535cff70e7309
With the removal of docbook support, we now support a single type of
output. As such, the aforementioned option is surplus to requirements
and can be removed. Do just this.
Change-Id: Ib9d49fd465ecceb92075495de966b2189a371103
The command "./autohelp-wrapper update cinder" is throwing
"TypeError: sequence item 0: expected string, int found".
This error is due to using ", ".join on the
list of integers in autohelp.py.
Change-Id: Ib4142466d15534adbdade8ebd8724a954f50e95d
Closes-Bug: #1651738
Co-Authored-By: Nikesh Mahalka <Nikesh.Mahalka.ctr@kaminario.com>
Co-Authored-By: Alekhya Mallina <alekhyam@biarca.com>
Co-Authored-By: Srinivas Dasthagiri <srinivasd@biarca.com>
There is no hooks module available when running the
extract_swift_flags.py locally, so making this import optional.
Change-Id: I65ebacd1e3e4cf66ece0a9fcbbc785d79278e8bb
Not to break the script with the heading and trailing blanks.
It happens at glance with oslo.i18n deprecation messages.
Change-Id: I33ab7a815fc092cef2ed0688b0693c23802b23c6
The common configurations are described in the common
configurations table. The corresponding configutations
at each table are not necessary.
Change-Id: Ied2d03d1c7f71f5712fcf57d4499e127db327b7d
Implements: blueprint config-ref-common-sections
Add a definition list under the help text to detail pertinent flags.
Make 'mutable' one of these flags.
Change-Id: Idc0080be25db12485b33be421c5557d78418823c
This is very much a hack, but its really just to see if it is possible
to convert the bullet lists into text that renders correctly with rst.
This was tested with the nova-hyperv.rst:
f0607509e3/doc/config-reference/source/tables/nova-hyperv.rst
Change-Id: Iab063774f6732d52cd8e79f82ff0fc93bd6d306b
when run ./autohelp-wrapper rst aodh, it failed with:
AttributeError: 'BoolOpt' object has no attribute 'deprecated_reason'
we need to check the value before we use it
Change-Id: I362606ba186d1582f850bfa4d602503d6ea5079a
Closes-Bug: #1573953
If a configuration option is tagged as deprecated in the code and the
help text does not start with DEPRECATED: add this to better identify
options that are no longer used.
If the code provides an additional deprecated reason, append this to
the provided help text of the configuration option.
Change-Id: I1a7c76c0109a6e59cc87d0ddc942c6d1cfb9dc91
Update the configuration tables option type from an internal meta type
to a more meaningful description. E.g. Boolean for BoolOpt, String
for StringOpt, Multi-valued for MultiStrOpt etc.
Inspired by the translation used in Developer Docs
Change-Id: I5bd7aec727292ceef4dc0ff56ab8f334ea2f22bc
Running update of keystone produces the following exception which
teminates processing. This enables processing to continue, like
capture of other types of errors.
* Table 'federation_protocol' is already defined for this MetaData
instance. Specify 'extend_existing=True' to redefine options and
columns on an existing Table object.
Cater for projects that do not use sqlalchemy, e.g. swift.
Change-Id: I87df4bb784f94b7194374b2448e4c34beadb923f
Modifying configuration options (ignored modules, extra repositories,
hooks) for autohelp requires an update of the doc-tools repository,
which doesn't make much sense since the goal is to update the manuals
repository.
This patch removes the configuration options from the repository and
updates the scripts to use the configuration items in openstack-manuals.
Change-Id: I630d2a2fea690f6360039aa100331678468d18dc
If the flagmappings file doesn't exist the function will create it,
with all the sections set to Unknown. This mimics the behavior of the
`create`, not needed anymore.
Change-Id: I7a920300b784aa8fca6412c292d807beb4d5c8e5
Update the default paths to make the scripts work after the config-ref
publication.
Implements: blueprint config-ref-rst
Change-Id: I55534d08b10af4fb44a7dd22718ae22e44708559
When a module import fails the wrapper script doesn't display its
path/name, so it is complicated to debug. this patch displays the module
name before re-raising the exception.
Change-Id: Ie9d691a41b0c178b856f19605a8c6434d3ce2c88
We want to be able to change the section in which an option is
registered in the documentation. This patch uses a <project>.overrides
file to define in which section(s) an option should be moved.
The format of this file is (1 line per option):
[<group>/]<option> <new_group1>[ <new_group2> ... ]
Change-Id: I9fd0b763b6e56cd360694566de7f3acc3172c9c1
Closes-Bug: #1522794