From 89c8c734635aed3a31dbae8331652b7772323219 Mon Sep 17 00:00:00 2001 From: Justin Ferrieu Date: Tue, 5 Feb 2019 15:57:40 +0100 Subject: [PATCH] Moved Rating module introduction to Rating index Rating module introduction has been moved to respective index. Some rewriting has been made in order to achieve a clearer and more concise user documentation. Change-Id: Ied923a0e6eb5259a5910e104a46a64c16ecbfdd3 --- doc/source/user/rating/index.rst | 80 ++++++++++++++++++++++++- doc/source/user/rating/introduction.rst | 66 -------------------- 2 files changed, 79 insertions(+), 67 deletions(-) delete mode 100644 doc/source/user/rating/introduction.rst diff --git a/doc/source/user/rating/index.rst b/doc/source/user/rating/index.rst index 9bff6c93..d9f246ab 100644 --- a/doc/source/user/rating/index.rst +++ b/doc/source/user/rating/index.rst @@ -2,9 +2,87 @@ Rating ====== +CloudKitty is shipped with three rating modules: + +* ``noop``: Rating module for testing purpose (enabled only). + +* ``hashmap``: Default rating module corresponding to usual CloudKitty + use cases (disabled by default). + +* ``pyscripts``: Custom rating module allowing you to add your + own python scripts (disabled by default). + +You can enable or disable each module independently +and prioritize one over another at will. + +* ``Enabled`` state is represented by a boolean value (``True`` or ``False``). +* ``Priority`` is represented by an integer value. + +.. note:: + + The module with the biggest priority value will process data first + (descending order). + +List available modules +====================== + +List available rating modules: + +.. code:: console + + $ cloudkitty module list + +-----------+---------+----------+ + | Module | Enabled | Priority | + +-----------+---------+----------+ + | hashmap | False | 1 | + | noop | True | 1 | + | pyscripts | False | 1 | + +-----------+---------+----------+ + +Enable or disable module +======================== + +Enable the hashmap rating module: + +.. code:: console + + $ cloudkitty module enable hashmap + +---------+---------+----------+ + | Module | Enabled | Priority | + +---------+---------+----------+ + | hashmap | True | 1 | + +---------+---------+----------+ + +Disable the pyscripts rating module: + +.. code:: console + + $ cloudkitty module disable pyscripts + +-----------+---------+----------+ + | Module | Enabled | Priority | + +-----------+---------+----------+ + | pyscripts | False | 1 | + +-----------+---------+----------+ + +Set priority +============ + +Set the hashmap rating module priority to 100: + +.. code:: console + + $ cloudkitty module set priority hashmap 100 + +---------+---------+----------+ + | Module | Enabled | Priority | + +---------+---------+----------+ + | hashmap | True | 100 | + +---------+---------+----------+ + +More details +============ .. toctree:: + :maxdepth: 2 :glob: - introduction.rst hashmap.rst pyscripts.rst diff --git a/doc/source/user/rating/introduction.rst b/doc/source/user/rating/introduction.rst deleted file mode 100644 index 0da4432f..00000000 --- a/doc/source/user/rating/introduction.rst +++ /dev/null @@ -1,66 +0,0 @@ -========================== -Rating module introduction -========================== - -There are three rating modules in Cloudkitty now, including the ``noop``, -``hashmap`` and ``pyscripts``. Only the noop rating module is just for -testing. All modules can be enabled and disabled dynamically. Cloudkitty -allows to run several rating modules simultaneously, and the user or -operator can set the priority for a module. The order in which the modules -process the data depends on their priority. The module with the highest -priority comes first. - -List current modules -==================== - -List current rating modules: - -.. code:: raw - - $ cloudkitty module list - +-----------+---------+----------+ - | Module | Enabled | Priority | - +-----------+---------+----------+ - | hashmap | False | 1 | - | noop | True | 1 | - | pyscripts | True | 1 | - +-----------+---------+----------+ - -Enable or disable module -======================== - -Enable the hashmap rating module: - -.. code:: raw - - $ cloudkitty module enable hashmap - +---------+---------+----------+ - | Module | Enabled | Priority | - +---------+---------+----------+ - | hashmap | True | 1 | - +---------+---------+----------+ - -Disable the pyscripts rating module: - -.. code:: raw - - $ cloudkitty module disable pyscripts - +-----------+---------+----------+ - | Module | Enabled | Priority | - +-----------+---------+----------+ - | pyscripts | False | 1 | - +-----------+---------+----------+ - -Set priority -============ - -Set the hashmap rating module priority to 100: - -.. code:: raw - - $ cloudkitty module set priority hashmap 100 - +---------+---------+----------+ - | Module | Enabled | Priority | - +---------+---------+----------+ - | hashmap | True | 100 | - +---------+---------+----------+