]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/mgr: use subsections for two approaches to exposing commands
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 20 Jul 2022 15:52:17 +0000 (11:52 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 23 Aug 2022 17:01:45 +0000 (13:01 -0400)
This makes the content for each approach clearer and prepares
for a future sub-section.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
doc/mgr/modules.rst

index 9fb3b87ae3f3e7afa0ca95f29bcd9a56a337dbc0..8fea56241416dcc5c5b4422619a3ea2e9d19c739 100644 (file)
@@ -108,9 +108,13 @@ following commands::
 Exposing commands
 -----------------
 
-There are two approaches for exposing a command. The first one is to
-use the ``@CLICommand`` decorator to decorate the method which handles
-the command. like this
+There are two approaches for exposing a command. The first method involves using
+the ``@CLICommand`` decorator to decorate the methods needed to handle a command.
+The second method uses a ``COMMANDS`` attribute defined for the module class.
+
+
+The CLICommand approach
+~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code:: python
 
@@ -164,7 +168,11 @@ In addition to ``@CLICommand``, you could also use ``@CLIReadCommand`` or
 ``@CLIWriteCommand`` if your command only requires read permissions or
 write permissions respectively.
 
-The second one is to set the ``COMMANDS`` class attribute of your module to
+
+The COMMANDS Approach
+~~~~~~~~~~~~~~~~~~~~~
+
+This method uses the ``COMMANDS`` class attribute of your module to define
 a list of dicts like this::
 
     COMMANDS = [