watcher-tempest-plugin 3.9.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.9.0 → watcher_tempest_plugin-3.10.0}/.zuul.yaml +15 -14
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/AUTHORS +1 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/ChangeLog +11 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/PKG-INFO +1 -1
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/config.py +7 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/json/client.py +8 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/prometheus_client.py +1 -1
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_audit.py +51 -1
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_audit_template.py +84 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/common/base.py +5 -2
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin/tests/scenario/test_execute_actuator.py +484 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/PKG-INFO +1 -1
- watcher_tempest_plugin-3.10.0/watcher_tempest_plugin.egg-info/pbr.json +1 -0
- watcher_tempest_plugin-3.9.0/watcher_tempest_plugin/tests/scenario/test_execute_actuator.py +0 -202
- watcher_tempest_plugin-3.9.0/watcher_tempest_plugin.egg-info/pbr.json +0 -1
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/.coveragerc +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/.mailmap +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/.stestr.conf +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/.testr.conf +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/CONTRIBUTING.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/HACKING.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/LICENSE +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/README.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/doc/requirements.txt +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/doc/source/conf.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/doc/source/contributing.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/doc/source/index.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/doc/source/readme.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/pyproject.toml +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/.placeholder +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/drop-py-2-7-eb1979587d237f5e.yaml +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/drop-python38-support-eeb09a8bc0170ce2.yaml +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/notes/parametrize-promtool-write-url-path-3534f2b9.yaml +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/_static/.placeholder +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/_templates/.placeholder +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/conf.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/index.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/releasenotes/source/unreleased.rst +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/requirements.txt +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/setup.cfg +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/setup.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/test-requirements.txt +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/tox.ini +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/infra_optim_clients.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/plugin.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/base.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/infra_optim/v1/json/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.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.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/v1/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/v1/json/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/services/metric/v1/json/client.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/base.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_action.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_action_plan.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_data_model.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_goal.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_scoring_engine.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_service.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/api/admin/test_strategy.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/base.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action_plan.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit_template.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_goal.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_scoring_engine.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_service.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/client_functional/v1/test_strategy.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/common/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/__init__.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/base.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_continuous_audit.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_data_model.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_skipped_actions.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/utils.py +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/SOURCES.txt +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/dependency_links.txt +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/entry_points.txt +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/not-zip-safe +0 -0
- {watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin.egg-info/requires.txt +0 -0
- {watcher_tempest_plugin-3.9.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
|
|
@@ -34,6 +34,7 @@ Tin Lam <tl3438@att.com>
|
|
|
34
34
|
Vieri <15050873171@163.com>
|
|
35
35
|
Vincent Françoise <Vincent.FRANCOISE@b-com.com>
|
|
36
36
|
Vu Cong Tuan <tuanvc@vn.fujitsu.com>
|
|
37
|
+
Winicius Allan <wdasilva@redhat.com>
|
|
37
38
|
Xing Zhang <angeiv.zhang@gmail.com>
|
|
38
39
|
Yumeng_Bao <yumeng_bao@yahoo.com>
|
|
39
40
|
avnish <avnish.pal@nectechnologies.in>
|
|
@@ -1,10 +1,21 @@
|
|
|
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
|
+
|
|
4
12
|
3.9.0
|
|
5
13
|
-----
|
|
6
14
|
|
|
15
|
+
* Add stable/2026.2 job
|
|
16
|
+
* Add tests for delete and shelve actions
|
|
7
17
|
* Handle multi-cell deployments in live-migration scenario tests
|
|
18
|
+
* Add API tests for audit template default\_parameters
|
|
8
19
|
* Fix test\_data\_model\_with\_instances for environments with extra compute nodes
|
|
9
20
|
* Make test polling intervals and timeouts configurable
|
|
10
21
|
* Drop python 3.10
|
{watcher_tempest_plugin-3.9.0 → watcher_tempest_plugin-3.10.0}/watcher_tempest_plugin/config.py
RENAMED
|
@@ -202,5 +202,12 @@ OptimizationGroup = [
|
|
|
202
202
|
"properly skips or fails actions when preconditions "
|
|
203
203
|
"are not met. Requires Watcher to support the action "
|
|
204
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."
|
|
205
212
|
)
|
|
206
213
|
]
|
|
@@ -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
|
|
@@ -423,6 +423,57 @@ class TestCreateUpdateDeleteAuditV14(base.BaseInfraOptimTest):
|
|
|
423
423
|
self.assertEqual(audit['state'], 'CANCELLED')
|
|
424
424
|
|
|
425
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
|
+
|
|
426
477
|
class TestShowListAudit(base.BaseInfraOptimTest):
|
|
427
478
|
"""Tests for audit."""
|
|
428
479
|
|
|
@@ -487,7 +538,6 @@ class TestShowListAudit(base.BaseInfraOptimTest):
|
|
|
487
538
|
|
|
488
539
|
@decorators.attr(type='smoke')
|
|
489
540
|
@decorators.idempotent_id('5175607c-f2df-4df6-9168-45c789b4a6ea')
|
|
490
|
-
@decorators.skip_because(bug="2134046")
|
|
491
541
|
def test_list_with_limit(self):
|
|
492
542
|
# We create 3 extra audits to exceed the limit we fix
|
|
493
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
|
+
)
|
|
@@ -115,7 +115,8 @@ class WatcherHelperMixin:
|
|
|
115
115
|
# ### AUDIT TEMPLATES ### #
|
|
116
116
|
|
|
117
117
|
def create_audit_template(self, goal, name=None, description=None,
|
|
118
|
-
strategy=None, scope=None
|
|
118
|
+
strategy=None, scope=None,
|
|
119
|
+
default_parameters=None):
|
|
119
120
|
"""Wrapper utility for creating a test audit template
|
|
120
121
|
|
|
121
122
|
:param goal: Goal UUID or name related to the audit template.
|
|
@@ -123,13 +124,15 @@ class WatcherHelperMixin:
|
|
|
123
124
|
:param description: The description of the audit template.
|
|
124
125
|
:param strategy: Strategy UUID or name related to the audit template.
|
|
125
126
|
:param scope: Audit scope
|
|
127
|
+
:param default_parameters: Default strategy parameters dict
|
|
126
128
|
:return: A tuple with The HTTP response and its body
|
|
127
129
|
"""
|
|
128
130
|
description = description or data_utils.rand_name(
|
|
129
131
|
'test-audit_template')
|
|
130
132
|
resp, body = self.client.create_audit_template(
|
|
131
133
|
name=name, description=description, goal=goal,
|
|
132
|
-
strategy=strategy, scope=scope
|
|
134
|
+
strategy=strategy, scope=scope,
|
|
135
|
+
default_parameters=default_parameters)
|
|
133
136
|
|
|
134
137
|
self.addCleanup(
|
|
135
138
|
test_utils.call_and_ignore_notfound_exc,
|