From efa7e69154eb3e773233bb46401030443e034688 Mon Sep 17 00:00:00 2001 From: Aaron-DH Date: Wed, 22 Feb 2017 14:48:25 +0800 Subject: [PATCH] Fix some mistake and format in docs Change-Id: I4280d50412c4915aa085c5c1d8f449d0dc323161 --- doc/source/arch.rst | 6 +++++- doc/source/installation.rst | 14 +++++++------- doc/source/rating/introduction.rst | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/doc/source/arch.rst b/doc/source/arch.rst index f2f7e01f..d4929663 100644 --- a/doc/source/arch.rst +++ b/doc/source/arch.rst @@ -2,7 +2,7 @@ CloudKitty's Architecture ========================= -CloudKitty can be cut in four big parts: +CloudKitty can be cut in five big parts: * API * Data collection (collector) @@ -110,6 +110,10 @@ Example of minimal rating module (taken from the Noop module): """ return True + @property + def priority(self): + return 1 + def reload_config(self): pass diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 3d7f62c3..68f7c1c1 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -59,9 +59,9 @@ Install the dashboard module PY_PACKAGES_PATH=`pip --version | cut -d' ' -f4` -#. Add the enabled file to the horizon settings or installation. Depending on -your setup, you might need to add it to ``/usr/share`` or directly in the -horizon python package:: +#. Add the enabled file to the horizon settings or installation. + Depending on your setup, you might need to add it to ``/usr/share`` or + directly in the horizon python package:: # If horizon is installed by packages: ln -sf $PY_PACKAGES_PATH/cloudkittydashboard/enabled/_[0-9]*.py \ @@ -170,8 +170,8 @@ For keystone (identity) API v2 (deprecated) Please note that: -* `http://localhost:5000/v2.0`and `http://localhost:35357/v2.0` are your -identity endpoints. +* `http://localhost:5000/v2.0` and `http://localhost:35357/v2.0` are your + identity endpoints. * the tenant named `service` is also commonly called `services` @@ -227,8 +227,8 @@ The following shows the basic configuration items: Please note that: -* `http://localhost:5000/v3`and `http://localhost:35357/v3` are your identity -endpoints. +* `http://localhost:5000/v3` and `http://localhost:35357/v3` are your identity + endpoints. * the tenant named `service` is also commonly called `services` diff --git a/doc/source/rating/introduction.rst b/doc/source/rating/introduction.rst index f661cbd4..5b8d7920 100644 --- a/doc/source/rating/introduction.rst +++ b/doc/source/rating/introduction.rst @@ -10,8 +10,24 @@ 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: