Commit Graph

147 Commits

Author SHA1 Message Date
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
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
Steve Wilkerson
a4bbe7f893 Add Creative Commons Attribution header to documentation
Changed the header in the documentation to reflect that the docs
are covered under the CCBY 3.0 license.

Change-Id: I29f3f1a2491c28b1a4ee12a7b97a7ab00c919867
Closes-Bug: 1526331
2015-12-20 01:51:00 -06:00
Jean-Emile DARTOIS
4c3073efb4 Code refactoring - StrategyContext and Auditendpoint
This patchset aim to remove useless code in StrategyContext
and AuditEndPoint.
This patchset also add a parameter for strategy context to define the
numbers of thread of execute the strategies.

DocImpact
Change-Id: I83e87165b03b42fe6b863921502a300bd94d2982
2015-12-18 14:25:07 +00:00
Jenkins
642226812f Merge "Remove *.pyc files before running tox tests" 2015-12-18 12:52:31 +00:00
Jenkins
8f2ca2518f Merge "'admin_user' opt (and others) imported twice" 2015-12-18 12:48:56 +00:00
Jenkins
1698eb31f3 Merge "Fix generation of watcher config file" 2015-12-17 18:34:26 +00:00
Jenkins
5fb74e677f Merge "Rename command to audit" 2015-12-17 13:21:39 +00:00
Gábor Antal
35a5ba1cd0 Remove *.pyc files before running tox tests
Modified tox.ini to remove any .pyc file before running tests.
Also, now it removes all the __pycache__ folders which was also
in the bug report.

Change-Id: I2f60751b155f8098b746339c12406b934bcdbcf9
Closes-Bug: #1525852
2015-12-17 11:59:54 +01:00
Jean-Emile DARTOIS
c0a85be7b8 Add missing parameter in prepare_service for api
Although the bug #1526888 (prepare_service() - duplicate function) got merged
https://review.openstack.org/#/c/258007/ we didn't see that the file in
(watcher/cmd/api.py) api didn't have sys.argv parameter.

Change-Id: I458b4ff169684131a20ef6ac090b1c918f08d427
Closes-Bug: 1526888
2015-12-16 17:58:18 +01:00
Jean-Emile DARTOIS
633b360652 Fix generation of watcher config file
Although the refactoring of the applier got merged we have an issue
to generate the config. This pathset fix that

Change-Id: Iafce7d0136b2ad813102c3e3caeebafa215363c8
Closes-Bug: 1526851
2015-12-16 16:09:12 +00:00
Jenkins
d3160bf007 Merge "Removed duplicated function prepare_service()" 2015-12-16 10:41:32 +00:00
Jean-Emile DARTOIS
69152f2449 Rename command to audit
This patchset is there to change the code structure.

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.

This patchset is there to rename the folder command to audit

Partially implements: blueprint glossary-related-refactoring

Change-Id: I76616fb58d5e79a7dc209b80e882d216850d18a4
2015-12-16 10:23:44 +01:00
Jenkins
37cd75ffe3 Merge "Include terminology definition from docstring" 2015-12-16 09:08:25 +00:00
Gábor Antal
c7fd5e8b21 'admin_user' opt (and others) imported twice
"admin_user", "admin_tenant_name", "admin_password" and "auth_uri"
are options which are imported from the "keystone_authtoken" group,
itself being part of the "keystonemiddleware" 3rd-party library.

The problem is that these options are imported at 2 different
locations in the codebase:

- watcher/applier/manager.py
- watcher/common/keystone.py

Removed one from the applier.

Change-Id: Ie7075883018ec69f6a4e8190f50a9ea949ab9745
Closes-Bug: #1526259
2015-12-15 20:10:02 +01:00
Gábor Antal
f0b58f8c27 Removed duplicated function prepare_service()
The prepare_service() function is defined both in watcher/service.py
and in watcher/common/service.py.

These 2 needed to be merged into a single one
to avoid code duplication.

At the same time, the watcher/service.py only contains this function,
so I removed that file.

Change-Id: I0c935dfcd011bee9597315752dae8668221c53f9
Closes-Bug: #1525842
2015-12-15 19:14:52 +01:00
Jenkins
22dd6d42c3 Merge "Internationalization (i18n) - Enable French locale" 2015-12-15 17:49:50 +00:00
Vincent Françoise
bd29e2e79f Internationalization (i18n) - Enable French locale
Our project should now enable its internationalization.
This patchset add the french locale to the project but also
refactors the codebase to following the oslo_i18n recommendations.

DocImpact
Implements: blueprint support-translation

Change-Id: I0e4fbf05d16afb5e25bac78438c640f147c754b1
2015-12-15 17:57:10 +01:00
Vincent Françoise
c2eb112184 Include terminology definition from docstring
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.

DocImpact

Change-Id: I9ca50f8d3c32b4690ee240e13dec0cb7eeedcc2c
2015-12-15 11:38:42 +01:00
Jean-Emile DARTOIS
57cecb27f5 Remove pragma no cover from code
Add exclude_lines in the report section of .coveragerc to ignore
abstract in test coverage

Change-Id: I7863a8ba7e20358fb7cdf3cc7e4d83871a5104ef
2015-12-15 10:14:40 +01:00
Jenkins
7c72d6f912 Merge "Some tests are ignored" 2015-12-15 07:57:58 +00:00
Jean-Emile DARTOIS
62570525ad Tidy up - Watcher Decision Engine package
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.

This patchset is there to change the code structure by adding the folder
"strategies" and "loading".

Partially implements: blueprint glossary-related-refactoring

Change-Id: I56fb24ee6762b3186eccde5983233e17bb227cc1
2015-12-14 14:33:56 +01:00
Jenkins
92940ba9e2 Merge "Typo in ClusteStateNotDefined" 2015-12-14 10:56:51 +00:00
Jenkins
7c8ce453ed Merge "Add Apache license header to all rst documentation" 2015-12-14 10:43:37 +00:00
Gábor Antal
33ea5f96f8 Typo in ClusteStateNotDefined
ClusteStateNotDefined has a typo, it should be ClusterStateNotDefine

Change-Id: I727301786d47db847215d73722051e59d340f1c2
Closes-Bug: #1525818
2015-12-14 11:41:29 +01:00
Jenkins
916f4d0c08 Merge "Tidy up - Rename Base" 2015-12-14 10:27:47 +00:00
Jenkins
3fb5defc16 Merge "Removed H404, H405, H305 ignore in pep8" 2015-12-14 10:12:37 +00:00
Jean-Emile DARTOIS
b01f4bead4 Some tests are ignored
Testr is using the prefix _test for discover tests.

Change-Id: I963c25f1d331273dd0d28a374be894246413530b
2015-12-14 10:31:06 +01:00
Jenkins
8516d629c2 Merge "Added unit tests on nova wrapper" 2015-12-14 09:21:54 +00:00
Jean-Emile DARTOIS
35a1f0a657 Tidy up - Rename Base
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.

This patchset add missing Base in class name

Partially implements: blueprint glossary-related-refactoring

Change-Id: I95a3e41fbd5fcd90a99d81c9cf278940f50c7732
2015-12-11 14:45:50 +01:00
Vincent Françoise
d934971458 Refactored Watcher codebase to add py34 support
Even though Watcher was mentioning python 3.4 as supported, it
really wasn't the case as all the unit tests were not passing in this
version of Python.

This patchset fixes all the failing tests in Python 3.4 while
keeping Watcher Python 2.7 compatible.

DocImpact
BugImpact
Change-Id: Ie74acc08ef0a2899349a4b419728c89e416a18cb
2015-12-11 13:24:02 +00:00
Vincent Françoise
d92f85574d Added unit tests on nova wrapper
As the coverage on the nova wrapper is actually very low, this
patchset is here to raise it a bit since it is a quite central
piece of code.

Change-Id: Ie7879c74c8d322d5031953827c339bb11d9085c1
2015-12-11 10:47:03 +01:00
Jenkins
b1fe7a5f3d Merge "Remove references to removed watcher/openstack directory" 2015-12-11 08:42:46 +00:00
Jenkins
8a5eb4b6a1 Merge "Remove unreachable code in basic_consolidation.py" 2015-12-11 08:29:57 +00:00
Jenkins
91c14e4eda Merge "Removed unnecessary code from basic_consolidation" 2015-12-11 08:07:28 +00:00
Gábor Antal
1613bd6904 Removed H404, H405, H305 ignore in pep8
In the file tox.ini we have some pep8 rules disabled.
We should remove H404,H405,H305 from the ignore list.

Removed them from the ignore list, and got some errors.
I restructured the comments, and now with H404, H405, H305 enabled,
pep8 works without any failures.

Change-Id: Ic2aeb2a8bd47e92fbd2bb0f43fd00d44b6c220ca
Closes-Bug: #1523841
2015-12-10 19:35:52 +01:00
Gábor Antal
ba4f5569d1 Removed unnecessary code from basic_consolidation
In basic_consolidation.py has a method, called calculate_score_vm().
This method used to get vm's id as a parameter, but it was replaced
and now it gets the vm as a parameter. So we don't need to get the
vm from our vm's id, as we already have the vm.

Change-Id: I96af7fbdbe85eda8d4fc44b4b162e8ba9d4967fa
2015-12-10 18:55:16 +01:00