Submitted state is not referenced nor used in the Watcher codebase,
and hence removed the references to the state from the codebase.
Change-Id: Ibb0cf5125e2d93683739abf35030b7cf5cb1b056
Closes-Bug: 1634150
As we are about to version the Watcher objects, we need to make sure
that upcoming model/object modifications are additive in order to
avoid having to bump the major version of the API. Therefore,
this changeset removes 4 unused DB fields that were exposed in their
associated Watcher objects (i.e. AuditTemplate and Audit).
Change-Id: Ifb0783f21cd66db16b31e3c8e376fc9d6c07dea3
Partially-Implements: blueprint watcher-versioned-objects
This patch set adds audit scope mechanism.
It also removes host_aggregate field.
Change-Id: Ia98ed180a93fc8c19599735e2b41471d322bae9a
Partially-Implements: blueprint define-the-audit-scope
This patch set adds supervisor mechanism for Watcher services
to get ability to track states.
Partially-Implements: blueprint watcher-service-list
Change-Id: Iab1cefb971c79ed27b22b6a5d1bed8698e35f9a4
Service available group already exists.Therefore we don't need to
register this group here again.
Change-Id: I2096ed1f69a1f70fbf248fee5fded94e3caca6c6
Closes-Bug: #1621036
Fixed the flaky test_delete_audit test which was failing if the delete
query was sent before the audit reaches an 'idle' state.
Change-Id: I244643b1f7c9b31baa5c25753e62dd3da0a53544
Modifying the api controller for audit objects to allow
creation of audit objects by specifying either an
audit_template uuid/id and/or a goal_id.
strategy_id is optional.
Partially Implements: blueprint persistent-audit-parameters
Change-Id: I7b3eae4d0752a11208f5f92ee13ab1018d8521ad
The hacking checks enforce during the pep8 run functional validations of
the code to ensure deeper filters and code consistency. This change set
adds the hacking checks to the wathcer project. These checks were
seeded from the neutron project, which had a good set of base defaults.
This change set also updates the watcher project to be compliant with
these new hacking checks.
Change-Id: I6f4566d384a7400bddf228aa127a53e6ecc82c2e
There's a number of places where a field of an object is named "type",
which isn't good thing. Actually type is keyword in python, so wherever
I found type used in models/api/object/test, I have fixed it to
audit_type in the audit files
Change-Id: Iea6bd3acb0b2af2a833b3916701aad88f6064bba
Closes-Bug: #1533392
In this changeset, I decoupled the notion of Goal from the Strategy
by making it a distinct object. Goals are plugins that can be loaded
just like for the strategies.
Partially Implements: blueprint efficacy-indicator
Change-Id: I4378dccd508170b305aa968843228bbc8af78895
Following https://review.openstack.org/#/c/263376/, I update the
way Watcher tempest test retrieve the admin credentials.
Change-Id: I9633752ff69a27edf8912227ea2fd24f358dec7e
In this changeset, I added both the 'goal_name' and the 'strategy_name'
field.
Change-Id: Ic164df84d4e23ec75b2b2f4b358cf827d0ad7fa5
Related-Bug: #1573582
In this changeset, I fixed the test_create_audit_with_no_state
tempest test which was randomly failing because of a race condition.
Change-Id: Ibda49944c79fcd406fa81870dbbff6064b5dc4fa
Since telemetry was removed from tempest, this changeset removes the
telemetry tags from the watcher integration tests
Change-Id: I6229ee23740c3d92a66fc04c8de8b0ed25911022
In this changeset, I updated the 'goal_id' field into the AuditTemplate
to now become a mandatory foreign key towards the Goal model. I also
added the 'strategy_id' field into the AuditTemplate model to be an
optional foreign key onto the Strategy model.
This changeset also includes an update of the /audit_template
Watcher API endpoint to reflect the previous changes.
As this changeset changes the API, this should be merged alongside the
related changeset from python-watcherclient.
Partially Implements: blueprint get-goal-from-strategy
Change-Id: Ic0573d036d1bbd7820f8eb963e47912d6b3ed1a9
In this changeset, I refactored the strategy selector to now
look into the Watcher DB instead of looking into the configuration
file.
Partially Implements: blueprint get-goal-from-strategy
Change-Id: I2bcb63542f6237f26796a3e5a781c8b62820cf6f
In this changeset, I added the /strategies endpoint to the Watcher
API service.
This also includes the related Tempest tests.
Partially Implements: blueprint get-goal-from-strategy
Change-Id: I1b70836e0df2082ab0016ecc207e89fdcb0fc8b9
In this changeset, I changed the Strategy base class to add new
abstract class methods. I also added an abstract strategy class
per Goal type (dummy, server consolidation, thermal optimization).
This changeset also includes an update of the /goals Watcher API
endpoint to now use the new Goal model (DB entries) instead of
reading from the configuration file.
Partially Implements: blueprint get-goal-from-strategy
Change-Id: Iecfed58c72f3f9df4e9d27e50a3a274a1fc0a75f
We have to check Audit Type and Audit State to make sure
these parameters are in valid status.
Also, we provide default states for the next attributes:
- 'audit_template' is required and should be either UUID or text field
- 'state' is readonly so it raises an error if submitted in POST
and is set by default to PENDING
- 'deadline' is optional and should be a datetime
- 'type' is a required text field
Change-Id: I2a7e0deec0ee2040e86400b500bb0efd8eade564
Closes-Bug: #1532843
Closes-Bug: #1533210
When creating a new audit template, the verification of its goal
existence was previously done in watcher/objects/audit_template.py.
This check was moved to api/controllers/v1/audit_template.py, rather
than in the DAO class.
Change-Id: I6efb0657f64c46a56914a946ec78013b9e47331b
Closes-Bug: #1536191
In several places, assertEqual is used the following way:
assertEqual(observed, expected)
However, the correct way to use assertEqual is:
assertEqual(expected, observed)
Change-Id: I5a7442f4adf98bf7bc73cef1d17d20da39d9a7f8
Closes-Bug: #1551861
The Watcher Tempest tests are only mentioned inside a README.rst.
They are now part of the main documentation.
Change-Id: Ieca85dc7f7307b45e4b99af4a4600a8c2d2b59d7
Closes-Bug: #1536993
"TRIGGERED" is not the correct word to use to describe the action
state, we should use "PENDING" instead.
Change-Id: If24979cdb916523861324f7bcc024e2f1fc28b05
Closes-Bug: #1548377
When running our Tempest tests, we are now cleaning up all the
objects we have created within the WatcherDB via a soft_delete.
Partially Implements: blueprint deletion-of-actions-plan
Change-Id: Ibdcfd2be37094377d09ad77d5c20298ee2baa4d0
As of now we only have a single scenario which creates and
successfully executes the DUMMY goal.
This patchset adds a new scenario which creates and executes the
BASIC_CONSOLIDATION goal mapped to the 'basic' (sercon) strategy.
The documentation has also been updated to take into account the
multinode configuration.
Change-Id: Ie246aed288ade56a8fe9c0d9b08365d72e60ada1
Closes-Bug: #1538606
Following the blueprint tempest-basic-set-up which implemented a first
batch of tests, this one adds a new set of API tests on actions.
I also added extra check on actions within the dummy strategy
scenario.
Change-Id: Ib9bf093d0ed457ecba32e8251c019d2cf5c98128
Closes-Bug: #1538074
This patchset adds CRUD tests on goals via the API.
Partially Implements: blueprint tempest-basic-set-up
Change-Id: Ief544e738d4530bcf981824803de059ae554a059
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
This patchset adds CRUD tests on Action Plans via the API.
Partially Implements: blueprint tempest-basic-set-up
Change-Id: I8ff3c3f0dbf7d301be2e3f401edf24bca44914bd
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