115 Commits

Author SHA1 Message Date
jacky06
92c15fa38a Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Idac937dd704ef11dfc33e197f7539e3f7a5feb92
2020-04-29 23:50:12 +08:00
licanwei
1f9194ced5 Support audit type event
Add a new EVENT type to audit type and change the microversion
to 1.4

Partially Implements: blueprint event-driven-optimization-based

Change-Id: Ia9608534d12f6877f9b93e88fa75fe9457c29347
2020-01-07 15:57:11 +08:00
chenke
297ca1dfc5 Implement watcher datamodel list in watcherclient
1. Add data_model.py and data_model_shell.py for accept and
process request.

2. Add relative unittest.

Partically Implements: blueprint show-datamodel-api

Change-Id: I5e080453acaedf7e20734d67922b64511dd5f7fd
2019-08-28 09:45:03 +08:00
licanwei
ea74a22b49 Fix _make_connection_url
After support uWSGI[1], Watcher endpoint changed from http://ip:port
to http://ip/infra-optim. method _make_connection_url in HTTPClient
class can't return the correct url. This patch fixed it.
[1]: https://review.opendev.org/#/c/666779/

Change-Id: I77e610cd6781b252327a49aa5cd5bc63d395bf91
Closes-Bug: #1837186
2019-07-19 17:17:19 +08:00
licanwei
dbbe7df1e2 Remove unused readme file
Change-Id: I87c6e6ce1bb6e253014d844a3a67b51cd6b11135
2019-05-30 15:34:32 +08:00
licanwei
cde518be31 Add force option
Partially Implements: blueprint add-force-field-to-audit
Depends-on: Ib2d221ea9c994dea396c54cc8d2d32237025a1d4

Change-Id: I235bbd298b7fa8ad9d8b01a94d68376c8ac27e8d
2019-05-23 07:17:00 +00:00
Zuul
76a01b0c7c Merge "Add marker option for strategy in watcher-client" 2019-03-22 02:05:44 +00:00
chenke
e2082907ff Increase actionplan_shell.py unittest coverage from 70% to 97%
Change-Id: Iaca67b517c2caf4938dbf861bee3add0a41c18a2
2019-03-19 16:10:25 +08:00
Zuul
16ff74f54c Merge "Add marker option for goal" 2019-03-19 03:42:33 +00:00
Zuul
de9b8d124b Merge "Increase the unit test coverage of action_plan.py from 79% to 95%" 2019-03-19 03:42:32 +00:00
chenke
9b1e234e36 Increase the unit test coverage of action_plan.py from 79% to 95%
Change-Id: Ie33b00d690746609663492c63b8f778048a689f2
2019-03-18 11:19:57 +08:00
chenke
d0f2f10f5d Add marker option for strategy in watcher-client
Change-Id: I40ab57889c5402fe5b69d28a3372e7a0a14592f8
2019-03-18 01:12:17 +00:00
zhurong
8342e64051 Remove the functional test
Depends-On: https://review.openstack.org/643247
Change-Id: I5723575d44dccf81779959c1cae43e2cab2abc9b
2019-03-15 03:50:20 +00:00
chenke
2c29c49f24 Add marker option for goal
Change-Id: I27f06019e731633349389781545fe8c3c036d723
2019-03-13 21:23:36 +08:00
licanwei
ca6190c3a1 Use openstack common CLI
Change-Id: Ia013cafe7dfa3a54c86ff44e57f98d64b15b6a86
2019-01-25 09:40:38 +08:00
Alexander Chadin
df57eb800d Pass API microversion to Client class
Change-Id: If6ac21330cb6c8303f62eec6ee5082f523ff73a1
2018-12-17 17:30:01 +03:00
licanwei
98e09044c1 Add continuous audit functional test
Change-Id: Ibee323f7c894ae9ead2ea872561e0e7e79320017
2018-11-30 10:11:33 +08:00
Hidekazu Nakamura
946ef06dc6 Update watcher api command argument
This patch set updates watcher api command argument.
1. os_watcher_api_version to os_infra_optim_api_version
2. OS_WATCHER_API_VERSION to OS_INFRA_OPTIM_API_VERSION

This patch set also updated --os-infra-optim-api-version help message.

Change-Id: I2502377b350b8cabfeba80c68f0569d567d24b3a
2018-11-05 13:07:00 +09:00
licanwei
69f0493968 add start and end time for continuous audit
Add new start_time and end_time fields when audit create

Partially Implements: blueprint add-start-end-time-for-continuous-audit

Change-Id: I37d1bd13649dfb92ce7526f04b25054ed088c4f2
2018-11-01 12:01:07 +08:00
Alexander Chadin
8d62995cf4 Add hostname field to support HA
Change-Id: Ic099070f93edbea738e58f7686d10f354df69532
2018-07-17 18:01:39 +03:00
Zuul
db012f1f8f Merge "Modify Watcher start actionplan command" 2018-05-24 08:08:21 +00:00
deepak_mourya
a4c020c19f Modify Watcher start actionplan command
Currently, watcher start actionplan command uses update request
to start the action plan.
PATCH /v1/action_plans

This Patch Set will send the request to new API for action plan start
POST /v1/action_plans/action_plan_uuid/start

Depends-on: I5353e4aa58d1675d8afb94bea35d9b953514129a
Change-Id: I15291efa994daf719342d764f6179ca7699d8b08
Related-Bug: #1756274
2018-05-08 15:40:27 +05:30
rajat29
8ef72f18c4 Remove 'actionplan create' command
Actionplan create command can create new
audit which looks ambiguous as audit should only
be created by audit command.

Change-Id: I6d8116b4520be5cbb4289de7caf9cc99251e1f9f
Closes-bug: #1764654
2018-04-26 10:26:09 +05:30
Alexander Chadin
83ccfbb177 [WiP] functional jobs fix
Change-Id: If92660ad48b19fce47dd7a88ed33796427f70a80
2018-03-28 09:11:18 +00:00
Alexander Chadin
8acf01859c ZuulV3 support for watcherclient
Change-Id: I0efc302dae72d18f86dbdae1d22a6ea798cfb8f5
2018-03-27 18:38:55 +03:00
Alexander Chadin
9bfefbf9ab Add tempest plugin
This patch set adds tempest plugin to register existing tempest
tests of watcherclient. It is also required to let devstack-tempest
job to launch watcherclient functional tests.

Change-Id: I4d906fd597048bb37803a2bb42f8357502cf1b76
2018-03-23 14:36:38 +03:00
Zuul
a1b6eed54c Merge "Add strategy state command" 2018-01-25 20:34:01 +00:00
Alexander Chadin
a907c2d0cd Add strategy state command
This patch set adds command "strategy state"
that allows to request strategy requirements to run.

Partially-Implements: blueprint check-strategy-requirements
Change-Id: I327cc4f5a887f62af700bd646576caa036faaf75
2018-01-24 14:55:01 +00:00
Alexander Chadin
9d301fa14a Fix test_action_plan functional tests
Change-Id: Ie5b5bd330c68b696dce48e2475baf77a81f2e8c4
Closes-Bug: #1744262
2018-01-19 13:36:19 +03:00
Zuul
d36ba79e77 Merge "marker when retrive audit" 2017-12-13 11:43:17 +00:00
Zuul
7bf192a981 Merge "marker when retrive action" 2017-12-13 08:36:22 +00:00
Zuul
f8b341c0f3 Merge "marker when retrive audit template" 2017-12-13 05:39:09 +00:00
Zuul
c1668fff44 Merge "Add --marker for 'watcher actionplan list'" 2017-11-30 13:54:39 +00:00
suzhengwei
fada471714 marker when retrive audit
Change-Id: I72078850152e0ccf2abc0d35b06a5142df35c312
2017-11-27 06:56:01 +00:00
suzhengwei
1cd8c38d95 marker when retrive action
Change-Id: Ic733c3e79a31c7cd99226e6e49dfbbc8c3b58902
2017-11-27 06:54:42 +00:00
suzhengwei
0257aa9116 marker when retrive audit template
Change-Id: Ia2cd0598770359c2727ec569dd7f2531f7b5f40a
2017-11-22 13:34:18 +00:00
licanwei
aa9d1a65f6 Add --marker for 'watcher actionplan list'
Change-Id: I88bb986d484198add967cdd953f46e341bf6f9ac
Closes-Bug: #1731826
2017-11-21 18:42:44 -08:00
Zuul
7898268426 Merge "Multiple global efficacy" 2017-11-15 01:36:32 +00:00
aditi
e6f361804f Multiple global efficacy
This patch adds changes for python-watcherclient for
multiple global efficacy indicator.

Change-Id: I8a7b283f4f79dc5e412fc0addfc4302ae49425ae
Implements: blueprint multiple-global-efficacy-indicator
2017-11-13 10:04:37 +00:00
suzhengwei
f5b2e7e4f5 add name for audit, changes for python-watcherclient
Change-Id: I9000018459913cd3107814e34977525eb3da10f4
Implements:blueprint add-name-for-audit
2017-11-01 02:42:15 +00:00
Nam Nguyen Hoai
42cab67124 Use generic user for both zuul v2 and v3
Zuul v2 uses 'jenkins' as user, but Zuul v3 uses 'zuul'.
Using $USER solves it for both cases.

Change-Id: I42c3328bf7ce5dbb745eb21954bc5528a6befed5
2017-10-17 07:33:36 +00:00
Alexander Chadin
e92dd4db20 Fix gate-watcherclient-dsvm-functional-ubuntu-xenial job
Closes-Bug: #1722212
Change-Id: I8d5cb2fd1a17beb6049fb5d2a560fc31ba77fe3d
2017-10-09 15:45:03 +03:00
melissaml
320bb4c14f Fix to use "." to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.

Change-Id: Ie6b7d00e63acba0ffd8b27acd791fdb0b08417fe
2017-08-29 02:42:07 +08:00
zte-hanrong
08fbccc684 Add the filed of description to shell command for action.
blueprint dynamic-action-description

Change-Id: I927cf966530059d9c7af1e6e60a8d75dd3e6b812
2017-07-27 16:07:11 +08:00
Jenkins
4bb678f7a5 Merge "Add support for cron syntax" 2017-07-21 09:10:08 +00:00
Jenkins
baadbe3dca Merge "Update URLs in documents according to document migration" 2017-07-19 14:04:41 +00:00
Jenkins
24b089c057 Merge "Update permissions for post_test_hook.sh" 2017-07-19 13:42:36 +00:00
Alexander Chadin
c8acc20e82 Update permissions for post_test_hook.sh
This patch updates permissions up to 755 for post_test_hook.sh
to let it be executed using jenkins jobs.

Change-Id: I0224d10089df05729b8d479d6d910a2a2105c3f8
2017-07-19 14:45:56 +03:00
melissaml
fa91740b47 Update URLs in documents according to document migration
Change-Id: Ic1f137214fc16cdaab2e0da8fd5761a0ed153ad8
2017-07-14 11:38:36 +08:00
Alexander Chadin
c8df16da8f Add support for cron syntax
Implements: blueprint cron-based-continuous-audits

Change-Id: Ib281964fbf9c160791d30eafe94fd83937cac23e
2017-07-10 07:30:38 +00:00