diff --git a/doc/source/architecture.rst b/doc/source/architecture.rst index fcdb5dcb5..40671f3c9 100644 --- a/doc/source/architecture.rst +++ b/doc/source/architecture.rst @@ -51,7 +51,7 @@ MongoDB,...) but will probably be more performant when using which are optimized for handling time series data, which are arrays of numbers indexed by time (a datetime or a datetime range). -.. _watcher_api_definition: +.. _archi_watcher_api_definition: Watcher API ----------- @@ -63,13 +63,13 @@ It enables the :ref:`Administrator ` of a :ref:`Cluster ` to control and monitor the Watcher system via any interaction mechanism connected to this API: -- :ref:`CLI ` +- :ref:`CLI ` - Horizon plugin - Python SDK You can also read the detailed description of `Watcher API`_. -.. _watcher_applier_definition: +.. _archi_watcher_applier_definition: Watcher Applier --------------- @@ -111,7 +111,7 @@ If the :ref:`Action ` fails, the previous state of the :ref:`Managed resource ` (i.e. before the command was sent to the underlying OpenStack service). -.. _watcher_cli_definition: +.. _archi_watcher_cli_definition: Watcher CLI ----------- @@ -121,14 +121,14 @@ Watcher system in order to control it or to know its current status. Please, read `the detailed documentation about Watcher CLI `_ -.. _watcher_database_definition: +.. _archi_watcher_database_definition: Watcher Database ---------------- This database stores all the Watcher domain objects which can be requested -by the :ref:`Watcher API ` or the -:ref:`Watcher CLI `: +by the :ref:`Watcher API ` or the +:ref:`Watcher CLI `: - :ref:`Audit templates ` - :ref:`Audits ` @@ -139,7 +139,7 @@ by the :ref:`Watcher API ` or the The Watcher domain being here "*optimization of some resources provided by an OpenStack system*". -.. _watcher_decision_engine_definition: +.. _archi_watcher_decision_engine_definition: Watcher Decision Engine ----------------------- @@ -169,10 +169,10 @@ In order to compute the potential :ref:`Solution ` for the Audit, the :ref:`Strategy ` relies on two sets of data: - the current state of the -:ref:`Managed resources ` -(e.g., the data stored in the Nova database) + :ref:`Managed resources ` + (e.g., the data stored in the Nova database) - the data stored in the -:ref:`Cluster History Database ` + :ref:`Cluster History Database ` which provides information about the past of the :ref:`Cluster ` diff --git a/doc/source/cmds/watcher-db-manage.rst b/doc/source/cmds/watcher-db-manage.rst index d2cfd064b..ec6706a13 100644 --- a/doc/source/cmds/watcher-db-manage.rst +++ b/doc/source/cmds/watcher-db-manage.rst @@ -6,9 +6,9 @@ .. _watcher-db-manage: -============= +================= watcher-db-manage -============= +================= The :command:`watcher-db-manage` utility is used to create the database schema tables that the watcher services will use for storage. It can also be used to diff --git a/doc/source/deploy/user-guide.rst b/doc/source/deploy/user-guide.rst index eedd7d80a..117802441 100644 --- a/doc/source/deploy/user-guide.rst +++ b/doc/source/deploy/user-guide.rst @@ -90,7 +90,7 @@ configuration file. $ watcher action-plan-list --audit - Have a look on the list of optimization :ref:`actions ` -contained in this new :ref:`action plan `: + contained in this new :ref:`action plan `: .. code:: bash diff --git a/doc/source/dev/contributing.rst b/doc/source/dev/contributing.rst index 797ecc71f..d15daa422 100644 --- a/doc/source/dev/contributing.rst +++ b/doc/source/dev/contributing.rst @@ -6,9 +6,9 @@ .. _contributing: -====================== +======================= Contributing to Watcher -====================== +======================= If you're interested in contributing to the Watcher project, the following will help get you started. @@ -43,7 +43,7 @@ notifications of important events. Project Hosting Details -------------------------- +----------------------- Bug tracker http://launchpad.net/watcher diff --git a/doc/source/dev/plugins.rst b/doc/source/dev/plugins.rst index 424101766..9d7b3f5b5 100644 --- a/doc/source/dev/plugins.rst +++ b/doc/source/dev/plugins.rst @@ -70,7 +70,7 @@ Abstract Plugin Class Here below is the abstract ``BaseStrategy`` class that every single strategy should implement: -.. automodule:: watcher.decision_engine.strategy.base +.. automodule:: watcher.decision_engine.strategy.strategies.base :noindex: .. autoclass:: BaseStrategy diff --git a/doc/source/glossary.rst b/doc/source/glossary.rst index 59c06384f..c0b9532c3 100644 --- a/doc/source/glossary.rst +++ b/doc/source/glossary.rst @@ -4,9 +4,9 @@ https://creativecommons.org/licenses/by/3.0/ -========== - Glossary -========== +======== +Glossary +======== .. glossary:: :sorted: @@ -262,7 +262,7 @@ specific domain. Please, read `the official OpenStack definition of a Project `_. -.. _primitive_definition +.. _primitive_definition: Primitive ========= diff --git a/doc/source/index.rst b/doc/source/index.rst index 18d1fa67e..b3ce4cb7b 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -8,11 +8,7 @@ Welcome to Watcher's developer documentation ============================================ -Mission -======= - -Provide an auditing service for OpenStack to improve workload placement -on-the-go. +.. include:: ../../README.rst The developer documentation provided here is continually kept up-to-date based on the latest code, and may not represent the state of the project at any @@ -29,6 +25,7 @@ Introduction glossary architecture + deploy/configuration dev/environment dev/contributing dev/plugins diff --git a/doc/source/readme.rst b/doc/source/readme.rst deleted file mode 100644 index a6210d3d8..000000000 --- a/doc/source/readme.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../README.rst diff --git a/doc/source/usage.rst b/doc/source/usage.rst deleted file mode 100644 index 3fbe54be9..000000000 --- a/doc/source/usage.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. - Except where otherwise noted, this document is licensed under Creative - Commons Attribution 3.0 License. You can view the license at: - - https://creativecommons.org/licenses/by/3.0/ - -======== -Usage -======== - -To use watcher in a project:: - - import watcher diff --git a/doc/source/webapi/v1.rst b/doc/source/webapi/v1.rst index 2698d0186..a91e0a50c 100644 --- a/doc/source/webapi/v1.rst +++ b/doc/source/webapi/v1.rst @@ -4,15 +4,15 @@ https://creativecommons.org/licenses/by/3.0/ -===================== - RESTful Web API (v1) -===================== +==================== +RESTful Web API (v1) +==================== Audit Templates =============== .. rest-controller:: watcher.api.controllers.v1.audit_template:AuditTemplatesController - :webprefix: /v1/audit_template + :webprefix: /v1/audit_templates .. autotype:: watcher.api.controllers.v1.audit_template.AuditTemplateCollection :members: @@ -20,7 +20,6 @@ Audit Templates .. autotype:: watcher.api.controllers.v1.audit_template.AuditTemplate :members: - Audits ====== @@ -33,24 +32,22 @@ Audits .. autotype:: watcher.api.controllers.v1.audit.Audit :members: - Links ===== .. autotype:: watcher.api.controllers.link.Link :members: - -ActionPlans -=========== +Action Plans +============ .. rest-controller:: watcher.api.controllers.v1.action_plan:ActionPlansController :webprefix: /v1/action_plans -.. autotype:: watcher.api.controllers.v1.action_plan.ActionPlan +.. autotype:: watcher.api.controllers.v1.action_plan.ActionPlanCollection :members: -.. autotype:: watcher.api.controllers.v1.action_plan.ActionPlanCollection +.. autotype:: watcher.api.controllers.v1.action_plan.ActionPlan :members: diff --git a/watcher/api/controllers/v1/action_plan.py b/watcher/api/controllers/v1/action_plan.py index cfa13835c..22be2b4ee 100644 --- a/watcher/api/controllers/v1/action_plan.py +++ b/watcher/api/controllers/v1/action_plan.py @@ -295,7 +295,7 @@ class ActionPlansController(rest.RestController): :param sort_key: column to sort results by. Default: id. :param sort_dir: direction to sort. "asc" or "desc". Default: asc. :param audit_uuid: Optional UUID of an audit, to get only actions - for that audit. + for that audit. """ return self._get_action_plans_collection( marker, limit, sort_key, sort_dir, audit_uuid=audit_uuid) @@ -307,13 +307,13 @@ class ActionPlansController(rest.RestController): """Retrieve a list of action_plans with detail. :param action_plan_uuid: UUID of a action plan, to get only - :action_plans for that action. + action_plans for that action. :param marker: pagination marker for large data sets. :param limit: maximum number of resources to return in a single result. :param sort_key: column to sort results by. Default: id. :param sort_dir: direction to sort. "asc" or "desc". Default: asc. :param audit_uuid: Optional UUID of an audit, to get only actions - for that audit. + for that audit. """ # NOTE(lucasagomes): /detail should only work agaist collections parent = pecan.request.path.split('/')[:-1][-1] diff --git a/watcher/decision_engine/solution/base.py b/watcher/decision_engine/solution/base.py index 182fd46bb..5bdb03a86 100644 --- a/watcher/decision_engine/solution/base.py +++ b/watcher/decision_engine/solution/base.py @@ -38,7 +38,7 @@ applied. Two approaches to dealing with this can be envisaged: - **fully automated mode**: only the :ref:`Solution ` - with the highest ranking (i.e., the highest + with the highest ranking (i.e., the highest :ref:`Optimization Efficiency `) will be sent to the :ref:`Watcher Planner ` and translated into concrete :ref:`Actions `. diff --git a/watcher/doc.py b/watcher/doc.py index 0d1a1c5a8..ec91a6420 100644 --- a/watcher/doc.py +++ b/watcher/doc.py @@ -61,9 +61,7 @@ class WatcherTerm(rst.Directive): cls_path = self.arguments[0] try: - module_name, obj_name = cls_path.rsplit(".", 1) - module = importlib.import_module(module_name) - cls = getattr(module, obj_name) + cls = importlib.import_module(cls_path) except Exception as exc: raise self.error(exc) diff --git a/watcher/metrics_engine/cluster_history/api.py b/watcher/metrics_engine/cluster_history/api.py index a9d826041..ce76b6db3 100644 --- a/watcher/metrics_engine/cluster_history/api.py +++ b/watcher/metrics_engine/cluster_history/api.py @@ -40,9 +40,9 @@ API is proposed with some helper classes in order to : See `the full list of meter types `_ - simplify the development of a new :ref:`Strategy ` - avoid duplicating the same code in several -:ref:`Strategies ` + :ref:`Strategies ` - have a better consistency between the different -:ref:`Strategies ` + :ref:`Strategies ` - avoid any strong coupling with any external metrics/events storage system (the proposed API and measurement naming system acts as a pivot format) diff --git a/watcher/metrics_engine/cluster_model_collector/api.py b/watcher/metrics_engine/cluster_model_collector/api.py index ae4fcf46d..b08ee9fff 100644 --- a/watcher/metrics_engine/cluster_model_collector/api.py +++ b/watcher/metrics_engine/cluster_model_collector/api.py @@ -34,7 +34,7 @@ and enables the :ref:`Strategy ` to request information such as: - What compute nodes are in a given -:ref:`Availability Zone ` + :ref:`Availability Zone ` or a given :ref:`Host Aggregate ` ? - What :ref:`Instances ` are hosted on a given compute node ?