As the STARTING state was not clear on its meaning, I renamed it
to TRIGGERED.
Change-Id: I99cceeb57f3d7d42c1543b21fad88a6872bc4e55
Closes-Bug: #1533245
This patchset implements the first scenario for Watcher which does
the following actions:
- create an audit template with the dummy strategy
- run the audit to create an action plan
- get the action plan
- run the action plan
- get results and make sure it succeeded
Partially Implements: blueprint tempest-basic-set-up
Change-Id: Iee74ede0bd1bcd03e8938f2ec8c6884f99e7f99a
For a better doc QoS, we now use doc8 as part of the testing
procedure while removing the existing tests we had on doc formatting.
I also updated tox.ini to run doc8 as within 'pep8' and 'docs' venvs.
Change-Id: Ia0ad99541509f4c026e26d28c41ff0210b12a504
Closes-Bug: #1524228
Strategies can require, from Watcher, metrics collected on the IAAS.
Watcher uses only Ceilometer API to retrieve metrics.
Change the metrics database backend, add a new metric is not in
the scope of Watcher, but rather in the Ceilometer one. We add some
links to Ceilometer documentation about these topics.
Change-Id: If37c7df8e5852f5ecf94b4a9eb9c8c91fe6637eb
This patchset adds CRUD tests on Action Plans via the API.
Partially Implements: blueprint tempest-basic-set-up
Change-Id: I8ff3c3f0dbf7d301be2e3f401edf24bca44914bd
Change the title of the page.
Create a 'Getting Started' section.
Create a 'Plugins' section.
Add links to related source code repositories.
Fix bad link to watcher client installation doc.
Change-Id: Ie0548149751d53b5fca235da69798dd0d333b14c
Partial-Bug: #1535244
'Module Index' link points to HTML doc generated from source/api
RST files. These RST files are generated by pbr, by setting the
parameter 'autodoc_index_modules' to True.
Partial-Bug: #1535244
Change-Id: Ifceb5a140599d3968ea3d353b12c0bbe99d955e6
This patchset adds CRUD tests on Audits via the API.
Many of them are currently skipped as they revealed some underlying
bugs which are referenced on launchpad.
Partially Implements: blueprint tempest-basic-set-up
Change-Id: I5769f601f9d1cb94bb541959f94f0fa2e17d15c9
We must set up Tempest for Watcher
(http://docs.openstack.org/developer/tempest/configuration.html)
to run integration tests inside devstack environment.
This patchset is a refactoring of the stale Tempest tests to now
use the latest Tempest coding standards (like using plugins and
credentials factory).
This commit will have an effect on the doc as we need to integrate
Tempest in the Watcher documentation.
DocImpact
Partially Implements: blueprint tempest-basic-set-up
Change-Id: I7600ff8a28d524b56c7dd4903ac4d203634ae412
As we can see in the codebase, we have 3 "Status" enums which are
located at:
- watcher/objects/action.py
- watcher/objects/action_plan.py
- watcher/objects/audit.py
So I renamed them from "Status" to "State" to be consistent with
the DB schema.
Change-Id: If3d180c9daba6ae9083775ad6813aa4c21763dbf
Closes-Bug: #1522733
Added a new sequence diagram to explain showing the main steps
regarding Watcher usage:
- create a new audit template
- launch an audit and receive a recommended action plan
- launch the action plan
Change-Id: I1a0031b957d34908020be06870ed1d2772cd5af6
Closes-Bug: 1536731
The aim of this patchset is to integrate taskflow in
the Watcher Applier. Taskflow will help us a lot to make
Action Plan execution easy, consistent, scalable and reliable.
DocImpact
Partially implements: blueprint use-taskflow
Change-Id: I903d6509d74a61ad64e1506b8a7156e6e91abcfb
Closes-Bug: #1535326
Closes-Bug: #1531912
In the Audit controller (watcher/api/controllers/v1/audit.py),
we have an unused "audit_uuid" parameter in both get_all()
and detail()
Similarly, the Action Plan controller
(watcher/api/controllers/v1/action_plan.py) has an unused
"action_plan_uuid" parameter in both get_all() and detail().
I also removed them from the @wsme_pecan.wsexpose decorator
Change-Id: I7f1edfd44dd95c9768249650e19b16fcbe916b89
Closes-Bug: #1534615
The audit template UUID should be validated during the creation of an
audit. An HTTP 400 error is returned to the client if an invalid audit
template UUID is passed as part of the body when creating an audit.
APIImpact
Closes-Bug: #1510188
Change-Id: I0543d22751b77f6641ddef6a7f0f4acce61180fd
Added some data model diagrams, sequence diagrams and state machine
diagrams.
The state machine diagrams and sequence diagrams are built with
PlantUML whereas data model diagrams are built with Dia.
Also added some textual description with the sequence diagrams.
Change-Id: Iffbb47b0f2d12ce63eeaa1531a1bd1a790d69e79
Closes-Bug: #1531802
Same ID have been set to reference different RST blocks.
To avoid this, I added the prefix 'archi_' within ID referencing
architecture RST block.
Bad indentation warnings have been fixed.
Change-Id: I17f43f2f564ffd83fd5c345aed96fad06ee56b1d
Partial-Bug: #1522034
The execute() method is very large - almost 150 lines,
and McCabe's cyclomatic complexity 22.
(watcher/decision_engine/strategy/strategies/basic_consolidation.py)
I extracted some of the functionalities into helper functions
to reduce the length and complexity of execute().
http://openqa.sed.hu/dashboard/index/544838?did=1
Additionally it became more readable as well, without
changing its functionality.
Change-Id: I760929f56e258b87d7f1d4586bcc90665f1e0d8f
Closes-Bug: 1535729
The __init__ of these 3 classes are missing the super() call
watcher/watcher/api/controllers/v1/goal.py:113
watcher/api/controllers/v1/audit.py:217
watcher/watcher/api/controllers/v1/audit_template.py:166
Change-Id: I2fec1d5dac29a311f617ef141d5bf91f00b96219
Closes-Bug: #1535354
The BaseException class defined in exceptions.py is shadowing the
built-in BaseException class of the Python exception hierarchy, which
could potentially cause confusion.
This removes the BaseException definition and replaces it with the
existing WatcherException object. Instantiations of the
IllegalArgumentException are also changed to use the message kwarg.
Change-Id: I20abf135805c7a354924de8a5194b59fc040460a
Closes-Bug: #1535504
The custom exceptions were defining the message format string as the
'message' attribute, which was confusing as 'message' is also being used
as an input argument to the class. This combined with the fact that the
the 'message' attribute of Python's BaseException has been deprecated,
msg_fmt replaces message to hold the message format of the exception.
The root cause of the bug in question was caused by the __unicode__
method returning self.message, which did not have the kwargs substituted
into the actual message format. The fix is to use self.args[0] instead,
which will contain the message format with the kwargs substituted in
since that is passed to the super's (Exception) __init__ method. See
PEP 0352 for more information on how Exception and BaseException work.
The _cleanse_dict method is also removed as it is not used anywhere.
Change-Id: Ie8ac96afaecc732693a184d0e06e77c56ca8eeb9
Closes-Bug: #1535473
LOG.warn is deprecated. We were still used it some places.
So I replaced the LOG.warn method to LOG.warning, which is not
deprecated.
Change-Id: I9461cec569445ad6c40db9ce2feeeba1ef0af0e3
Closes-Bug: #1508442
In watcher, an audit generates a set of actions which
aims at achieving a given goal (lower energy consumption, ...).
It is possible to configure different strategies in order to achieve
each goal. Each strategy is written as a Python class which produces
a set of actions. Today, the set of possible actions is fixed for a
given version of Watcher and enables optimization algorithms to
include actions such as instance migration, changing hypervisor state,
changing power state (ACPI level, ...).
The objective of this patchset is to give the ability to load
the actions dynamically in order to apply the Action Plan.
DocImpact
Partially implements: blueprint watcher-add-actions-via-conf
Change-Id: Idf295b94dca549ac65d4636e8889c8ab2ecc0df6
Renamed diskInfo.py to disk_info.py and the associated test to
test_disk_info. Also changed the usage in the test to reflect
the name change.
Closes-bug: #1533189
Change-Id: Ice63cf8ea6cd4fcc770f88952cf784e5d46cca5c