Workaround rgw modules conflict, as there are two separate modules named
rgw: src/pybind/rgw, src/pybind/mgr/rgw
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* refs/pull/41509/head:
common/cmdparse: fix CephBool validation for tell commands
mgr/nfs: fix 'nfs export create' argument order
common/cmdparse: emit proper json
mon/MonCommands: add -- seperator to example
qa/tasks/cephfs/test_nfs: fix export create test
mgr: make mgr commands compat with pre-quincy mon
doc/_ext/ceph_commands: handle non-positional args in docs
mgr: fix reweight-by-utilization cephbool flag
mon/MonCommands: convert some CephChoices to CephBool
mgr/k8sevents: fix help strings
pybind/mgr/mgr_module: fix help desc formatting
mgr/orchestrator: clean up 'orch {daemon add,apply} rgw' args
mgr/orchestrator: add end_positional to a few methods
mgr/orchestrator: reformat a few methods
pybind/ceph_argparse: stop parsing when we run out of positional args
pybind/ceph_argparse: remove dead code
pybind/mgr/mgr_module: infer non-positional args
pybind/mgr/mgr_module: add separator for non-positional args
command/cmdparse: use -- to separate positional from non-positional args
pybind/ceph_argparse: adjust help text for non-positional args
pybind/ceph_argparse: track a 'positional' property on cli args
Reviewed-by: Kefu Chai <kchai@redhat.com>
there is chance that the default value of an option is empty, before
this change the rendered result would be "````", and sphinx is confused
at seeing this:
Unexpected section title or transition.
as it takes it as a notion of section title. after this change,
the "literal" filter is always applied to the default value, so an empty
string is rendered like "<empty string>" instead.
Signed-off-by: Kefu Chai <kchai@redhat.com>
less repeating this way, this change also addresses the missing option
issue if the option to be rendered is the first option in a document,
and there is no "mgr_module" directive before it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change,
.. mgr_module:: None
is required at end of a mgr module document to reset the context, so
the builder env is not polluted when processing the next document.
after this change, this ending directive is not needed anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
instead of collecting all options from all modules, just load the
options from the specified module, this addresses the issue where
options with the same name are overriden by the options defined by
another mgr module.
Signed-off-by: Kefu Chai <kchai@redhat.com>
in addition to "mgr_module" directive, add the "module" option to
confval. this allows a certain option to specify its own module without
being nested in a "mgr_module" directive pair.
Signed-off-by: Kefu Chai <kchai@redhat.com>
which allows us to use different scheme when defining an option,
without this change, if two options in different mgr module share the
same name we cannot differentiate them, after this change, their id
would prefixed with the module name.
Signed-off-by: Kefu Chai <kchai@redhat.com>
there is chance that we don't have desc, desc_long or fmt_desc, in that
case, we should just skip desc before checking its length. so, just use
'if desc' which is able to check for None or empty string.
Signed-off-by: Kefu Chai <kchai@redhat.com>
default could be None and we don't reference the default value using
`opt.default`, so this variable is always defined. to avoid printing
a None default value, check for a None value. see
https://jinja.palletsprojects.com/en/2.11.x/templates/#none
Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, the rendered Default is "0Ei" if the default size is 0,
would be more readable if it is "0B" or "0".
Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we check the exisitence of default value of an
option using "if default", but this is wrong. what if "default" is an
empty string or a numeric value of 0, or just False?
after this change, its exisitence is checked using "if default is
defined", so all "false" default values are rendered as well.
Signed-off-by: Kefu Chai <kchai@redhat.com>
to format size options in the same format supported by our C++
strict_iec_cast() parser. so they are more consistent from user's
perspective.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* add a field named "fmt_desc", which is the description formatted using
reStructuredText. it is preserved as it is if it's different from the
desc or long_desc of an option. we can consolidate it with long_desc
in future, and use pretty printer which has minimal support for
reStructuredText for printing the formatted descriptions for a better
user experience of command line. but at this moment, fmt_desc has
only one consumer: the "ceph_confval" sphinx extension which extracts
and translate the options yaml file to reStructuredText, which is in
turn rendered by sphinx.
* remove unused options from the doc
- journal_queue_max_ops
- journal_queue_max_bytes
Signed-off-by: Kefu Chai <kchai@redhat.com>
- move current release table to index
- add table for past releases and actual EOL
- move past release timeline too
- make timeline less wide (avoid wrapping)
- use full dates, not just month + year
- clean up left-side toctree
- capitalize release names
Signed-off-by: Sage Weil <sage@newdream.net>
there is chance that the value of of the argdesc's kv pair contains
"=". for instance, the goodchars regexp could contain '='. so we should
stop at the first '='.
this change fixes the parsing of "osd pool application set" command.
Signed-off-by: Kefu Chai <kchai@redhat.com>
This is due to `mgr/rook` now also includes `._helper`
Co-authored-by Kefu Chai <kchai@redhat.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
unlike the commands defined by C++, the commands defined by python
now uses "prefix" and "args" properties of elements in COMMAND class
attribute to define their command and arguments. the "cmd" property is
still available for the ceph CLI.
but the ceph_command sphinx extension should now use "prefix" and "args"
for printing out the usage of commands implemented using python. in
this change, the extension is updated to read "prefix" and "args"
properties of command defined by python modules.
Signed-off-by: Kefu Chai <kchai@redhat.com>
"mon enable_stretch_mode" command's arg descriptors are delimited with
", ", so we should ignore empty kv when split the params with ",".
Signed-off-by: Kefu Chai <kchai@redhat.com>
so we can build the command doc using ReadTheDoc infra, without adding
the generated rst file to the source repo.
before this change, all the commands are ordered alphabetically. after
this change, command docs are generated by two directives, and are
ordered separately. we could restructure the directives and merge them.
but let's leave it for a future change if this is important.
for more details on writing sphinx directives, see
https://www.sphinx-doc.org/en/master/extdev/markupapi.html and
https://docutils.sourceforge.io/docs/howto/rst-directives.html
Signed-off-by: Kefu Chai <kchai@redhat.com>
The "dumpling" column goes past the right margin and looks wrong.
Also, this modification shortens the table by 10 rows or so, which
can't be a bad thing.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Added nautilus + the latest releases from mimic and luminous
in order to keep dumpling column, ceph_releases is modified to allow 13 columns
Signed-off-by: Torben Hørup <th@synack.fo>