watcher-tempest-plugin 3.8.0__tar.gz → 3.9.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.
Files changed (104) hide show
  1. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/AUTHORS +1 -0
  2. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/ChangeLog +12 -0
  3. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/PKG-INFO +3 -4
  4. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/requirements.txt +1 -1
  5. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/setup.cfg +1 -2
  6. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/config.py +41 -0
  7. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/infra_optim_clients.py +0 -22
  8. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/base.py +2 -2
  9. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_action.py +7 -4
  10. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_action_plan.py +11 -8
  11. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_audit.py +15 -10
  12. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action.py +5 -2
  13. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action_plan.py +7 -4
  14. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit.py +13 -10
  15. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/common/base.py +9 -6
  16. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/base.py +153 -51
  17. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_continuous_audit.py +12 -12
  18. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_data_model.py +9 -3
  19. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_actuator.py +4 -4
  20. watcher_tempest_plugin-3.9.0/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +195 -0
  21. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py +71 -2
  22. watcher_tempest_plugin-3.9.0/watcher_tempest_plugin/tests/scenario/test_execute_skipped_actions.py +667 -0
  23. watcher_tempest_plugin-3.9.0/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +171 -0
  24. watcher_tempest_plugin-3.9.0/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py +305 -0
  25. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py +76 -1
  26. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py +218 -36
  27. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/PKG-INFO +3 -4
  28. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/SOURCES.txt +1 -0
  29. watcher_tempest_plugin-3.9.0/watcher_tempest_plugin.egg-info/pbr.json +1 -0
  30. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/requires.txt +1 -1
  31. watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +0 -114
  32. watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +0 -91
  33. watcher_tempest_plugin-3.8.0/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py +0 -137
  34. watcher_tempest_plugin-3.8.0/watcher_tempest_plugin.egg-info/pbr.json +0 -1
  35. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/.coveragerc +0 -0
  36. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/.mailmap +0 -0
  37. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/.stestr.conf +0 -0
  38. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/.testr.conf +0 -0
  39. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/.zuul.yaml +0 -0
  40. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/CONTRIBUTING.rst +0 -0
  41. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/HACKING.rst +0 -0
  42. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/LICENSE +0 -0
  43. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/README.rst +0 -0
  44. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/doc/requirements.txt +0 -0
  45. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/doc/source/conf.py +0 -0
  46. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/doc/source/contributing.rst +0 -0
  47. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/doc/source/index.rst +0 -0
  48. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/doc/source/readme.rst +0 -0
  49. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/pyproject.toml +0 -0
  50. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/notes/.placeholder +0 -0
  51. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/notes/drop-py-2-7-eb1979587d237f5e.yaml +0 -0
  52. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/notes/drop-python38-support-eeb09a8bc0170ce2.yaml +0 -0
  53. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/notes/parametrize-promtool-write-url-path-3534f2b9.yaml +0 -0
  54. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/source/_static/.placeholder +0 -0
  55. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/source/_templates/.placeholder +0 -0
  56. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/source/conf.py +0 -0
  57. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/source/index.rst +0 -0
  58. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/releasenotes/source/unreleased.rst +0 -0
  59. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/setup.py +0 -0
  60. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/test-requirements.txt +0 -0
  61. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/tox.ini +0 -0
  62. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/__init__.py +0 -0
  63. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/plugin.py +0 -0
  64. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/__init__.py +0 -0
  65. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/base.py +0 -0
  66. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/infra_optim/__init__.py +0 -0
  67. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/infra_optim/v1/__init__.py +0 -0
  68. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/infra_optim/v1/json/__init__.py +0 -0
  69. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/infra_optim/v1/json/api_microversion_fixture.py +0 -0
  70. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/infra_optim/v1/json/client.py +0 -0
  71. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/metric/__init__.py +0 -0
  72. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/metric/prometheus_client.py +0 -0
  73. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/metric/v1/__init__.py +0 -0
  74. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/metric/v1/json/__init__.py +0 -0
  75. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/services/metric/v1/json/client.py +0 -0
  76. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/__init__.py +0 -0
  77. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/__init__.py +0 -0
  78. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/__init__.py +0 -0
  79. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py +0 -0
  80. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_audit_template.py +0 -0
  81. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_data_model.py +0 -0
  82. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_goal.py +0 -0
  83. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_scoring_engine.py +0 -0
  84. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_service.py +0 -0
  85. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/api/admin/test_strategy.py +0 -0
  86. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/__init__.py +0 -0
  87. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/__init__.py +0 -0
  88. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/base.py +0 -0
  89. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit_template.py +0 -0
  90. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_goal.py +0 -0
  91. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_scoring_engine.py +0 -0
  92. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_service.py +0 -0
  93. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/client_functional/v1/test_strategy.py +0 -0
  94. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/common/__init__.py +0 -0
  95. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/__init__.py +0 -0
  96. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +0 -0
  97. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +0 -0
  98. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py +0 -0
  99. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py +0 -0
  100. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin/utils.py +0 -0
  101. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/dependency_links.txt +0 -0
  102. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/entry_points.txt +0 -0
  103. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/not-zip-safe +0 -0
  104. {watcher_tempest_plugin-3.8.0 → watcher_tempest_plugin-3.9.0}/watcher_tempest_plugin.egg-info/top_level.txt +0 -0
@@ -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>
@@ -1,6 +1,18 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ 3.9.0
5
+ -----
6
+
7
+ * Handle multi-cell deployments in live-migration scenario tests
8
+ * Fix test\_data\_model\_with\_instances for environments with extra compute nodes
9
+ * Make test polling intervals and timeouts configurable
10
+ * Drop python 3.10
11
+ * Add comprehensive tests for action precondition
12
+ * Replace ExtendPlacementClient with tempest lib
13
+ * Add disk constraint validation to workload\_balance
14
+ * Add scenario tests for boot from volume instances
15
+
4
16
  3.8.0
5
17
  -----
6
18
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: watcher-tempest-plugin
3
- Version: 3.8.0
3
+ Version: 3.9.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.10
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>=27.0.0
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
@@ -5,5 +5,5 @@
5
5
  pbr>=3.1.1 # Apache-2.0
6
6
  oslo.log>=3.36.0 # Apache-2.0
7
7
  oslo.utils>=3.33.0 # Apache-2.0
8
- tempest>=27.0.0 # Apache-2.0
8
+ tempest>=41.0.0 # Apache-2.0
9
9
  os-traits>=0.15.0 # Apache-2.0
@@ -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.10
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
@@ -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,18 @@ 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
+ )
165
206
  ]
@@ -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)
@@ -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=300,
95
- sleep_for=5
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=30,
44
- sleep_for=.5
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=30,
152
- sleep_for=.5
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=30,
39
- sleep_for=.5
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=30,
64
- sleep_for=.5
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=30,
93
- sleep_for=.5
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=30,
125
- sleep_for=.5
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=10,
153
- sleep_for=.5
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=10,
170
- sleep_for=.5
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=5,
184
- sleep_for=1
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=300, sleep_for=10))
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=180, sleep_for=10),
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
@@ -432,8 +437,8 @@ class TestShowListAudit(base.BaseInfraOptimTest):
432
437
  self.assertTrue(test_utils.call_until_true(
433
438
  func=functools.partial(
434
439
  self.has_audit_finished, self.audit['uuid']),
435
- duration=30,
436
- sleep_for=.5
440
+ duration=CONF.optimize.resource_timeout,
441
+ sleep_for=CONF.optimize.resource_check_interval
437
442
  ))
438
443
 
439
444
  def assert_expected(self, expected, actual,
@@ -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=600,
47
- sleep_for=2)
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
 
@@ -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 ActionPlanTests(base.TestCase):
27
30
  """Functional tests for action plan."""
@@ -45,8 +48,8 @@ class ActionPlanTests(base.TestCase):
45
48
  cls.audit_uuid = audit_output['UUID']
46
49
  audit_created = test_utils.call_until_true(
47
50
  func=functools.partial(cls.has_audit_created, cls.audit_uuid),
48
- duration=600,
49
- sleep_for=2)
51
+ duration=CONF.optimize.resource_timeout,
52
+ sleep_for=CONF.optimize.resource_check_interval)
50
53
  if not audit_created:
51
54
  raise Exception('Audit has not been succeeded')
52
55
 
@@ -97,6 +100,6 @@ class ActionPlanTests(base.TestCase):
97
100
  self.assertTrue(test_utils.call_until_true(
98
101
  func=functools.partial(
99
102
  self.has_actionplan_succeeded, action_plan_uuid),
100
- duration=600,
101
- sleep_for=2
103
+ duration=CONF.optimize.resource_timeout,
104
+ sleep_for=CONF.optimize.resource_check_interval
102
105
  ))
@@ -18,11 +18,14 @@ from dateutil import tz
18
18
  import functools
19
19
 
20
20
  from oslo_utils import uuidutils
21
+ from tempest import config
21
22
  from tempest.lib.common.utils import test_utils
22
23
  from tempest.lib import decorators
23
24
 
24
25
  from watcher_tempest_plugin.tests.client_functional.v1 import base
25
26
 
27
+ CONF = config.CONF
28
+
26
29
 
27
30
  class AuditTests(base.TestCase):
28
31
  """Functional tests for audit."""
@@ -47,8 +50,8 @@ class AuditTests(base.TestCase):
47
50
  cls.audit_uuid = audit_output['UUID']
48
51
  audit_created = test_utils.call_until_true(
49
52
  func=functools.partial(cls.has_audit_created, cls.audit_uuid),
50
- duration=600,
51
- sleep_for=2)
53
+ duration=CONF.optimize.resource_timeout,
54
+ sleep_for=CONF.optimize.resource_check_interval)
52
55
  if not audit_created:
53
56
  raise Exception('Audit has not been succeeded')
54
57
 
@@ -134,8 +137,8 @@ class AuditTestsV12(AuditTestsV11):
134
137
  cls.audit_uuid = audit_output['UUID']
135
138
  audit_created = test_utils.call_until_true(
136
139
  func=functools.partial(cls.has_audit_created, cls.audit_uuid),
137
- duration=600,
138
- sleep_for=2)
140
+ duration=CONF.optimize.resource_timeout,
141
+ sleep_for=CONF.optimize.resource_check_interval)
139
142
  if not audit_created:
140
143
  raise Exception('Audit has not been succeeded')
141
144
 
@@ -166,8 +169,8 @@ class AuditActiveTests(base.TestCase):
166
169
  self.assertTrue(test_utils.call_until_true(
167
170
  func=functools.partial(
168
171
  self.has_audit_created, audit_uuid),
169
- duration=600,
170
- sleep_for=2
172
+ duration=CONF.optimize.resource_timeout,
173
+ sleep_for=CONF.optimize.resource_check_interval
171
174
  ))
172
175
  output = self.parse_show(
173
176
  self.watcher('actionplan list --audit %s' % audit_uuid))
@@ -188,8 +191,8 @@ class AuditActiveTests(base.TestCase):
188
191
  self.assertTrue(test_utils.call_until_true(
189
192
  func=functools.partial(
190
193
  self.has_audit_created, audit_uuid),
191
- duration=600,
192
- sleep_for=2
194
+ duration=CONF.optimize.resource_timeout,
195
+ sleep_for=CONF.optimize.resource_check_interval
193
196
  ))
194
197
  raw_output = self.watcher('audit delete %s' % audit_uuid)
195
198
  self.assertOutput('', raw_output)
@@ -207,8 +210,8 @@ class AuditActiveTests(base.TestCase):
207
210
  self.assertTrue(test_utils.call_until_true(
208
211
  func=functools.partial(
209
212
  self.has_audit_created, audit_uuid),
210
- duration=600,
211
- sleep_for=2
213
+ duration=CONF.optimize.resource_timeout,
214
+ sleep_for=CONF.optimize.resource_check_interval
212
215
  ))
213
216
  audit_state = self.parse_show_as_object(
214
217
  self.watcher('audit show %s' % audit_uuid))['State']
@@ -20,10 +20,13 @@ import functools
20
20
 
21
21
  from collections import abc
22
22
 
23
+ from tempest import config
23
24
  from tempest.lib.common.utils import data_utils
24
25
  from tempest.lib.common.utils import test_utils
25
26
  from tempest.lib import exceptions
26
27
 
28
+ CONF = config.CONF
29
+
27
30
 
28
31
  class FrozenEnumMeta(enum.EnumMeta):
29
32
  """Prevent creation of new attributes and behave like a mapping."""
@@ -207,8 +210,8 @@ class WatcherHelperMixin:
207
210
  test_utils.call_until_true(
208
211
  func=functools.partial(
209
212
  self.has_audit_finished, audit_uuid),
210
- duration=60,
211
- sleep_for=2
213
+ duration=CONF.optimize.resource_timeout,
214
+ sleep_for=CONF.optimize.resource_check_interval
212
215
  )
213
216
 
214
217
  def is_audit_idle(self, audit_uuid):
@@ -304,8 +307,8 @@ class WatcherHelperMixin:
304
307
 
305
308
  assert test_utils.call_until_true(
306
309
  func=functools.partial(self.has_audit_finished, audit_uuid),
307
- duration=30,
308
- sleep_for=.5
310
+ duration=CONF.optimize.resource_timeout,
311
+ sleep_for=CONF.optimize.resource_check_interval
309
312
  ), "Audit %s did not finish within expected time" % audit_uuid
310
313
 
311
314
  _, action_plans = self.client.list_action_plans(audit_uuid=audit_uuid)
@@ -332,8 +335,8 @@ class WatcherHelperMixin:
332
335
  test_utils.call_until_true(
333
336
  func=functools.partial(
334
337
  self.is_action_plan_idle, action_plan_uuid),
335
- duration=30,
336
- sleep_for=.5
338
+ duration=CONF.optimize.resource_timeout,
339
+ sleep_for=CONF.optimize.resource_check_interval
337
340
  )
338
341
 
339
342
  return resp