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
This commit is contained in:
Edwin Zhai
2016-07-06 05:42:46 +00:00
parent 64903ce56c
commit 1a1d9d09f4
3 changed files with 15 additions and 2 deletions

View File

@@ -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:

View File

@@ -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):

View File

@@ -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)