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
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
In order to start translating we should gradually update the messages.
To fix this issue, we need to add _LI _LW _LE _LC in setup.cfg
Change-Id: Ia0bdea4dd3ecc12a6b804add9163926dc34bb581
Related-Bug: #1534164
As of now, the glossary defined in our documentation reflects the
current state of the codebase. In order to avoid any discrepancy
between the codebase and each definition, the objective here is to
gather both in a single place and link it into the rst documentation
via a custom directive.
Also re-aligned the requirements with liberty for doc.
Change-Id: I3089fd9f948b948115672f10937b1500b96ce180
Partial-Bug: #1526671
Replacing dict.iteritems()/.itervalues() with
six.iteritems(dict)/six.itervalues(dict) was preferred in the past,
but there was a discussion suggesting to avoid six for this.
ref:
http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I63b1e51597307862968f37803ffdbba63306d8c6
Each config option has limitation for type and value.
We make enforce_type=True to check whether we pass wrong type.
Also fixes a type error issue in test_db_manager.py.
Change-Id: I6e111e21588525d32b05eeba75b06583d4e605ed
Related-Bug: #1517839
The documentation for the DevStack plugin suggests changing the
libvirt_opts value of /etc/default/libvirt-bin to allow for live
migration between compute nodes. This changeset removes the incorrect
spaces surrounding the equals sign in the file, which would cause the
libvirt-bin service to crash.
Change-Id: Id073da5cdc84a900a398f260d7f7b40f027eb9d3
Closes-Bug: #1533761
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, ...).
This patchset propose a generic and extensible way to describe
the actions and his parameters that we want to add to Action Plan.
It also remove the static actions because they are now deprecated.
The documentation regarding strategy plugin need to be
updated (plugins.rst).
DocImpact
Partially implements: blueprint watcher-add-actions-via-conf
Change-Id: I3d641080e8ad89786abca79a942c8deb2d53355b
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 extend the
default set of planner algorithms currently available in Watcher
using Stevedore.
The doc need to explain how create a new planner.
DocImpact
Partially implements: blueprint watcher-add-actions-via-conf
Change-Id: I2fd73f8c4a457ee391d764a7a3f494deecd2634f
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, ...).
This patchset add a common generic dynamic loader for plugins,
such as for custom Actions, Strategies, Planners, etc.
Partially implements: blueprint watcher-add-actions-via-conf
Change-Id: I59d031b93865fff2540e3973921e1bdafa95f88e
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, ...).
This patchset add the possibility to store several parameters
for an Action.
The parameters store info that the custom Action needs.
The parameters provided as tuples with the following fields:
(parameter_name, parameter_type).
It remove also the deprecated attributes
(src,dst,description)
APIImpact
Partially implements: blueprint watcher-add-actions-via-conf
Change-Id: Ic6727341822f8ac62f212d337814b2dca76044e3
In the section "WATCHER_GOALS_OPTS" the dict option "goals"
is not mandatory. However it should be.
Change-Id: I2e0770cf7787fed449c012bc45462e3138992ebf
Closes-Bug: #1531116
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: Id708a94ac461adf021893a05796163bd2ced153c
Closes-Bug:#1512207
Use DevStack's plugin model to allow for developers to easily set up
the Watcher services within DevStack.
Provides documentation on how to use the plugin as well as documentation
on how to configure a multi-node DevStack installation to use. Also
provides an example local.conf for both the controller and compute
nodes.
Implements blueprint devstack-plugin
Change-Id: Ide663813f7a49d645877a21a0d1914be3218385e
Some Python class and packages need to be renamed
for a better compliance with the shared terminology
which provides a better understanding of Watcher objects
and components by every contributor.
Partially implements: blueprint glossary-related-refactoring
Change-Id: Ie0e33562f5e990c264a50ab3f533cfa62eac1d19
It implements one of the algorithm of Intel thermal POC.
It extends the BaseStrategy class, getting the Outlet
metrics of servers via Ceilometer, and generates solutions
when the outlet Temperature is greater than threshold.
current threshold is hard-coded, will make it configurable
in the next patches.
Implements: blueprint outlet-temperature-based-strategy
Change-Id: I248147329d34eddf408652205a077895be572010
Co-Authored-By: Zhenzan Zhou <zhenzan.zhou@intel.com>
This aim of this patchset is to move the management of the
Audit-Template into StrategyContext
in order to prepare to pass parameters to strategies
but also to prepare to add more dynamic Actions management
Partially implements: blueprint glossary-related-refactoring
Change-Id: I13ee063da947113ce349855aa331a22f40567051
The nova wrapper2 just uses the same credential to create another
nova client session with the same capability. And it is hardcode
for keystone API v3.
Change-Id: I52b11a9b48ce2bb37a7872e2335ac3bae3f742c7
Closes-Bug: #1528142
Move glossary.rst from /doc/dev to /doc/ as glossary is not only
related to dev. Updated index.rst.
Change-Id: I2e5251bdb0b94ef03727dea26bc43866544d2fd3
Closes-Bug: #1527130