191 Commits

Author SHA1 Message Date
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
Zuul
be479feef9 Merge "Add force option" 2019-05-30 02:06:14 +00:00
Dantali0n
1aebe93477 remove unused cliutils.py file as osc_lib is used
Removes old cliutils.py file that contains methods provided by osc_lib
and remove prettytable dependency that was only required by cliutils.py

Depends-on: I8bc3330a456f8bb76a17c4277a094a64fe9be449
Change-Id: Ib9eedafb211c205ff8b7dd18a9fc87e1f0b2739f
2019-05-23 09:34:30 +02: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
Zuul
9d9c5fe3be Merge "DEFAULT_VER should be '1.latest'" 2019-02-01 09:30:20 +00:00
licanwei
e4ee4ff03c DEFAULT_VER should be '1.latest'
Change-Id: I359838db9ee8427812215833f379a84463c8dbfb
2019-01-26 14:10:20 +08:00
licanwei
ca6190c3a1 Use openstack common CLI
Change-Id: Ia013cafe7dfa3a54c86ff44e57f98d64b15b6a86
2019-01-25 09:40:38 +08:00
ZhijunWei
4a1b6eaf81 Update hacking version
1. update the hacking to latest, due to[1]
2. fix pep8 failed

[1]: https://github.com/openstack/python-watcherclient/blob/master/HACKING.rst

Change-Id: I02891ca17e2655b9567cc56b5c2c0b4fb6a96446
2019-01-17 14:20:33 +00:00
Zuul
9d1d5e2cae Merge "Pass API microversion to Client class" 2019-01-14 08:57:24 +00:00
licanwei
3e734b177d update audit start/end time help
Change-Id: I47232f671eacd9a6b8923d4ee588c4413f65d015
2018-12-24 13:55:09 +08:00
Alexander Chadin
df57eb800d Pass API microversion to Client class
Change-Id: If6ac21330cb6c8303f62eec6ee5082f523ff73a1
2018-12-17 17:30:01 +03:00
Zuul
ab22110f7b Merge "Revert "Pass actual API version to Client class"" 2018-12-14 12:13:20 +00:00
Alexander Chadin
bdd99d60f3 Revert "Pass actual API version to Client class"
This reverts commit e391d53c2f.

Change-Id: I87c18b2e0d2b291f1de446cc6d8fc39a63fba589
2018-12-14 10:47:49 +00:00
Zuul
8ce78f8c1f Merge "Fix obsolete version of osc" 2018-12-07 11:21:16 +00:00
Alexander Chadin
ffc50c5001 Fix obsolete version of osc
This patch set adds a link to actual API version for OSC.

Closes-Bug: #1807180
Change-Id: I622bfec99c2e6fd9f69293aaa04c3184215af0d3
2018-12-06 18:03:30 +03:00
licanwei
98e09044c1 Add continuous audit functional test
Change-Id: Ibee323f7c894ae9ead2ea872561e0e7e79320017
2018-11-30 10:11:33 +08:00
Zuul
112e372239 Merge "Pass actual API version to Client class" 2018-11-20 02:00:44 +00:00
Zuul
c5b4db7fc1 Merge "Refactor the getid method base.py" 2018-11-19 09:01:44 +00:00
wanghui
94f6864bf0 Refactor the getid method base.py
Refer to a merged commit.
https://review.openstack.org/#/c/588983/

Change-Id: I9765543c288370cfcdaaa930b2839e28b51a9380
2018-11-09 20:11:16 +08:00
Alexander Chadin
e391d53c2f Pass actual API version to Client class
Change-Id: Ie5f563c6982239ad7a99af06f704e2d931d164be
2018-11-08 17:39:22 +03:00
licanwei
b7928eb155 Replace latest with explicit version
Change-Id: I8aae4595f7ca9dae7ed36705b1311070a531523f
Closes-Bug: #1802217
2018-11-08 16:59:38 +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
Zuul
8c89b3327b Merge "Prepare watcherclient for microversioning" 2018-10-31 12:42:22 +00:00
Alexander Chadin
2e9de6868b Prepare watcherclient for microversioning
Implements: blueprint bp/api-microversioning

Change-Id: I049f9aac84a5658efaccc9e9fdf6c9d4be677d29
2018-10-18 11:29:30 +03:00
Alexander Chadin
db7a5e4bc9 Allow CLI to pass goal and strategy names
This patch set removes additional type verification
for goal and strategy entities to let CLI pass goal
and strategy names straight to API.

Depends-On: I89a9c7661616f49639151869055d8f5ebe723d5f
Change-Id: I323a66dd5bdef6f33d5fd5c60c99e1b4dcd7a7e0
Closes-Bug: #1794233
2018-10-02 13:58:48 +03:00
Alexander Chadin
c1fd569b76 fix watcher actionplan show command
This patch set is intended for Python 3.x support and replace
itervalues() method with values().

Change-Id: I6852239d2d6634a4304c87a1694e64479f560de1
Closes-Bug: #1786784
2018-08-13 17:31:02 +03:00
chenke
3926dcc541 Organize the use of 'log' and replace 'log' with LOG
Change-Id: I42ddf63dd73559e43efce401f3912c4b9413a6d4
2018-07-31 11:25:25 +08:00
Zuul
0b8dba2cb9 Merge "Fix watherclient error in py3" 2018-07-27 09:27:56 +00:00
zhurong
2551ff0934 Fix watherclient error in py3
watchercliet will raise error:
Recoverable error: sequence item 0: expected str instance, bytes found

This patch fix this.

Change-Id: I6fe21766f320b0a09a14202203a5d0451175e1d3
2018-07-26 11:37:35 +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
Alexander Chadin
0d7233055d Fix global efficacy format
Closes-Bug: #1749463
Change-Id: I0496f0d82bbf72dbbc8b808feb3a529ad6d49402
2018-02-14 17:06:15 +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