watcher-tempest-plugin 3.8.0__tar.gz → 3.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/.zuul.yaml +15 -14
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/AUTHORS +2 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/ChangeLog +23 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/PKG-INFO +3 -4
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/requirements.txt +1 -1
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/setup.cfg +1 -2
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/config.py +48 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/infra_optim_clients.py +0 -22
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/json/client.py +8 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/prometheus_client.py +1 -1
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/base.py +2 -2
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_action.py +7 -4
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_action_plan.py +11 -8
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_audit.py +66 -11
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_audit_template.py +84 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action.py +5 -2
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action_plan.py +7 -4
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit.py +13 -10
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/common/base.py +14 -8
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/base.py +153 -51
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_continuous_audit.py +12 -12
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_data_model.py +9 -3
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin/tests/scenario/test_execute_actuator.py +484 -0
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +195 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py +71 -2
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin/tests/scenario/test_execute_skipped_actions.py +667 -0
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +171 -0
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py +305 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py +76 -1
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py +218 -36
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/PKG-INFO +3 -4
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/SOURCES.txt +1 -0
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin.egg-info/pbr.json +1 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/requires.txt +1 -1
- watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_actuator.py +0 -202
- watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +0 -114
- watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +0 -91
- watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py +0 -137
- watcher_tempest_plugin-3.8.0/watcher_tempest_plugin.egg-info/pbr.json +0 -1
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/.coveragerc +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/.mailmap +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/.stestr.conf +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/.testr.conf +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/CONTRIBUTING.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/HACKING.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/LICENSE +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/README.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/doc/requirements.txt +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/doc/source/conf.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/doc/source/contributing.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/doc/source/index.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/doc/source/readme.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/pyproject.toml +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/.placeholder +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/drop-py-2-7-eb1979587d237f5e.yaml +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/drop-python38-support-eeb09a8bc0170ce2.yaml +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/parametrize-promtool-write-url-path-3534f2b9.yaml +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/_static/.placeholder +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/_templates/.placeholder +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/conf.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/index.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/unreleased.rst +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/setup.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/test-requirements.txt +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/tox.ini +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/plugin.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/base.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/json/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/json/api_microversion_fixture.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/v1/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/v1/json/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/v1/json/client.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_data_model.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_goal.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_scoring_engine.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_service.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_strategy.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/base.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit_template.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_goal.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_scoring_engine.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_service.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_strategy.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/common/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/__init__.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/utils.py +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/dependency_links.txt +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/entry_points.txt +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/not-zip-safe +0 -0
- {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/top_level.txt +0 -0
|
@@ -10,28 +10,39 @@
|
|
|
10
10
|
- watcher-tempest-aetos
|
|
11
11
|
- watcher-tempest-gnocchi
|
|
12
12
|
- watcher-tempest-prometheus
|
|
13
|
+
- watcher-tempest-aetos-2026-2
|
|
14
|
+
- watcher-tempest-gnocchi-2026-2
|
|
13
15
|
- watcher-tempest-aetos-2026-1
|
|
14
16
|
- watcher-tempest-gnocchi-2026-1
|
|
15
17
|
- watcher-tempest-aetos-2025-2
|
|
16
18
|
- watcher-tempest-gnocchi-2025-2
|
|
17
|
-
- watcher-tempest-gnocchi-2025-1
|
|
18
|
-
- watcher-tempest-prometheus-2025-1
|
|
19
19
|
gate:
|
|
20
20
|
jobs:
|
|
21
21
|
- watcher-tempest-aetos
|
|
22
22
|
- watcher-tempest-gnocchi
|
|
23
23
|
- watcher-tempest-prometheus
|
|
24
|
+
- watcher-tempest-aetos-2026-2
|
|
25
|
+
- watcher-tempest-gnocchi-2026-2
|
|
24
26
|
- watcher-tempest-aetos-2026-1
|
|
25
27
|
- watcher-tempest-gnocchi-2026-1
|
|
26
28
|
- watcher-tempest-aetos-2025-2
|
|
27
29
|
- watcher-tempest-gnocchi-2025-2
|
|
28
|
-
- watcher-tempest-gnocchi-2025-1
|
|
29
|
-
- watcher-tempest-prometheus-2025-1
|
|
30
30
|
experimental:
|
|
31
31
|
jobs:
|
|
32
32
|
- watcher-tempest-prometheus-realdata
|
|
33
33
|
- watcher-tempest-aetos-realdata
|
|
34
34
|
|
|
35
|
+
# stable/2026.2 jobs
|
|
36
|
+
- job:
|
|
37
|
+
name: watcher-tempest-aetos-2026-2
|
|
38
|
+
parent: watcher-tempest-aetos
|
|
39
|
+
override-checkout: stable/2026.2
|
|
40
|
+
|
|
41
|
+
- job:
|
|
42
|
+
name: watcher-tempest-gnocchi-2026-2
|
|
43
|
+
parent: watcher-tempest-gnocchi
|
|
44
|
+
override-checkout: stable/2026.2
|
|
45
|
+
|
|
35
46
|
# stable/2026.1 jobs
|
|
36
47
|
- job:
|
|
37
48
|
name: watcher-tempest-aetos-2026-1
|
|
@@ -54,13 +65,3 @@
|
|
|
54
65
|
parent: watcher-tempest-gnocchi
|
|
55
66
|
override-checkout: stable/2025.2
|
|
56
67
|
|
|
57
|
-
# stable/2025.1 jobs
|
|
58
|
-
- job:
|
|
59
|
-
name: watcher-tempest-gnocchi-2025-1
|
|
60
|
-
parent: watcher-tempest-gnocchi
|
|
61
|
-
override-checkout: stable/2025.1
|
|
62
|
-
|
|
63
|
-
- job:
|
|
64
|
-
name: watcher-tempest-prometheus-2025-1
|
|
65
|
-
parent: watcher-tempest-prometheus
|
|
66
|
-
override-checkout: stable/2025.1
|
|
@@ -9,6 +9,7 @@ Dantali0n <info@dantalion.nl>
|
|
|
9
9
|
David TARDIVEL <David.TARDIVEL@b-com.com>
|
|
10
10
|
Douglas Viroel <viroel@gmail.com>
|
|
11
11
|
Drew Thorstensen <thorst@us.ibm.com>
|
|
12
|
+
Ghanshyam Maan <gmaan.os14@gmail.com>
|
|
12
13
|
Ghanshyam Maan <gmaan@ghanshyammann.com>
|
|
13
14
|
Ghanshyam Mann <gmann@ghanshyammann.com>
|
|
14
15
|
Gábor Antal <antal@inf.u-szeged.hu>
|
|
@@ -33,6 +34,7 @@ Tin Lam <tl3438@att.com>
|
|
|
33
34
|
Vieri <15050873171@163.com>
|
|
34
35
|
Vincent Françoise <Vincent.FRANCOISE@b-com.com>
|
|
35
36
|
Vu Cong Tuan <tuanvc@vn.fujitsu.com>
|
|
37
|
+
Winicius Allan <wdasilva@redhat.com>
|
|
36
38
|
Xing Zhang <angeiv.zhang@gmail.com>
|
|
37
39
|
Yumeng_Bao <yumeng_bao@yahoo.com>
|
|
38
40
|
avnish <avnish.pal@nectechnologies.in>
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
3.10.0
|
|
5
|
+
------
|
|
6
|
+
|
|
7
|
+
* Drop unmaintained stable/2025.1 jobs
|
|
8
|
+
* Unskip test\_list\_with\_limit now that bug 2134046 is fixed
|
|
9
|
+
* Use 'oc exec' instead of 'oc rsh' for podified commands
|
|
10
|
+
* Fix duplicated comment on delete and shelve actions
|
|
11
|
+
|
|
12
|
+
3.9.0
|
|
13
|
+
-----
|
|
14
|
+
|
|
15
|
+
* Add stable/2026.2 job
|
|
16
|
+
* Add tests for delete and shelve actions
|
|
17
|
+
* Handle multi-cell deployments in live-migration scenario tests
|
|
18
|
+
* Add API tests for audit template default\_parameters
|
|
19
|
+
* Fix test\_data\_model\_with\_instances for environments with extra compute nodes
|
|
20
|
+
* Make test polling intervals and timeouts configurable
|
|
21
|
+
* Drop python 3.10
|
|
22
|
+
* Add comprehensive tests for action precondition
|
|
23
|
+
* Replace ExtendPlacementClient with tempest lib
|
|
24
|
+
* Add disk constraint validation to workload\_balance
|
|
25
|
+
* Add scenario tests for boot from volume instances
|
|
26
|
+
|
|
4
27
|
3.8.0
|
|
5
28
|
-----
|
|
6
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: watcher-tempest-plugin
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.10.0
|
|
4
4
|
Summary: Tempest plugin watcher-tempest-plugin
|
|
5
5
|
Home-page: https://docs.openstack.org/watcher/latest/
|
|
6
6
|
Author: OpenStack
|
|
@@ -14,16 +14,15 @@ Classifier: Programming Language :: Python
|
|
|
14
14
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
15
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.11
|
|
22
21
|
License-File: LICENSE
|
|
23
22
|
Requires-Dist: pbr>=3.1.1
|
|
24
23
|
Requires-Dist: oslo.log>=3.36.0
|
|
25
24
|
Requires-Dist: oslo.utils>=3.33.0
|
|
26
|
-
Requires-Dist: tempest>=
|
|
25
|
+
Requires-Dist: tempest>=41.0.0
|
|
27
26
|
Requires-Dist: os-traits>=0.15.0
|
|
28
27
|
Dynamic: author
|
|
29
28
|
Dynamic: author-email
|
|
@@ -6,7 +6,7 @@ description_file =
|
|
|
6
6
|
author = OpenStack
|
|
7
7
|
author_email = openstack-discuss@lists.openstack.org
|
|
8
8
|
home_page = https://docs.openstack.org/watcher/latest/
|
|
9
|
-
python_requires = >=3.
|
|
9
|
+
python_requires = >=3.11
|
|
10
10
|
classifier =
|
|
11
11
|
Environment :: OpenStack
|
|
12
12
|
Intended Audience :: Information Technology
|
|
@@ -17,7 +17,6 @@ classifier =
|
|
|
17
17
|
Programming Language :: Python :: Implementation :: CPython
|
|
18
18
|
Programming Language :: Python :: 3 :: Only
|
|
19
19
|
Programming Language :: Python :: 3
|
|
20
|
-
Programming Language :: Python :: 3.10
|
|
21
20
|
Programming Language :: Python :: 3.11
|
|
22
21
|
Programming Language :: Python :: 3.12
|
|
23
22
|
Programming Language :: Python :: 3.13
|
{watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/config.py
RENAMED
|
@@ -122,6 +122,33 @@ OptimizationGroup = [
|
|
|
122
122
|
help="In real-data test cases, the period of time during which "
|
|
123
123
|
"the load will be executed in seconds."
|
|
124
124
|
),
|
|
125
|
+
cfg.FloatOpt(
|
|
126
|
+
"model_check_interval",
|
|
127
|
+
default=1.0,
|
|
128
|
+
help="Interval in seconds between polls when waiting for the "
|
|
129
|
+
"Watcher compute data model to reflect instance changes "
|
|
130
|
+
"(creation, attribute updates, deletion)."
|
|
131
|
+
),
|
|
132
|
+
cfg.FloatOpt(
|
|
133
|
+
"resource_check_interval",
|
|
134
|
+
default=1.0,
|
|
135
|
+
help="Interval in seconds between polls when waiting for Watcher "
|
|
136
|
+
"resources (audits, action plans, compute nodes) to reach "
|
|
137
|
+
"an expected state."
|
|
138
|
+
),
|
|
139
|
+
cfg.IntOpt(
|
|
140
|
+
"resource_timeout",
|
|
141
|
+
default=300,
|
|
142
|
+
help="Maximum time in seconds to wait for Watcher resources "
|
|
143
|
+
"(audits, action plans, compute nodes) to reach an expected "
|
|
144
|
+
"state."
|
|
145
|
+
),
|
|
146
|
+
cfg.IntOpt(
|
|
147
|
+
"model_timeout",
|
|
148
|
+
default=300,
|
|
149
|
+
help="Maximum time in seconds to wait for the Watcher compute "
|
|
150
|
+
"data model to reflect instance changes."
|
|
151
|
+
),
|
|
125
152
|
cfg.StrOpt(
|
|
126
153
|
"min_microversion",
|
|
127
154
|
default=None,
|
|
@@ -162,4 +189,25 @@ OptimizationGroup = [
|
|
|
162
189
|
default=False,
|
|
163
190
|
help="Whether or not to run storage zone migration tests."
|
|
164
191
|
),
|
|
192
|
+
cfg.BoolOpt(
|
|
193
|
+
"run_bfv_tests",
|
|
194
|
+
default=False,
|
|
195
|
+
help="Whether or not to run boot from volume tests."
|
|
196
|
+
),
|
|
197
|
+
cfg.BoolOpt(
|
|
198
|
+
"run_skipped_action_tests",
|
|
199
|
+
default=False,
|
|
200
|
+
help="Whether or not to run skipped action precondition "
|
|
201
|
+
"validation tests. These tests validate that Watcher "
|
|
202
|
+
"properly skips or fails actions when preconditions "
|
|
203
|
+
"are not met. Requires Watcher to support the action "
|
|
204
|
+
"skipping feature."
|
|
205
|
+
),
|
|
206
|
+
cfg.BoolOpt(
|
|
207
|
+
"run_delete_shelve_action_tests",
|
|
208
|
+
default=False,
|
|
209
|
+
help="Whether or not to run delete and shelve action tests. "
|
|
210
|
+
"These tests validate the actuator strategy's delete and "
|
|
211
|
+
"shelve actions, including precondition validation."
|
|
212
|
+
)
|
|
165
213
|
]
|
|
@@ -16,12 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import abc
|
|
18
18
|
|
|
19
|
-
from oslo_serialization import jsonutils as json
|
|
20
19
|
from tempest import clients
|
|
21
20
|
from tempest.common import credentials_factory as creds_factory
|
|
22
21
|
from tempest import config
|
|
23
|
-
from tempest.lib.common import rest_client
|
|
24
|
-
from tempest.lib.services.placement import placement_client
|
|
25
22
|
|
|
26
23
|
from watcher_tempest_plugin.services.infra_optim.v1.json import client as ioc
|
|
27
24
|
from watcher_tempest_plugin.services.metric import prometheus_client as pc
|
|
@@ -38,8 +35,6 @@ class BaseManager(clients.Manager, metaclass=abc.ABCMeta):
|
|
|
38
35
|
self.auth_provider, 'infra-optim', CONF.identity.region)
|
|
39
36
|
self.gn_client = gc.GnocchiClientJSON(
|
|
40
37
|
self.auth_provider, 'metric', CONF.identity.region)
|
|
41
|
-
self.placement_client = ExtendPlacementClient(
|
|
42
|
-
self.auth_provider, 'placement', CONF.identity.region)
|
|
43
38
|
prom_ssl = "s" if CONF.optimize.prometheus_ssl_enabled else ""
|
|
44
39
|
self.prometheus_client = pc.PromtoolClient(
|
|
45
40
|
"http{}://{}:{}".format(prom_ssl,
|
|
@@ -64,20 +59,3 @@ class AdminManager(BaseManager):
|
|
|
64
59
|
super(AdminManager, self).__init__(
|
|
65
60
|
creds_factory.get_configured_admin_credentials(),
|
|
66
61
|
)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class ExtendPlacementClient(placement_client.PlacementClient):
|
|
70
|
-
|
|
71
|
-
def list_provider_traits(self, rp_uuid):
|
|
72
|
-
"""List resource provider traits.
|
|
73
|
-
|
|
74
|
-
For full list of available parameters, please refer to the official
|
|
75
|
-
API reference:
|
|
76
|
-
https://docs.openstack.org/api-ref/placement/#
|
|
77
|
-
list-resource-provider-traits-detail
|
|
78
|
-
"""
|
|
79
|
-
url = '/resource_providers/%s/traits' % rp_uuid
|
|
80
|
-
resp, body = self.get(url)
|
|
81
|
-
self.expected_success(200, resp.status)
|
|
82
|
-
body = json.loads(body)
|
|
83
|
-
return rest_client.ResponseBody(resp, body)
|
|
@@ -74,6 +74,8 @@ class InfraOptimClientJSON(base.BaseClient):
|
|
|
74
74
|
:param goal_uuid: The related Goal UUID associated.
|
|
75
75
|
:param strategy_uuid: The related Strategy UUID associated.
|
|
76
76
|
:param audit_scope: Scope the audit should apply to.
|
|
77
|
+
:param default_parameters: Default strategy parameters for the audit
|
|
78
|
+
template (requires API version 1.7 or later).
|
|
77
79
|
:return: A tuple with the server response and the created audit
|
|
78
80
|
template.
|
|
79
81
|
"""
|
|
@@ -90,6 +92,12 @@ class InfraOptimClientJSON(base.BaseClient):
|
|
|
90
92
|
'scope': parameters.get('scope', []),
|
|
91
93
|
}
|
|
92
94
|
|
|
95
|
+
# NOTE(dviroel): default_parameters was added in api version 1.7
|
|
96
|
+
if parameters.get('default_parameters') is not None:
|
|
97
|
+
audit_template['default_parameters'] = (
|
|
98
|
+
parameters.get('default_parameters')
|
|
99
|
+
)
|
|
100
|
+
|
|
93
101
|
return self._create_request('audit_templates', audit_template)
|
|
94
102
|
|
|
95
103
|
@base.handle_errors
|
|
@@ -82,7 +82,7 @@ class PromtoolClient:
|
|
|
82
82
|
# podified control plane will run promtool inside
|
|
83
83
|
# prometheus container
|
|
84
84
|
self.prometheus_pod = self.get_prometheus_pod()
|
|
85
|
-
cmd_prefix = self.oc_cmd + ["
|
|
85
|
+
cmd_prefix = self.oc_cmd + ["exec", self.prometheus_pod, "--"]
|
|
86
86
|
self.client.cmd_prefix = " ".join(cmd_prefix)
|
|
87
87
|
|
|
88
88
|
# We keep the raw URL for reference/labels
|
|
@@ -91,8 +91,8 @@ class BaseInfraOptimTest(api_version_utils.BaseMicroversionTest,
|
|
|
91
91
|
def wait_for_all_action_plans_to_finish(self):
|
|
92
92
|
assert test_utils.call_until_true(
|
|
93
93
|
func=self._are_all_action_plans_finished,
|
|
94
|
-
duration=
|
|
95
|
-
sleep_for=
|
|
94
|
+
duration=CONF.optimize.resource_timeout,
|
|
95
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
96
96
|
)
|
|
97
97
|
|
|
98
98
|
def validate_self_link(self, resource, uuid, link):
|
|
@@ -17,11 +17,14 @@
|
|
|
17
17
|
import collections
|
|
18
18
|
import functools
|
|
19
19
|
|
|
20
|
+
from tempest import config
|
|
20
21
|
from tempest.lib.common.utils import test_utils
|
|
21
22
|
from tempest.lib import decorators
|
|
22
23
|
|
|
23
24
|
from watcher_tempest_plugin.tests.api.admin import base
|
|
24
25
|
|
|
26
|
+
CONF = config.CONF
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
class TestShowListAction(base.BaseInfraOptimTest):
|
|
27
30
|
"""Tests for actions"""
|
|
@@ -40,8 +43,8 @@ class TestShowListAction(base.BaseInfraOptimTest):
|
|
|
40
43
|
assert test_utils.call_until_true(
|
|
41
44
|
func=functools.partial(self.has_audit_finished,
|
|
42
45
|
self.audit['uuid']),
|
|
43
|
-
duration=
|
|
44
|
-
sleep_for
|
|
46
|
+
duration=CONF.optimize.resource_timeout,
|
|
47
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
45
48
|
), "Audit %s did not finish within expected time" % self.audit['uuid']
|
|
46
49
|
|
|
47
50
|
# Check if audit succeeded
|
|
@@ -148,8 +151,8 @@ class TestPatchAction(base.BaseInfraOptimTest):
|
|
|
148
151
|
assert test_utils.call_until_true(
|
|
149
152
|
func=functools.partial(self.has_audit_finished,
|
|
150
153
|
self.audit['uuid']),
|
|
151
|
-
duration=
|
|
152
|
-
sleep_for
|
|
154
|
+
duration=CONF.optimize.resource_timeout,
|
|
155
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
153
156
|
), "Audit %s did not finish within expected time" % self.audit['uuid']
|
|
154
157
|
|
|
155
158
|
# Check if audit succeeded
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
|
|
17
17
|
import functools
|
|
18
18
|
|
|
19
|
+
from tempest import config
|
|
19
20
|
from tempest.lib.common.utils import test_utils
|
|
20
21
|
from tempest.lib import decorators
|
|
21
22
|
from tempest.lib import exceptions
|
|
22
23
|
|
|
23
24
|
from watcher_tempest_plugin.tests.api.admin import base
|
|
24
25
|
|
|
26
|
+
CONF = config.CONF
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest):
|
|
27
30
|
"""Tests for action plans"""
|
|
@@ -35,8 +38,8 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest):
|
|
|
35
38
|
|
|
36
39
|
self.assertTrue(test_utils.call_until_true(
|
|
37
40
|
func=functools.partial(self.has_audit_finished, audit['uuid']),
|
|
38
|
-
duration=
|
|
39
|
-
sleep_for
|
|
41
|
+
duration=CONF.optimize.resource_timeout,
|
|
42
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
40
43
|
))
|
|
41
44
|
_, action_plans = self.client.list_action_plans(
|
|
42
45
|
audit_uuid=audit['uuid'])
|
|
@@ -60,8 +63,8 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest):
|
|
|
60
63
|
|
|
61
64
|
self.assertTrue(test_utils.call_until_true(
|
|
62
65
|
func=functools.partial(self.has_audit_finished, audit['uuid']),
|
|
63
|
-
duration=
|
|
64
|
-
sleep_for
|
|
66
|
+
duration=CONF.optimize.resource_timeout,
|
|
67
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
65
68
|
))
|
|
66
69
|
|
|
67
70
|
_, action_plans = self.client.list_action_plans(
|
|
@@ -89,8 +92,8 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest):
|
|
|
89
92
|
|
|
90
93
|
self.assertTrue(test_utils.call_until_true(
|
|
91
94
|
func=functools.partial(self.has_audit_finished, audit['uuid']),
|
|
92
|
-
duration=
|
|
93
|
-
sleep_for
|
|
95
|
+
duration=CONF.optimize.resource_timeout,
|
|
96
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
94
97
|
))
|
|
95
98
|
|
|
96
99
|
_, action_plans = self.client.list_action_plans(
|
|
@@ -121,8 +124,8 @@ class TestShowListActionPlan(base.BaseInfraOptimTest):
|
|
|
121
124
|
assert test_utils.call_until_true(
|
|
122
125
|
func=functools.partial(
|
|
123
126
|
self.has_audit_finished, self.audit['uuid']),
|
|
124
|
-
duration=
|
|
125
|
-
sleep_for
|
|
127
|
+
duration=CONF.optimize.resource_timeout,
|
|
128
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
126
129
|
)
|
|
127
130
|
|
|
128
131
|
_, action_plans = self.client.list_action_plans(
|
|
@@ -20,6 +20,7 @@ from datetime import datetime
|
|
|
20
20
|
from datetime import timedelta
|
|
21
21
|
from datetime import timezone
|
|
22
22
|
|
|
23
|
+
from tempest import config
|
|
23
24
|
from tempest.lib.common.utils import test_utils
|
|
24
25
|
from tempest.lib import decorators
|
|
25
26
|
from tempest.lib import exceptions
|
|
@@ -27,6 +28,8 @@ from tempest.lib import exceptions
|
|
|
27
28
|
from watcher_tempest_plugin.tests.api.admin import base
|
|
28
29
|
from watcher_tempest_plugin.tests.common import base as common_base
|
|
29
30
|
|
|
31
|
+
CONF = config.CONF
|
|
32
|
+
|
|
30
33
|
|
|
31
34
|
class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest):
|
|
32
35
|
"""Tests for audit."""
|
|
@@ -149,8 +152,8 @@ class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest):
|
|
|
149
152
|
test_utils.call_until_true(
|
|
150
153
|
func=functools.partial(
|
|
151
154
|
self.is_audit_ongoing, audit_uuid),
|
|
152
|
-
duration=
|
|
153
|
-
sleep_for
|
|
155
|
+
duration=CONF.optimize.resource_timeout,
|
|
156
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
154
157
|
)
|
|
155
158
|
|
|
156
159
|
self.cancel_audit(audit_uuid)
|
|
@@ -166,8 +169,8 @@ class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest):
|
|
|
166
169
|
test_utils.call_until_true(
|
|
167
170
|
func=functools.partial(
|
|
168
171
|
self.is_audit_idle, audit_uuid),
|
|
169
|
-
duration=
|
|
170
|
-
sleep_for
|
|
172
|
+
duration=CONF.optimize.resource_timeout,
|
|
173
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
171
174
|
)
|
|
172
175
|
|
|
173
176
|
def is_audit_deleted(uuid):
|
|
@@ -180,8 +183,8 @@ class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest):
|
|
|
180
183
|
|
|
181
184
|
test_utils.call_until_true(
|
|
182
185
|
func=functools.partial(is_audit_deleted, audit_uuid),
|
|
183
|
-
duration=
|
|
184
|
-
sleep_for=
|
|
186
|
+
duration=CONF.optimize.resource_timeout,
|
|
187
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
185
188
|
)
|
|
186
189
|
|
|
187
190
|
self.assertTrue(is_audit_deleted(audit_uuid))
|
|
@@ -291,13 +294,15 @@ class TestCreateUpdateDeleteAuditV11(base.BaseInfraOptimTest):
|
|
|
291
294
|
# Wait for first action plan
|
|
292
295
|
self.assertTrue(test_utils.call_until_true(
|
|
293
296
|
func=functools.partial(self.has_action_plans, audit_uuid),
|
|
294
|
-
duration=
|
|
297
|
+
duration=CONF.optimize.resource_timeout,
|
|
298
|
+
sleep_for=CONF.optimize.resource_check_interval))
|
|
295
299
|
|
|
296
300
|
# Wait for multiple action plans (superseding behavior)
|
|
297
301
|
self.assertTrue(test_utils.call_until_true(
|
|
298
302
|
func=functools.partial(self._has_multiple_action_plans,
|
|
299
303
|
audit_uuid),
|
|
300
|
-
duration=
|
|
304
|
+
duration=CONF.optimize.resource_timeout,
|
|
305
|
+
sleep_for=CONF.optimize.resource_check_interval),
|
|
301
306
|
"Failed to generate multiple action plans for superseding test")
|
|
302
307
|
|
|
303
308
|
# Verify superseding: latest RECOMMENDED, previous CANCELLED
|
|
@@ -418,6 +423,57 @@ class TestCreateUpdateDeleteAuditV14(base.BaseInfraOptimTest):
|
|
|
418
423
|
self.assertEqual(audit['state'], 'CANCELLED')
|
|
419
424
|
|
|
420
425
|
|
|
426
|
+
class TestCreateAuditWithDefaultParameters(base.BaseInfraOptimTest):
|
|
427
|
+
"""Tests for audit inheriting default_parameters from audit template."""
|
|
428
|
+
|
|
429
|
+
min_microversion = '1.7'
|
|
430
|
+
|
|
431
|
+
@decorators.attr(type='smoke')
|
|
432
|
+
@decorators.idempotent_id('2586951a-ce4c-4c10-8c61-ac673999010c')
|
|
433
|
+
def test_audit_inherits_template_default_parameters(self):
|
|
434
|
+
"""Audit created from a template inherits default_parameters."""
|
|
435
|
+
_, goal = self.client.show_goal("dummy")
|
|
436
|
+
_, strategy = self.client.show_strategy("dummy")
|
|
437
|
+
default_params = {'para1': 5.0}
|
|
438
|
+
|
|
439
|
+
_, audit_template = self.create_audit_template(
|
|
440
|
+
goal['uuid'],
|
|
441
|
+
strategy=strategy['uuid'],
|
|
442
|
+
default_parameters=default_params,
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
_, body = self.create_audit(
|
|
446
|
+
audit_template['uuid'],
|
|
447
|
+
audit_type='ONESHOT',
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
for key, value in default_params.items():
|
|
451
|
+
self.assertEqual(value, body['parameters'][key])
|
|
452
|
+
|
|
453
|
+
@decorators.attr(type='smoke')
|
|
454
|
+
@decorators.idempotent_id('a340f036-0c6e-4bd5-a081-153265de013c')
|
|
455
|
+
def test_audit_parameters_override_template_defaults(self):
|
|
456
|
+
"""Explicit audit parameters take precedence over template defaults."""
|
|
457
|
+
_, goal = self.client.show_goal("dummy")
|
|
458
|
+
_, strategy = self.client.show_strategy("dummy")
|
|
459
|
+
|
|
460
|
+
_, audit_template = self.create_audit_template(
|
|
461
|
+
goal['uuid'],
|
|
462
|
+
strategy=strategy['uuid'],
|
|
463
|
+
default_parameters={'para1': 3.0},
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
override_params = {'para1': 8.0}
|
|
467
|
+
_, body = self.create_audit(
|
|
468
|
+
audit_template['uuid'],
|
|
469
|
+
audit_type='ONESHOT',
|
|
470
|
+
parameters=override_params,
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
for key, value in override_params.items():
|
|
474
|
+
self.assertEqual(value, body['parameters'][key])
|
|
475
|
+
|
|
476
|
+
|
|
421
477
|
class TestShowListAudit(base.BaseInfraOptimTest):
|
|
422
478
|
"""Tests for audit."""
|
|
423
479
|
|
|
@@ -432,8 +488,8 @@ class TestShowListAudit(base.BaseInfraOptimTest):
|
|
|
432
488
|
self.assertTrue(test_utils.call_until_true(
|
|
433
489
|
func=functools.partial(
|
|
434
490
|
self.has_audit_finished, self.audit['uuid']),
|
|
435
|
-
duration=
|
|
436
|
-
sleep_for
|
|
491
|
+
duration=CONF.optimize.resource_timeout,
|
|
492
|
+
sleep_for=CONF.optimize.resource_check_interval
|
|
437
493
|
))
|
|
438
494
|
|
|
439
495
|
def assert_expected(self, expected, actual,
|
|
@@ -482,7 +538,6 @@ class TestShowListAudit(base.BaseInfraOptimTest):
|
|
|
482
538
|
|
|
483
539
|
@decorators.attr(type='smoke')
|
|
484
540
|
@decorators.idempotent_id('5175607c-f2df-4df6-9168-45c789b4a6ea')
|
|
485
|
-
@decorators.skip_because(bug="2134046")
|
|
486
541
|
def test_list_with_limit(self):
|
|
487
542
|
# We create 3 extra audits to exceed the limit we fix
|
|
488
543
|
for _ in range(3):
|
|
@@ -19,6 +19,9 @@ from oslo_utils import uuidutils
|
|
|
19
19
|
from tempest.lib import decorators
|
|
20
20
|
from tempest.lib import exceptions
|
|
21
21
|
|
|
22
|
+
from watcher_tempest_plugin.services.infra_optim.v1.json import (
|
|
23
|
+
api_microversion_fixture
|
|
24
|
+
)
|
|
22
25
|
from watcher_tempest_plugin.tests.api.admin import base
|
|
23
26
|
|
|
24
27
|
|
|
@@ -233,3 +236,84 @@ class TestAuditTemplate(base.BaseInfraOptimTest):
|
|
|
233
236
|
|
|
234
237
|
_, body = self.client.show_audit_template(body['uuid'])
|
|
235
238
|
self.assertEqual('description', body['description'])
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class TestAuditTemplateDefaultParameters(base.BaseInfraOptimTest):
|
|
242
|
+
"""Tests for audit template default_parameters (API v1.7)."""
|
|
243
|
+
|
|
244
|
+
min_microversion = '1.7'
|
|
245
|
+
|
|
246
|
+
def setUp(self):
|
|
247
|
+
super().setUp()
|
|
248
|
+
_, self.goal = self.client.show_goal("dummy")
|
|
249
|
+
_, self.strategy = self.client.show_strategy("dummy")
|
|
250
|
+
|
|
251
|
+
@decorators.attr(type='smoke')
|
|
252
|
+
@decorators.idempotent_id('2253c638-194c-46dd-989f-b0f9b173e886')
|
|
253
|
+
def test_create_audit_template_with_default_parameters(self):
|
|
254
|
+
default_params = {'para1': 5.0}
|
|
255
|
+
_, body = self.create_audit_template(
|
|
256
|
+
goal=self.goal['uuid'],
|
|
257
|
+
strategy=self.strategy['uuid'],
|
|
258
|
+
default_parameters=default_params,
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
self.assertEqual(default_params, body['default_parameters'])
|
|
262
|
+
|
|
263
|
+
_, audit_template = self.client.show_audit_template(body['uuid'])
|
|
264
|
+
self.assertEqual(default_params, audit_template['default_parameters'])
|
|
265
|
+
|
|
266
|
+
@decorators.attr(type='smoke')
|
|
267
|
+
@decorators.idempotent_id('d21eb4db-123c-460e-91a8-78d6a66e4259')
|
|
268
|
+
def test_show_audit_template_default_parameters_hidden_old_microversion(
|
|
269
|
+
self):
|
|
270
|
+
default_params = {'para1': 5.0}
|
|
271
|
+
_, body = self.create_audit_template(
|
|
272
|
+
goal=self.goal['uuid'],
|
|
273
|
+
strategy=self.strategy['uuid'],
|
|
274
|
+
default_parameters=default_params,
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
# Retrieve with old microversion — field must be absent
|
|
278
|
+
self.useFixture(api_microversion_fixture.APIMicroversionFixture(
|
|
279
|
+
optimize_microversion='1.6'))
|
|
280
|
+
_, audit_template = self.client.show_audit_template(body['uuid'])
|
|
281
|
+
self.assertNotIn('default_parameters', audit_template)
|
|
282
|
+
|
|
283
|
+
@decorators.attr(type='smoke')
|
|
284
|
+
@decorators.idempotent_id('48de7d05-0ca7-4037-9292-9b0cfa213533')
|
|
285
|
+
def test_update_audit_template_default_parameters(self):
|
|
286
|
+
_, body = self.create_audit_template(
|
|
287
|
+
goal=self.goal['uuid'],
|
|
288
|
+
strategy=self.strategy['uuid'],
|
|
289
|
+
default_parameters={'para1': 3.0},
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
new_params = {'para1': 8.0}
|
|
293
|
+
patch = [{'path': '/default_parameters', 'op': 'replace',
|
|
294
|
+
'value': new_params}]
|
|
295
|
+
self.client.update_audit_template(body['uuid'], patch)
|
|
296
|
+
|
|
297
|
+
_, updated = self.client.show_audit_template(body['uuid'])
|
|
298
|
+
self.assertEqual(new_params, updated['default_parameters'])
|
|
299
|
+
|
|
300
|
+
@decorators.attr(type='smoke')
|
|
301
|
+
@decorators.idempotent_id('f879e4f7-0b94-4015-9b8e-520346f2695e')
|
|
302
|
+
def test_create_audit_template_default_parameters_requires_strategy(self):
|
|
303
|
+
self.assertRaises(
|
|
304
|
+
exceptions.BadRequest,
|
|
305
|
+
self.client.create_audit_template,
|
|
306
|
+
goal=self.goal['uuid'],
|
|
307
|
+
default_parameters={'para1': 5.0},
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
@decorators.attr(type='smoke')
|
|
311
|
+
@decorators.idempotent_id('a3c1e8f2-7d4b-4f9e-bc02-1e5a6d8f3c07')
|
|
312
|
+
def test_create_audit_template_invalid_default_parameters_rejected(self):
|
|
313
|
+
self.assertRaises(
|
|
314
|
+
exceptions.BadRequest,
|
|
315
|
+
self.client.create_audit_template,
|
|
316
|
+
goal=self.goal['uuid'],
|
|
317
|
+
strategy=self.strategy['uuid'],
|
|
318
|
+
default_parameters={'para1': 5.0, 'fake_param': 'invalid'},
|
|
319
|
+
)
|
|
@@ -17,11 +17,14 @@ from oslo_utils import uuidutils
|
|
|
17
17
|
|
|
18
18
|
import functools
|
|
19
19
|
|
|
20
|
+
from tempest import config
|
|
20
21
|
from tempest.lib.common.utils import test_utils
|
|
21
22
|
from tempest.lib import decorators
|
|
22
23
|
|
|
23
24
|
from watcher_tempest_plugin.tests.client_functional.v1 import base
|
|
24
25
|
|
|
26
|
+
CONF = config.CONF
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
class ActionTests(base.TestCase):
|
|
27
30
|
"""Functional tests for action."""
|
|
@@ -43,8 +46,8 @@ class ActionTests(base.TestCase):
|
|
|
43
46
|
cls.audit_uuid = audit_output['UUID']
|
|
44
47
|
audit_created = test_utils.call_until_true(
|
|
45
48
|
func=functools.partial(cls.has_audit_created, cls.audit_uuid),
|
|
46
|
-
duration=
|
|
47
|
-
sleep_for=
|
|
49
|
+
duration=CONF.optimize.resource_timeout,
|
|
50
|
+
sleep_for=CONF.optimize.resource_check_interval)
|
|
48
51
|
if not audit_created:
|
|
49
52
|
raise Exception('Audit has not been succeeded')
|
|
50
53
|
|