Files
cloudkitty/doc/source/rating/introduction.rst
zhangguoqing 4672cf974f [docs] Add rating module introduction
1. Add the introduction of rating modules.
2. Add operating example about enable/disable and set priority
   for rating modules.

Change-Id: I3ac6786e78fcb3246dac5f8286128101a6f88656
2017-01-07 04:46:55 +00:00

51 lines
1.5 KiB
ReStructuredText

==========================
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.
Enable or disable module
=======================
Enable the hashmap rating module:
.. code:: raw
$ cloudkitty module-enable -n hashmap
+---------+---------+----------+
| Module | Enabled | Priority |
+---------+---------+----------+
| hashmap | True | 1 |
+---------+---------+----------+
Disable the pyscripts rating module:
.. code:: raw
$ cloudkitty module-disable -n pyscripts
+-----------+---------+----------+
| Module | Enabled | Priority |
+-----------+---------+----------+
| pyscripts | False | 1 |
+-----------+---------+----------+
Set priority
============
Set the hashmap rating module priority to 100:
.. code:: raw
$ cloudkitty module-set-priority -n hashmap -p 100
+---------+---------+----------+
| Module | Enabled | Priority |
+---------+---------+----------+
| hashmap | True | 100 |
+---------+---------+----------+