Merge "Remove all sphinx warnings"
This commit is contained in:
commit
67754102c8
2
.gitignore
vendored
2
.gitignore
vendored
@ -44,7 +44,7 @@ output/*/index.html
|
|||||||
doc/build
|
doc/build
|
||||||
doc/source/api/*
|
doc/source/api/*
|
||||||
doc/source/samples
|
doc/source/samples
|
||||||
doc/source/watcher.conf.sample
|
doc/source/_static/*.sample
|
||||||
!doc/source/api/index.rst
|
!doc/source/api/index.rst
|
||||||
!doc/source/api/v1.rst
|
!doc/source/api/v1.rst
|
||||||
|
|
||||||
|
0
doc/source/_static/.placeholder
Normal file
0
doc/source/_static/.placeholder
Normal file
@ -1,14 +0,0 @@
|
|||||||
.. _watcher_sample_configuration_files:
|
|
||||||
|
|
||||||
==================================
|
|
||||||
Watcher sample configuration files
|
|
||||||
==================================
|
|
||||||
|
|
||||||
watcher.conf
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
The ``watcher.conf`` file contains most of the options to configure the
|
|
||||||
Watcher services.
|
|
||||||
|
|
||||||
.. literalinclude:: ../watcher.conf.sample
|
|
||||||
:language: ini
|
|
@ -6,8 +6,6 @@ Administrator Guide
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
apache-mod-wsgi
|
apache-mod-wsgi
|
||||||
conf-files
|
|
||||||
configuration
|
|
||||||
gmr
|
gmr
|
||||||
policy
|
policy
|
||||||
ways-to-install
|
ways-to-install
|
||||||
|
@ -10,7 +10,7 @@ Ways to install Watcher
|
|||||||
|
|
||||||
This document describes some ways to install Watcher in order to use it.
|
This document describes some ways to install Watcher in order to use it.
|
||||||
If you are intending to develop on or with Watcher,
|
If you are intending to develop on or with Watcher,
|
||||||
please read :doc:`../dev/environment`.
|
please read :doc:`../contributor/environment`.
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
-------------
|
-------------
|
||||||
@ -78,9 +78,10 @@ Install the Watcher modules dependencies:
|
|||||||
|
|
||||||
# pip install -r requirements.txt
|
# pip install -r requirements.txt
|
||||||
|
|
||||||
From here, refer to :doc:`configuration` to declare Watcher as a new service
|
From here, refer to :doc:`../configuration/configuring` to declare Watcher
|
||||||
into Keystone and to configure its different modules. Once configured, you
|
as a new service into Keystone and to configure its different modules.
|
||||||
should be able to run the Watcher services by issuing these commands:
|
Once configured, you should be able to run the Watcher services by issuing
|
||||||
|
these commands:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -108,7 +109,7 @@ installed on your system.
|
|||||||
|
|
||||||
Once installed, you still need to declare Watcher as a new service into
|
Once installed, you still need to declare Watcher as a new service into
|
||||||
Keystone and to configure its different modules, which you can find described
|
Keystone and to configure its different modules, which you can find described
|
||||||
in :doc:`configuration`.
|
in :doc:`../configuration/configuring`.
|
||||||
|
|
||||||
|
|
||||||
Installing from packages: Debian (experimental)
|
Installing from packages: Debian (experimental)
|
||||||
|
@ -31,8 +31,7 @@ sys.path.insert(0, os.path.abspath('./'))
|
|||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'oslo_config.sphinxconfiggen',
|
'oslo_config.sphinxext',
|
||||||
'openstackdocstheme',
|
|
||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'sphinxcontrib.httpdomain',
|
'sphinxcontrib.httpdomain',
|
||||||
@ -41,10 +40,14 @@ extensions = [
|
|||||||
'wsmeext.sphinxext',
|
'wsmeext.sphinxext',
|
||||||
'ext.term',
|
'ext.term',
|
||||||
'ext.versioned_notifications',
|
'ext.versioned_notifications',
|
||||||
|
'oslo_config.sphinxconfiggen',
|
||||||
|
'openstackdocstheme',
|
||||||
]
|
]
|
||||||
|
|
||||||
wsme_protocols = ['restjson']
|
wsme_protocols = ['restjson']
|
||||||
config_generator_config_file = '../../etc/watcher/watcher-config-generator.conf'
|
config_generator_config_file = [(
|
||||||
|
'../../etc/watcher/oslo-config-generator/watcher.conf',
|
||||||
|
'_static/watcher')]
|
||||||
sample_config_basename = 'watcher'
|
sample_config_basename = 'watcher'
|
||||||
|
|
||||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
@ -92,6 +95,8 @@ add_function_parentheses = True
|
|||||||
# unit titles (such as .. function::).
|
# unit titles (such as .. function::).
|
||||||
add_module_names = True
|
add_module_names = True
|
||||||
|
|
||||||
|
suppress_warnings = ['app.add_directive']
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
pygments_style = 'sphinx'
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../../etc/watcher/watcher-config-generator.conf
|
|
5
doc/source/configuration/index.rst
Normal file
5
doc/source/configuration/index.rst
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
configuring
|
||||||
|
watcher
|
11
doc/source/configuration/watcher.rst
Normal file
11
doc/source/configuration/watcher.rst
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.. _watcher_sample_configuration_files:
|
||||||
|
|
||||||
|
------------
|
||||||
|
watcher.conf
|
||||||
|
------------
|
||||||
|
|
||||||
|
The ``watcher.conf`` file contains most of the options to configure the
|
||||||
|
Watcher services.
|
||||||
|
|
||||||
|
.. show-options::
|
||||||
|
:config-file: etc/watcher/oslo-config-generator/watcher.conf
|
@ -194,7 +194,7 @@ still need to configure the following sections:
|
|||||||
message bus
|
message bus
|
||||||
|
|
||||||
So if you need some more details on how to configure one or more of these
|
So if you need some more details on how to configure one or more of these
|
||||||
sections, please do have a look at :doc:`../deploy/configuration` before
|
sections, please do have a look at :doc:`../configuration/configuring` before
|
||||||
continuing.
|
continuing.
|
||||||
|
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ To run the Watcher Applier service, use:
|
|||||||
(watcher) $ watcher-applier
|
(watcher) $ watcher-applier
|
||||||
|
|
||||||
Default configuration of these services are available into ``/etc/watcher``
|
Default configuration of these services are available into ``/etc/watcher``
|
||||||
directory. See :doc:`../deploy/configuration` for details on how Watcher is
|
directory. See :doc:`../configuration/configuring` for details on how Watcher is
|
||||||
configured. By default, Watcher is configured with SQL backends.
|
configured. By default, Watcher is configured with SQL backends.
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,8 +123,9 @@ Here below is how you would proceed to register ``NewGoal`` using pbr_:
|
|||||||
new_goal = thirdparty.new:NewGoal
|
new_goal = thirdparty.new:NewGoal
|
||||||
|
|
||||||
|
|
||||||
To get a better understanding on how to implement a more advanced goal,
|
To get a better understanding on how to implement a more advanced goal, have
|
||||||
have a look at the :py:class:`~.ServerConsolidation` class.
|
a look at the
|
||||||
|
:py:class:`watcher.decision_engine.goal.goals.ServerConsolidation` class.
|
||||||
|
|
||||||
.. _pbr: http://docs.openstack.org/developer/pbr/
|
.. _pbr: http://docs.openstack.org/developer/pbr/
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@ Create a new scoring engine plugin
|
|||||||
|
|
||||||
In order to create a new scoring engine you have to:
|
In order to create a new scoring engine you have to:
|
||||||
|
|
||||||
- Extend the :py:class:`~.ScoringEngine` class
|
- Extend the :py:class:`watcher.decision_engine.scoring.base.ScoringEngine`
|
||||||
|
class
|
||||||
- Implement its :py:meth:`~.ScoringEngine.get_name` method to return the
|
- Implement its :py:meth:`~.ScoringEngine.get_name` method to return the
|
||||||
**unique** ID of the new scoring engine you want to create. This unique ID
|
**unique** ID of the new scoring engine you want to create. This unique ID
|
||||||
should be the same as the name of :ref:`the entry point we will declare later
|
should be the same as the name of :ref:`the entry point we will declare later
|
||||||
@ -124,7 +125,8 @@ scoring engine deployed as a web service on external servers:
|
|||||||
Abstract Plugin Class
|
Abstract Plugin Class
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Here below is the abstract :py:class:`~.ScoringEngine` class:
|
Here below is the abstract
|
||||||
|
:py:class:`watcher.decision_engine.scoring.base.ScoringEngine` class:
|
||||||
|
|
||||||
.. autoclass:: watcher.decision_engine.scoring.base.ScoringEngine
|
.. autoclass:: watcher.decision_engine.scoring.base.ScoringEngine
|
||||||
:members:
|
:members:
|
||||||
|
@ -65,6 +65,14 @@ Audit
|
|||||||
|
|
||||||
.. _audit_template_definition:
|
.. _audit_template_definition:
|
||||||
|
|
||||||
|
Audit Scope
|
||||||
|
===========
|
||||||
|
|
||||||
|
An Audit Scope is a set of audited resources. Audit Scope should be defined
|
||||||
|
in each Audit Template (which contains the Audit settings).
|
||||||
|
|
||||||
|
.. _audit_scope_definition:
|
||||||
|
|
||||||
Audit Template
|
Audit Template
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
@ -77,11 +77,19 @@ Installation
|
|||||||
|
|
||||||
install/index
|
install/index
|
||||||
|
|
||||||
|
Watcher Configuration Options
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
configuration/index
|
||||||
|
|
||||||
Admin Guide
|
Admin Guide
|
||||||
===========
|
===========
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 2
|
||||||
|
|
||||||
admin/index
|
admin/index
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
:glob:
|
:glob:
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
footer.rst
|
|
||||||
general-options
|
|
||||||
watcher-api
|
watcher-api
|
||||||
watcher-applier
|
watcher-applier
|
||||||
watcher-db-manage
|
watcher-db-manage
|
||||||
|
@ -109,6 +109,7 @@ source-dir = doc/source
|
|||||||
build-dir = doc/build
|
build-dir = doc/build
|
||||||
fresh_env = 1
|
fresh_env = 1
|
||||||
all_files = 1
|
all_files = 1
|
||||||
|
warning-is-error = 1
|
||||||
|
|
||||||
[upload_sphinx]
|
[upload_sphinx]
|
||||||
upload-dir = doc/build/html
|
upload-dir = doc/build/html
|
||||||
|
2
tox.ini
2
tox.ini
@ -44,7 +44,7 @@ commands = oslo_debug_helper -t watcher/tests {posargs}
|
|||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
sitepackages = False
|
sitepackages = False
|
||||||
commands =
|
commands =
|
||||||
oslo-config-generator --config-file etc/watcher/watcher-config-generator.conf
|
oslo-config-generator --config-file etc/watcher/oslo-config-generator/watcher.conf
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
show-source=True
|
show-source=True
|
||||||
|
@ -550,7 +550,7 @@ class AuditTemplatesController(rest.RestController):
|
|||||||
def get_one(self, audit_template):
|
def get_one(self, audit_template):
|
||||||
"""Retrieve information about the given audit template.
|
"""Retrieve information about the given audit template.
|
||||||
|
|
||||||
:param audit audit_template: UUID or name of an audit template.
|
:param audit_template: UUID or name of an audit template.
|
||||||
"""
|
"""
|
||||||
if self.from_audit_templates:
|
if self.from_audit_templates:
|
||||||
raise exception.OperationNotPermitted
|
raise exception.OperationNotPermitted
|
||||||
@ -597,7 +597,7 @@ class AuditTemplatesController(rest.RestController):
|
|||||||
def patch(self, audit_template, patch):
|
def patch(self, audit_template, patch):
|
||||||
"""Update an existing audit template.
|
"""Update an existing audit template.
|
||||||
|
|
||||||
:param audit template_uuid: UUID of a audit template.
|
:param template_uuid: UUID of a audit template.
|
||||||
:param patch: a json PATCH document to apply to this audit template.
|
:param patch: a json PATCH document to apply to this audit template.
|
||||||
"""
|
"""
|
||||||
if self.from_audit_templates:
|
if self.from_audit_templates:
|
||||||
@ -645,7 +645,7 @@ class AuditTemplatesController(rest.RestController):
|
|||||||
def delete(self, audit_template):
|
def delete(self, audit_template):
|
||||||
"""Delete a audit template.
|
"""Delete a audit template.
|
||||||
|
|
||||||
:param audit template_uuid: UUID or name of an audit template.
|
:param template_uuid: UUID or name of an audit template.
|
||||||
"""
|
"""
|
||||||
context = pecan.request.context
|
context = pecan.request.context
|
||||||
audit_template_to_delete = api_utils.get_resource('AuditTemplate',
|
audit_template_to_delete = api_utils.get_resource('AuditTemplate',
|
||||||
|
@ -49,7 +49,7 @@ WATCHER_DECISION_ENGINE_OPTS = [
|
|||||||
'-whose number of hours has been offset by this value-'
|
'-whose number of hours has been offset by this value-'
|
||||||
' is older that the current time.'),
|
' is older that the current time.'),
|
||||||
cfg.IntOpt('check_periodic_interval',
|
cfg.IntOpt('check_periodic_interval',
|
||||||
default=30*60,
|
default=30 * 60,
|
||||||
help='Interval (in seconds) for checking action plan expiry.')
|
help='Interval (in seconds) for checking action plan expiry.')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ import collections
|
|||||||
|
|
||||||
import networkx as nx
|
import networkx as nx
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_config import types
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.common import utils
|
from watcher.common import utils
|
||||||
@ -69,17 +68,15 @@ class WeightPlanner(base.BasePlanner):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def get_config_opts(cls):
|
def get_config_opts(cls):
|
||||||
return [
|
return [
|
||||||
cfg.Opt(
|
cfg.DictOpt(
|
||||||
'weights',
|
'weights',
|
||||||
type=types.Dict(value_type=types.Integer()),
|
|
||||||
help="These weights are used to schedule the actions. "
|
help="These weights are used to schedule the actions. "
|
||||||
"Action Plan will be build in accordance with sets of "
|
"Action Plan will be build in accordance with sets of "
|
||||||
"actions ordered by descending weights."
|
"actions ordered by descending weights."
|
||||||
"Two action types cannot have the same weight. ",
|
"Two action types cannot have the same weight. ",
|
||||||
default=cls.action_weights),
|
default=cls.action_weights),
|
||||||
cfg.Opt(
|
cfg.DictOpt(
|
||||||
'parallelization',
|
'parallelization',
|
||||||
type=types.Dict(value_type=types.Integer()),
|
|
||||||
help="Number of actions to be run in parallel on a per "
|
help="Number of actions to be run in parallel on a per "
|
||||||
"action type basis.",
|
"action type basis.",
|
||||||
default=cls.parallelization),
|
default=cls.parallelization),
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_config import types
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.common import clients
|
from watcher.common import clients
|
||||||
@ -65,9 +64,8 @@ class WorkloadStabilizationPlanner(base.BasePlanner):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def get_config_opts(cls):
|
def get_config_opts(cls):
|
||||||
return [
|
return [
|
||||||
cfg.Opt(
|
cfg.DictOpt(
|
||||||
'weights',
|
'weights',
|
||||||
type=types.Dict(value_type=types.Integer()),
|
|
||||||
help="These weights are used to schedule the actions",
|
help="These weights are used to schedule the actions",
|
||||||
default=cls.weights_dict),
|
default=cls.weights_dict),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user