Commit Graph

20 Commits

Author SHA1 Message Date
Kefu Chai
2bb6821f50 mgr/diskprediction_local: add Predictor abstract class
to make the interface more explicit, also pave the road to mypy.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-20 14:51:26 +08:00
Kefu Chai
7fdd7564fa doc: wrap example command
otherwise the field name in the field list would be rendered with a
small width.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-14 12:32:42 +08:00
Kefu Chai
1dbc32f69a doc: define command properties using field list
the rendering is more compacted this way, and the parameters can be
aligned.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-13 10:18:58 +08:00
Kefu Chai
642158fd38 doc: group commands by prefix
as there are lots commands, the toc in sidebar is clutterred with them,
so would be better to group them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-13 10:18:58 +08:00
Kefu Chai
a3153bd53f doc: split the argdesc pair at the first '='
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>
2021-02-13 10:18:58 +08:00
Sebastian Wagner
a3555a22c8 doc: add rook_client._helper to mock_imports
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>
2021-01-31 11:19:01 +08:00
Kefu Chai
620e318b2e doc/_ext: use iterator of tuple to build dict
As suggested by Ernesto Puerta <epuertat@redhat.com>

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 17:25:27 +08:00
Kefu Chai
0fb8a988df doc/_ext: PEP8 compliance
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 17:25:27 +08:00
Kefu Chai
d25ed64449 doc/_ext: do not mock ceph_argparse
this module is used for convert argspec to argdesc by
CLICommand.load_func_metadata()

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 17:25:27 +08:00
Kefu Chai
925c4d8d04 doc/_ext: add python_path option to ceph-mgr-commands
so we can add more python paths in addition to the one used for finding
mgr modules.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 17:25:27 +08:00
Kefu Chai
fbbe4474ac doc/_ext: parse prefix and args for command signature
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>
2021-01-15 17:25:27 +08:00
Kefu Chai
ef281f6b55 doc/_ext: accept params separated with ", "
"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>
2021-01-08 11:35:42 +08:00
Kefu Chai
202b805aaf doc: build mon_command_api.rst using a homebrew extension
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>
2021-01-08 11:35:42 +08:00
Kefu Chai
be26c566e5 doc: remove edit_on_github sphinx extension
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-01 15:41:45 +08:00
Kefu Chai
9442683f61 doc: drop py2 support
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-05 10:58:28 +08:00
Nathan Cutler
ad6304149e doc/releases/schedule.rst: drop dumpling from Timeline
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>
2019-09-17 17:42:50 +02:00
Torben Hørup
42a04ff114 Doc: update release schedule
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>
2019-06-13 01:12:42 +08:00
Kefu Chai
d185c46a43 admin,doc/_ext/ceph_releases.py: use yaml.safe_load()
see
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-09 22:20:14 +08:00
Noah Watkins
adc08c1f99 doc: sort releases by date and version
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-01-15 13:15:29 -08:00
Noah Watkins
bb887b78f8 doc: show edit on github links and version warnings
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2018-11-02 14:49:15 -07:00