From 1a1d9d09f44ede110baa76b330d790932fd4c1bb Mon Sep 17 00:00:00 2001 From: Edwin Zhai Date: Wed, 6 Jul 2016 05:42:46 +0000 Subject: [PATCH] Fix watcher doc build error Updates the module name to reflect the right defination of efficacy specification, and adds doc string to some class. Change-Id: If54e65a5e98521d74d8e19a21dd900ecd37edfe5 Closes-Bug: #1599368 --- doc/source/glossary.rst | 2 +- watcher/decision_engine/goal/goals.py | 13 +++++++++++++ watcher/doc.py | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/source/glossary.rst b/doc/source/glossary.rst index acfa151f0..a609f6567 100644 --- a/doc/source/glossary.rst +++ b/doc/source/glossary.rst @@ -228,7 +228,7 @@ Efficacy Indicator Efficacy Specification ====================== -.. watcher-term:: watcher.api.controllers.v1.efficacy_specification +.. watcher-term:: watcher.decision_engine.goal.efficacy.base .. _efficacy_definition: diff --git a/watcher/decision_engine/goal/goals.py b/watcher/decision_engine/goal/goals.py index ca26944cb..cea741880 100644 --- a/watcher/decision_engine/goal/goals.py +++ b/watcher/decision_engine/goal/goals.py @@ -72,6 +72,11 @@ class Unclassified(base.Goal): class ServerConsolidation(base.Goal): + """ServerConsolidation + + This goal is for efficient usage of compute server resources in order to + reduce the total number of servers. + """ @classmethod def get_name(cls): @@ -92,6 +97,10 @@ class ServerConsolidation(base.Goal): class ThermalOptimization(base.Goal): + """ThermalOptimization + + This goal is used to balance the temperature across different servers. + """ @classmethod def get_name(cls): @@ -112,6 +121,10 @@ class ThermalOptimization(base.Goal): class WorkloadBalancing(base.Goal): + """WorkloadBalancing + + This goal is used to evenly distribute workloads across different servers. + """ @classmethod def get_name(cls): diff --git a/watcher/doc.py b/watcher/doc.py index 955b82691..96287d65f 100644 --- a/watcher/doc.py +++ b/watcher/doc.py @@ -57,7 +57,7 @@ class BaseWatcherDirective(rst.Directive): if not obj_raw_docstring: # Raise a warning to make the tests fail wit doc8 - raise self.error("No docstring available for this plugin!") + raise self.error("No docstring available for %s!" % obj) obj_docstring = inspect.cleandoc(obj_raw_docstring) self.add_textblock(obj_docstring)