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
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
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
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
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
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
"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
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
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
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
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
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
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
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
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
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
In basic_consolidation.py there is a method called calculate_score_vm()
which had two return statements following each other. The second one
(which equals the first one) is unreachable as the first one returns.
Change-Id: Ia4877c22188fae6217e07597a2dd939633414349
Closes-Bug: #1524911
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 mapper to mapping
Partially implements: blueprint glossary-related-refactoring
Change-Id: Ieaca42431322ce40d87de147ac0b46a1f446f390
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
Primitive to Primitives.
Add BasePrimitive.
Partially implements: blueprint glossary-related-refactoring
Change-Id: I839bddd12b5320b338b2f207d74963afa23de522
As Openstack Liberty now targets Python 2.7 and 3.4,
we should drop Python 3.3 support from our setup.cfg
Change-Id: I8c8f9222fcf1111e99a943976aae9c5b427f7ee4
Closes-Bug: #1523983
This code is not useful because we have only one version
of watcher db currently and this alembic revision is out
of date compared to the initial schema as of mitaka-1.
Change-Id: Id21c665ff7a600a716e80d112e131a0e13687b41
This patch has the Apache license header found in
doc/source/dev/glossary.rst added to every .rst file
Change-Id: Icc20e7baf7d3cd0f116c371d54ef03c7c8401778
Closes-Bug: #1523986