Commit Graph

182 Commits

Author SHA1 Message Date
Gábor Antal
67455c6a84 Missing super() in API collection controllers
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
2016-01-19 13:15:32 +01:00
Jenkins
65cf19a7e4 Merge "Removed use of deprecated LOG.warn method" 2016-01-18 17:08:58 +00:00
Jenkins
facca13dc4 Merge "Clean up flake8 ignore list" 2016-01-18 13:42:00 +00:00
Jenkins
e8576e8963 Merge "Renamed diskInfo.py" 2016-01-18 13:12:03 +00:00
Gábor Antal
dfc9a3b37d Removed use of deprecated LOG.warn method
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
2016-01-18 13:12:52 +01:00
Jenkins
24dc92091c Merge "Keep py3.X compatibility for urllib" 2016-01-18 08:22:24 +00:00
Jenkins
53d6d7d131 Merge "Changed testr to os-testr" 2016-01-18 08:21:40 +00:00
Jenkins
fd6ecc1b13 Merge "Add a dynamic loading of Actions handlers in the Watcher Applier" 2016-01-15 15:44:56 +00:00
Jean-Emile DARTOIS
8bac4fd42a Add a dynamic loading of Actions handlers in the Watcher Applier
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
2016-01-15 16:08:18 +01:00
Jenkins
55d186be58 Merge "Move terminology definition to class related" 2016-01-15 14:54:48 +00:00
Jenkins
ed438d2eb2 Merge "Update API documentation for action plan" 2016-01-14 16:40:24 +00:00
David TARDIVEL
4898df89ca Update API documentation for action plan
Fix the Action Plan patch method docstring.

Change-Id: I631ba0f0754c00f49212e416f259c9158bb37d89
Closes-Bug: #1532691
2016-01-14 14:07:02 +00:00
Steve Wilkerson
ae949148ef Renamed diskInfo.py
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
2016-01-14 07:59:55 -06:00
Jean-Emile DARTOIS
e0242b49f1 Fix extraction of _LI _LW _LE _LC for translation
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
2016-01-14 14:53:52 +01:00
ting.wang
5b57985686 Clean up flake8 ignore list
clean up ignore list and fix errors.

Change-Id: I3f44def50fbf44fa3cf5c49cc15a98947084c236
2016-01-14 18:42:45 +08:00
Jean-Emile DARTOIS
f6ef197473 Move terminology definition to class related
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
2016-01-14 10:47:32 +01:00
ting.wang
61c926a10b Keep py3.X compatibility for urllib
Replace urllib with six.moves.urlparse

Change-Id: I224b7b00f7ecbe6d44ce5c9414bdaab825cbd6c7
2016-01-14 17:10:49 +08:00
Jenkins
9c33f8aaeb Merge "Remove incorrect spaces for libvirt_opts value" 2016-01-14 08:50:16 +00:00
ting.wang
08fc69cfc4 Use dict.items() dirrectly instead of six.iteritems
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
2016-01-14 16:10:37 +08:00
Jenkins
dc6b8aad7e Merge "Test: make enforce_type=True in CONF.set_override and fix error" 2016-01-14 07:59:00 +00:00
ting.wang
473cee8ad3 Test: make enforce_type=True in CONF.set_override and fix error
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
2016-01-14 07:10:16 +00:00
Taylor Peoples
2ffeb48010 Remove incorrect spaces for libvirt_opts value
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
2016-01-14 07:50:16 +01:00
Jean-Emile DARTOIS
86d3c2ff89 Add a generic and extensible way to describe the flow of actions
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
2016-01-13 11:18:20 +01:00
Jean-Emile DARTOIS
47759202a8 Add a dynamic loading of the Watcher Planner implementation
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
2016-01-13 08:26:21 +00:00
Jean-Emile DARTOIS
c0306ea8f4 Add a common generic dynamic loader for watcher
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
2016-01-13 08:26:14 +00:00
Jean-Emile DARTOIS
34ccb7c23e Add the possibility to store several parameters for an Action
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
2016-01-13 09:25:18 +01:00
Biswajeeban Mishra
9900273988 Changed testr to os-testr
Change-Id: I6dd478e3bac50cf5a2d0ad32af0e36c25c0df071
Related-Bug: #1525854
2016-01-13 00:30:09 +00:00
Jenkins
4662f248b3 Merge "Remove duplicated nova wrapper" 2016-01-07 16:25:38 +00:00
Jenkins
7638103203 Merge "Implement DevStack plugin" 2016-01-07 16:25:13 +00:00
Jenkins
adc5587a2b Merge "Strategy goals should be required in conf" 2016-01-07 16:16:57 +00:00
Gábor Antal
34ab93a5f2 Strategy goals should be required in conf
In the section "WATCHER_GOALS_OPTS" the dict option "goals"
is not mandatory. However it should be.

Change-Id: I2e0770cf7787fed449c012bc45462e3138992ebf
Closes-Bug: #1531116
2016-01-07 16:08:50 +00:00
Swapnil Kulkarni (coolsvap)
c286e1ec4b Use assertTrue/False instead of assertEqual(T/F)
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).

Change-Id: Id708a94ac461adf021893a05796163bd2ced153c
Closes-Bug:#1512207
2016-01-07 12:51:22 +05:30
Taylor Peoples
6c1769a15e Implement DevStack plugin
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
2016-01-06 17:05:40 +01:00
Jean-Emile DARTOIS
b41a2cc940 Remove useless Meta-Action
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
2016-01-05 14:26:11 +01:00
junjie huang
8ebc898924 outlet Temperature based migration strategy
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>
0.22.0
2015-12-28 21:29:08 +00:00
Jenkins
660c782626 Merge "Move Audit-template management in DefaultStrategyContext" 2015-12-23 08:29:36 +00:00
Jean-Emile DARTOIS
dfaba80252 Move Audit-template management in DefaultStrategyContext
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
2015-12-22 17:52:51 +01:00
Zhenzan Zhou
8b357ace5a Remove duplicated nova wrapper
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
2015-12-22 14:57:58 +08:00
Darren Shaw
9dccb29bf4 Move glossary.rst to root folder of doc
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
2015-12-21 13:14:06 -06:00
Jenkins
853145f4d1 Merge "Remove string concatenation in favor of string formatting" 2015-12-21 10:13:56 +00:00
Jenkins
764f5c7681 Merge "Add Creative Commons Attribution header to documentation" 2015-12-21 10:10:36 +00:00
Jenkins
b81b767567 Merge "Rename NovaWrapper to NovaClient" 2015-12-21 10:06:53 +00:00
Jenkins
764e31a7a1 Merge "Remove useless event factory" 2015-12-21 10:06:21 +00:00
Steve Wilkerson
1c49d07912 Remove string concatenation in favor of string formatting
Some of the modules still utilized string concatenation
instead of using formatting.  In order to align with other
modules in the project, I refactored these modules to use string
formatting instead.

Change-Id: I708392e1d03b6331a134419aa0ae9dc02a05c31b
Closes-Bug: 1522738
2015-12-21 11:04:00 +01:00
Jean-Emile DARTOIS
18549dc182 Remove useless event factory
Change-Id: I8442a26ebfcfe3c17c378b283ffbbc0810b7a067
2015-12-21 10:31:15 +01:00
Jenkins
9f222221a7 Merge "Change default strategy to DummyStrategy" 2015-12-21 09:29:29 +00:00
Jean-Emile DARTOIS
1a64383a68 Rename NovaWrapper to NovaClient
This patchset aim to rename the nova client class and move it with
the other openstack clients in the folder openstack/common.

Change-Id: Ie8aab199922985f42ad85e6688f0727b24f53ffd
2015-12-21 10:26:20 +01:00
Vincent Françoise
ac07f35dc7 i18n - Make string translatable
Since internationalization should be enabled in Watcher, this
patchset refactors the Watcher codebase to wrap previously
untranslatable strings with i18n translation functions so we can
import them for translation into the .pot template file.

Partially Implements: blueprint support-translation
Change-Id: I425967a60b5a7957f753894e5d2ba0d2c5009d1d
2015-12-21 10:08:59 +01:00
Jean-Emile DARTOIS
010bc61cc9 Change default strategy to DummyStrategy
The aim of this patchset is to change the default strategy
and set invoke_on_load to False.

Change-Id: I0e374993614f465b11a22e33008f7026642154ee
2015-12-21 09:55:53 +01:00
Jenkins
3dd02ee895 Merge "Code refactoring - StrategyContext and Auditendpoint" 2015-12-21 08:40:04 +00:00