Files
cloudkitty/doc/source/user/rating/introduction.rst
Luka Peschke 4b794472a8 Change the documentation layout
This changes the documentation layout according to the previously submitted
spec.

Change-Id: I9aa879af23ae4e993da60186eddaef8d22f59e79
Story: 2004179
Task: 28152
2018-12-14 10:28:59 +01:00

1.8 KiB

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:

$ cloudkitty module list
+-----------+---------+----------+
| Module    | Enabled | Priority |
+-----------+---------+----------+
| hashmap   | False   | 1        |
| noop      | True    | 1        |
| pyscripts | True    | 1        |
+-----------+---------+----------+

Enable or disable module

Enable the hashmap rating module:

$ cloudkitty module enable hashmap
+---------+---------+----------+
| Module  | Enabled | Priority |
+---------+---------+----------+
| hashmap | True    | 1        |
+---------+---------+----------+

Disable the pyscripts rating module:

$ cloudkitty module disable pyscripts
+-----------+---------+----------+
| Module    | Enabled | Priority |
+-----------+---------+----------+
| pyscripts | False   | 1        |
+-----------+---------+----------+

Set priority

Set the hashmap rating module priority to 100:

$ cloudkitty module set priority hashmap 100
+---------+---------+----------+
| Module  | Enabled | Priority |
+---------+---------+----------+
| hashmap | True    | 100      |
+---------+---------+----------+