watcher-tempest-plugin 3.3.0__tar.gz → 3.4.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 (94) hide show
  1. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/.zuul.yaml +2 -7
  2. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/AUTHORS +6 -0
  3. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/CONTRIBUTING.rst +4 -4
  4. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/ChangeLog +22 -0
  5. {watcher_tempest_plugin-3.3.0/watcher_tempest_plugin.egg-info → watcher_tempest_plugin-3.4.0}/PKG-INFO +15 -15
  6. watcher_tempest_plugin-3.4.0/README.rst +19 -0
  7. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/doc/source/conf.py +0 -0
  8. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/doc/source/readme.rst +24 -12
  9. watcher_tempest_plugin-3.4.0/releasenotes/notes/drop-python38-support-eeb09a8bc0170ce2.yaml +6 -0
  10. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/requirements.txt +1 -1
  11. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/setup.cfg +5 -17
  12. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/tox.ini +2 -4
  13. watcher_tempest_plugin-3.4.0/watcher_tempest_plugin/config.py +112 -0
  14. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/infra_optim_clients.py +17 -0
  15. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/plugin.py +8 -1
  16. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/base.py +110 -2
  17. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/infra_optim/v1/json/client.py +19 -0
  18. watcher_tempest_plugin-3.4.0/watcher_tempest_plugin/services/metric/prometheus_client.py +196 -0
  19. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/base.py +237 -18
  20. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +4 -1
  21. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +3 -0
  22. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py +1 -1
  23. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_strategies.py +32 -18
  24. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +9 -13
  25. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_workload_balancing.py +3 -1
  26. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py +3 -0
  27. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0/watcher_tempest_plugin.egg-info}/PKG-INFO +15 -15
  28. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin.egg-info/SOURCES.txt +2 -3
  29. watcher_tempest_plugin-3.4.0/watcher_tempest_plugin.egg-info/pbr.json +1 -0
  30. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin.egg-info/requires.txt +1 -1
  31. watcher_tempest_plugin-3.3.0/README.rst +0 -20
  32. watcher_tempest_plugin-3.3.0/babel.cfg +0 -2
  33. watcher_tempest_plugin-3.3.0/watcher_tempest_plugin/README.rst +0 -170
  34. watcher_tempest_plugin-3.3.0/watcher_tempest_plugin/config.py +0 -23
  35. watcher_tempest_plugin-3.3.0/watcher_tempest_plugin/tests/scenario/manager.py +0 -240
  36. watcher_tempest_plugin-3.3.0/watcher_tempest_plugin.egg-info/pbr.json +0 -1
  37. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/.coveragerc +0 -0
  38. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/.mailmap +0 -0
  39. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/.stestr.conf +0 -0
  40. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/.testr.conf +0 -0
  41. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/HACKING.rst +0 -0
  42. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/LICENSE +0 -0
  43. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/doc/requirements.txt +0 -0
  44. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/doc/source/contributing.rst +0 -0
  45. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/doc/source/index.rst +0 -0
  46. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/notes/.placeholder +0 -0
  47. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/notes/drop-py-2-7-eb1979587d237f5e.yaml +0 -0
  48. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/source/_static/.placeholder +0 -0
  49. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/source/_templates/.placeholder +0 -0
  50. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/source/conf.py +0 -0
  51. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/source/index.rst +0 -0
  52. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/releasenotes/source/unreleased.rst +0 -0
  53. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/setup.py +0 -0
  54. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/test-requirements.txt +0 -0
  55. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/__init__.py +0 -0
  56. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/__init__.py +0 -0
  57. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/infra_optim/__init__.py +0 -0
  58. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/infra_optim/v1/__init__.py +0 -0
  59. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/infra_optim/v1/json/__init__.py +0 -0
  60. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/metric/__init__.py +0 -0
  61. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/metric/v1/__init__.py +0 -0
  62. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/metric/v1/json/__init__.py +0 -0
  63. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/services/metric/v1/json/client.py +0 -0
  64. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/__init__.py +0 -0
  65. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/__init__.py +0 -0
  66. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/__init__.py +0 -0
  67. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/base.py +0 -0
  68. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_action.py +0 -0
  69. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_action_plan.py +0 -0
  70. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_api_discovery.py +0 -0
  71. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_audit.py +0 -0
  72. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_audit_template.py +0 -0
  73. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_goal.py +0 -0
  74. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_scoring_engine.py +0 -0
  75. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_service.py +0 -0
  76. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/api/admin/test_strategy.py +0 -0
  77. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/__init__.py +0 -0
  78. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/__init__.py +0 -0
  79. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/base.py +0 -0
  80. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action.py +0 -0
  81. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_action_plan.py +0 -0
  82. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit.py +0 -0
  83. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_audit_template.py +0 -0
  84. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_goal.py +0 -0
  85. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_scoring_engine.py +0 -0
  86. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_service.py +0 -0
  87. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/client_functional/v1/test_strategy.py +0 -0
  88. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/__init__.py +0 -0
  89. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_actuator.py +0 -0
  90. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +0 -0
  91. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin.egg-info/dependency_links.txt +0 -0
  92. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin.egg-info/entry_points.txt +0 -0
  93. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin.egg-info/not-zip-safe +0 -0
  94. {watcher_tempest_plugin-3.3.0 → watcher_tempest_plugin-3.4.0}/watcher_tempest_plugin.egg-info/top_level.txt +0 -0
@@ -3,6 +3,8 @@
3
3
  templates:
4
4
  - check-requirements
5
5
  - tempest-plugin-jobs
6
+ - publish-openstack-docs-pti
7
+ - release-notes-jobs-python3
6
8
  check:
7
9
  jobs:
8
10
  - watcherclient-tempest-functional
@@ -12,7 +14,6 @@
12
14
  - watcher-tempest-functional-2024-2
13
15
  - watcher-tempest-functional-2024-1
14
16
  - watcher-tempest-functional-2023-2
15
- - watcher-tempest-functional-2023-1
16
17
  gate:
17
18
  jobs:
18
19
  - watcher-tempest-functional
@@ -34,9 +35,3 @@
34
35
  parent: watcher-tempest-functional
35
36
  nodeset: openstack-single-node-jammy
36
37
  override-checkout: stable/2023.2
37
-
38
- - job:
39
- name: watcher-tempest-functional-2023-1
40
- parent: watcher-tempest-functional
41
- nodeset: openstack-single-node-jammy
42
- override-checkout: stable/2023.1
@@ -2,9 +2,11 @@
2
2
  Alexander Chadin <a.chadin@servionica.ru>
3
3
  Andrea Frittoli <andrea.frittoli@gmail.com>
4
4
  Andreas Jaeger <aj@suse.com>
5
+ Chandan Kumar (raukadah) <chkumar@redhat.com>
5
6
  Chandan Kumar <chkumar@redhat.com>
6
7
  Dantali0n <info@dantalion.nl>
7
8
  David TARDIVEL <David.TARDIVEL@b-com.com>
9
+ Douglas Viroel <viroel@gmail.com>
8
10
  Drew Thorstensen <thorst@us.ibm.com>
9
11
  Ghanshyam Mann <gmann@ghanshyammann.com>
10
12
  Gábor Antal <antal@inf.u-szeged.hu>
@@ -13,12 +15,15 @@ Hidekazu Nakamura <hid-nakamura@vf.jp.nec.com>
13
15
  Jaewoo Park <jp655p@att.com>
14
16
  Ken'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>
15
17
  Larry Rensing <lr699s@att.com>
18
+ Martin Kopec <mkopec@redhat.com>
16
19
  Michael Gugino <michael.gugino@walmart.com>
17
20
  Ngo Quoc Cuong <cuongnq@vn.fujitsu.com>
18
21
  Nguyen Hai <nguyentrihai93@gmail.com>
19
22
  Nishant Kumar <nishant.e.kumar@ericsson.com>
23
+ Roman Popelka <rpopelka@redhat.com>
20
24
  ShangXiao <shangxiaobj@inspur.com>
21
25
  Sumit Jamgade <sjamgade@suse.com>
26
+ Takashi Kajinami <kajinamit@oss.nttdata.com>
22
27
  Tin Lam <tl3438@att.com>
23
28
  Vieri <15050873171@163.com>
24
29
  Vincent Françoise <Vincent.FRANCOISE@b-com.com>
@@ -36,6 +41,7 @@ licanwei <li.canwei2@zte.com.cn>
36
41
  limin.lc <limin.lc@inspur.com>
37
42
  liyou01 <liyou01@inspur.com>
38
43
  maaoyu <maaoyu@inspur.com>
44
+ malinga tembo <mtembo@redhat.com>
39
45
  qinchunhua <qin.chunhua@zte.com.cn>
40
46
  qingszhao <zhao.daqing@99cloud.net>
41
47
  rajat29 <rajat.sharma@nectechnologies.in>
@@ -1,17 +1,17 @@
1
1
  If you would like to contribute to the development of OpenStack, you must
2
- follow the steps in this page:
2
+ follow the steps on this page:
3
3
 
4
- https://docs.openstack.org/infra/manual/developers.html
4
+ https://docs.opendev.org/opendev/infra-manual/latest/developers.html
5
5
 
6
6
  If you already have a good understanding of how the system works and your
7
7
  OpenStack accounts are set up, you can skip to the development workflow
8
8
  section of this documentation to learn how changes to OpenStack should be
9
9
  submitted for review via the Gerrit tool:
10
10
 
11
- https://docs.openstack.org/infra/manual/developers.html#development-workflow
11
+ https://docs.opendev.org/opendev/infra-manual/latest/developers.html#development-workflow
12
12
 
13
13
  Pull requests submitted through GitHub will be ignored.
14
14
 
15
15
  Bugs should be filed on Launchpad, not GitHub:
16
16
 
17
- https://bugs.launchpad.net/Tempest plugin watcher-tempest-plugin
17
+ https://bugs.launchpad.net/watcher-tempest-plugin
@@ -1,10 +1,32 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ 3.4.0
5
+ -----
6
+
7
+ * Move make\_host\_statistic to the correct strategy
8
+ * Small improvements to prometheus\_client and zone migration test
9
+ * Add a check for instances in the compute model
10
+ * Add support to run promtool in a podified deployment
11
+ * Add support for prometheus datasource in scenario tests
12
+ * tox: Drop envdir
13
+ * Add new config option optimize.datasource
14
+ * Drop bandit B320 profile to fix pep8 job
15
+ * Update documentation and add a job to publish it
16
+ * Remove stable/2023.1 job from master gate
17
+ * Drop translation sections
18
+ * Support py3.12 and drop py3.8
19
+ * Remove scenario manager
20
+ * Remove create\_volume & create\_volume\_type
21
+ * Remove create\_server method
22
+ * Remove \_create\_port and create\_keypair methods
23
+ * Bump tempest minimal version to 27.0.0 or higher
24
+
4
25
  3.3.0
5
26
  -----
6
27
 
7
28
  * Add stable/2024.2 jobs on master gate
29
+ * Drop unnecessary 'x' bit from doc config file
8
30
 
9
31
  3.2.0
10
32
  -----
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: watcher-tempest-plugin
3
- Version: 3.3.0
3
+ Version: 3.4.0
4
4
  Summary: Tempest plugin watcher-tempest-plugin
5
5
  Home-page: https://docs.openstack.org/watcher/latest/
6
6
  Author: OpenStack
@@ -14,34 +14,34 @@ 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.6
18
- Classifier: Programming Language :: Python :: 3.7
19
- Requires-Python: >=3.6
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Requires-Python: >=3.9
20
22
  License-File: LICENSE
21
23
  Requires-Dist: pbr>=3.1.1
22
24
  Requires-Dist: oslo.log>=3.36.0
23
25
  Requires-Dist: oslo.utils>=3.33.0
24
- Requires-Dist: tempest>=17.1.0
26
+ Requires-Dist: tempest>=27.0.0
25
27
  Requires-Dist: os-traits>=0.15.0
26
28
 
27
29
  ======================
28
30
  watcher-tempest-plugin
29
31
  ======================
30
32
 
31
- Description
33
+ This repository contains a `Tempest`_ `test plugin`_ to verify the
34
+ functionality of the `Watcher`_ service.
32
35
 
33
- Please fill here a long description which must be at least 3 lines wrapped on
34
- 80 cols, so that distribution package maintainers can use it in their packages.
35
- Note that this is a hard requirement.
36
+ See the following docs to learn more:
36
37
 
37
38
  * Free software: Apache license
38
- * Documentation: https://docs.openstack.org/watcher/latest/ plugin watcher-tempest-plugin
39
- * Release notes: https://docs.openstack.org/releasenotes/watcher/ plugin watcher-tempest-plugin
39
+ * Documentation: https://docs.openstack.org/watcher-tempest-plugin/latest/
40
+ * Release notes: https://docs.openstack.org/releasenotes/watcher-tempest-plugin/
40
41
  * Source: https://opendev.org/openstack/watcher-tempest-plugin
41
42
  * Bugs: https://bugs.launchpad.net/watcher plugin watcher-tempest-plugin
42
43
 
43
- Features
44
- --------
45
-
46
- * TODO
44
+ .. _Tempest: https://docs.openstack.org/tempest
45
+ .. _test plugin: https://docs.openstack.org/tempest/latest/plugin.html
46
+ .. _Watcher: https://docs.openstack.org/watcher/latest/
47
47
 
@@ -0,0 +1,19 @@
1
+ ======================
2
+ watcher-tempest-plugin
3
+ ======================
4
+
5
+ This repository contains a `Tempest`_ `test plugin`_ to verify the
6
+ functionality of the `Watcher`_ service.
7
+
8
+ See the following docs to learn more:
9
+
10
+ * Free software: Apache license
11
+ * Documentation: https://docs.openstack.org/watcher-tempest-plugin/latest/
12
+ * Release notes: https://docs.openstack.org/releasenotes/watcher-tempest-plugin/
13
+ * Source: https://opendev.org/openstack/watcher-tempest-plugin
14
+ * Bugs: https://bugs.launchpad.net/watcher plugin watcher-tempest-plugin
15
+
16
+ .. _Tempest: https://docs.openstack.org/tempest
17
+ .. _test plugin: https://docs.openstack.org/tempest/latest/plugin.html
18
+ .. _Watcher: https://docs.openstack.org/watcher/latest/
19
+
@@ -20,14 +20,15 @@ Tempest installation
20
20
 
21
21
  To install Tempest you can issue the following commands::
22
22
 
23
- $ git clone https://github.com/openstack/tempest/
23
+ $ git clone https://opendev.org/openstack/tempest
24
24
  $ cd tempest/
25
25
  $ pip install .
26
26
 
27
- The folder you are into now will be called ``<TEMPEST_DIR>`` from now onwards.
27
+ The folder's path you are now in will be called ``<TEMPEST_DIR>`` from now
28
+ onwards.
28
29
 
29
- Please note that although it is fully working outside a virtual environment, it
30
- is recommended to install within a `venv`.
30
+ Please note that although it is fully working outside a `virtual environment`_,
31
+ it is recommended to install within a `venv`.
31
32
 
32
33
 
33
34
  Watcher Tempest testing setup
@@ -38,7 +39,7 @@ following command::
38
39
 
39
40
  $ pip install -e <WATCHER_SRC_DIR>
40
41
 
41
- Then setup a local working environment (here ``watcher-cloud``) for running
42
+ Then set up a local working environment (here ``watcher-cloud``) for running
42
43
  Tempest for Watcher which shall contain the configuration for your OpenStack
43
44
  integration platform.
44
45
 
@@ -58,7 +59,7 @@ issue the following commands::
58
59
  $ cd <TEMPEST_DIR>/watcher-cloud/etc
59
60
  $ cp tempest.conf.sample tempest.conf
60
61
 
61
- At this point you need to edit the ``watcher-cloud/etc/tempest.conf``
62
+ At this point, you need to edit the ``watcher-cloud/etc/tempest.conf``
62
63
  file as described in the `Tempest configuration guide`_.
63
64
  Shown below is a minimal configuration you need to set within your
64
65
  ``tempest.conf`` configuration file which can get you started.
@@ -85,8 +86,8 @@ You now have the minimum configuration for running Watcher Tempest tests on a
85
86
  single node.
86
87
 
87
88
  Since deploying Watcher with only a single compute node is not very useful, a
88
- few more configuration have to be set in your ``tempest.conf`` file in order to
89
- enable the execution of multi-node scenarios::
89
+ few more configurations have to be set in your ``tempest.conf`` file in order
90
+ to enable the execution of multi-node scenarios::
90
91
 
91
92
  [compute]
92
93
  # To indicate Tempest test that you have provided enough compute nodes
@@ -117,13 +118,13 @@ To run only these tests in Tempest, you can then issue these commands::
117
118
 
118
119
  $ tempest run --config-file watcher-cloud/etc/tempest.conf --regex watcher_tempest_plugin
119
120
 
120
- Or alternatively the following commands if you are::
121
+ Alternatively, the following commands if you are in the Tempest directory::
121
122
 
122
123
  $ cd <TEMPEST_DIR>/watcher-cloud
123
124
  $ tempest run --regex watcher_tempest_plugin
124
125
 
125
- To run a single test case, go to Tempest directory, then run with test case
126
- name, e.g.::
126
+ To run a single test case, go to the Tempest directory, then run with the test
127
+ case name, e.g.::
127
128
 
128
129
  $ cd <TEMPEST_DIR>
129
130
  $ tempest run --config-file watcher-cloud/etc/tempest.conf --regex \
@@ -136,9 +137,20 @@ before you can do so, you need to follow the Tempest explanation on running
136
137
  $ export TEMPEST_CONFIG_DIR=<TEMPEST_DIR>/watcher-cloud/etc/
137
138
  $ tox -eall-plugin watcher
138
139
 
139
- .. _tox with plugins: https://docs.openstack.org/tempest/latest/plugin.html#notes-for-using-plugins-with-virtualenvs
140
+ .. _tox with plugins: https://docs.openstack.org/tempest/latest/plugins/plugin.html#notes-for-using-plugins-with-virtualenvs
140
141
 
141
142
  And, to run a specific test::
142
143
 
143
144
  $ export TEMPEST_CONFIG_DIR=<TEMPEST_DIR>/watcher-cloud/etc/
144
145
  $ tox -eall-plugin watcher_tempest_plugin.tests.api.admin.test_audit_template.TestCreateDeleteAuditTemplate.test_create_audit_template
146
+
147
+ Watcherclient Tempest tests execution
148
+ -------------------------------------
149
+
150
+ To run Watcherclient functional tests you need to execute ``tempest run`` command::
151
+
152
+ $ tempest run --regex watcher_tempest_plugin.tests.client_functional
153
+
154
+ You can run specified test(s) by using a regular expression::
155
+
156
+ $ tempest run --regex watcher_tempest_plugin.tests.client_functional.v1.test_action.ActionTests.test_action_list
@@ -0,0 +1,6 @@
1
+ ---
2
+ upgrade:
3
+ - |
4
+ Python 3.8 support has been dropped. Last release of
5
+ watcher-tempest-plugin to support python 3.8 is 3.2.0.
6
+ The minimum version of Python now supported is Python 3.9.
@@ -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>=17.1.0 # Apache-2.0
8
+ tempest>=27.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.6
9
+ python_requires = >=3.9
10
10
  classifier =
11
11
  Environment :: OpenStack
12
12
  Intended Audience :: Information Technology
@@ -17,27 +17,15 @@ 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.6
21
- Programming Language :: Python :: 3.7
20
+ Programming Language :: Python :: 3.9
21
+ Programming Language :: Python :: 3.10
22
+ Programming Language :: Python :: 3.11
23
+ Programming Language :: Python :: 3.12
22
24
 
23
25
  [files]
24
26
  packages =
25
27
  watcher_tempest_plugin
26
28
 
27
- [compile_catalog]
28
- directory = watcher-tempest-plugin/locale
29
- domain = watcher-tempest-plugin
30
-
31
- [update_catalog]
32
- domain = watcher-tempest-plugin
33
- output_dir = watcher-tempest-plugin/locale
34
- input_file = watcher-tempest-plugin/locale/watcher-tempest-plugin.pot
35
-
36
- [extract_messages]
37
- keywords = _ gettext ngettext l_ lazy_gettext
38
- mapping_file = babel.cfg
39
- output_file = watcher-tempest-plugin/locale/watcher-tempest-plugin.pot
40
-
41
29
  [entry_points]
42
30
  tempest.test_plugins =
43
31
  watcher_tests = watcher_tempest_plugin.plugin:WatcherTempestPlugin
@@ -9,7 +9,6 @@ basepython = python3
9
9
  usedevelop = True
10
10
  install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
11
11
  setenv =
12
- VIRTUAL_ENV={envdir}
13
12
  PYTHONWARNINGS=default::DeprecationWarning
14
13
  deps =
15
14
  -r{toxinidir}/test-requirements.txt
@@ -19,7 +18,7 @@ commands = stestr run --slowest {posargs}
19
18
  commands =
20
19
  doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
21
20
  flake8
22
- bandit -r watcher_tempest_plugin -x tests -n5 -ll -s B320
21
+ bandit -r watcher_tempest_plugin -x tests -n5 -ll
23
22
 
24
23
  [testenv:cover]
25
24
  setenv =
@@ -41,7 +40,6 @@ deps =
41
40
  commands = sphinx-build -W -b html doc/source doc/build/html
42
41
 
43
42
  [testenv:pdf-docs]
44
- envdir = {toxworkdir}/docs
45
43
  deps = {[testenv:docs]deps}
46
44
  allowlist_externals =
47
45
  rm
@@ -60,7 +58,7 @@ commands = oslo_debug_helper {posargs}
60
58
 
61
59
  [testenv:bandit]
62
60
  deps = -r{toxinidir}/test-requirements.txt
63
- commands = bandit -r watcher_tempest_plugin -x tests -n5 -ll -s B320
61
+ commands = bandit -r watcher_tempest_plugin -x tests -n5 -ll
64
62
 
65
63
  show-source = True
66
64
  ignore = E123,E125
@@ -0,0 +1,112 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # Copyright (c) 2016 b<>com
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ from oslo_config import cfg
18
+
19
+
20
+ service_option = cfg.BoolOpt("watcher",
21
+ default=True,
22
+ help="Whether or not watcher is expected to be "
23
+ "available")
24
+
25
+ optimization_group = cfg.OptGroup(name="optimize",
26
+ title="Watcher Service Options")
27
+
28
+ OptimizationGroup = [
29
+ cfg.StrOpt(
30
+ "datasource",
31
+ default="gnocchi",
32
+ choices=["gnocchi", "prometheus", ""],
33
+ help="Name of the data source used with the Watcher Service. "
34
+ "Tempest will retrieve and add metrics from/to this data "
35
+ "source when running Strategy tests. When running "
36
+ "tests that do not require instance or host metrics, "
37
+ "you can define this option to an empty string."),
38
+ cfg.StrOpt(
39
+ "openstack_type",
40
+ default="devstack",
41
+ choices=["devstack", "podified"],
42
+ help="Type of OpenStack deployment.",
43
+ ),
44
+ # Proxy host configuration
45
+ cfg.StrOpt(
46
+ "proxy_host_address",
47
+ default="",
48
+ help="A proxy host to run extra commands for some datasources.",
49
+ ),
50
+ cfg.StrOpt(
51
+ "proxy_host_user",
52
+ default="",
53
+ help="User of the proxy host to run extra commands for "
54
+ "some datasources.",
55
+ ),
56
+ cfg.StrOpt(
57
+ "proxy_host_pkey",
58
+ default="",
59
+ help="Path to a private key to access the proxy host.",
60
+ ),
61
+ cfg.StrOpt(
62
+ "proxy_host_pkey_type",
63
+ default="rsa",
64
+ help="Private key type to be used to access the proxy host.",
65
+ ),
66
+ # Prometheus datasource configuration
67
+ cfg.StrOpt(
68
+ "prometheus_host",
69
+ default="127.0.0.1",
70
+ help="The hostname or IP address for the prometheus server.",
71
+ ),
72
+ cfg.StrOpt(
73
+ "prometheus_port",
74
+ default="9090",
75
+ help="The port number used by the prometheus server.",
76
+ ),
77
+ cfg.StrOpt(
78
+ "prometheus_promtool",
79
+ default="promtool",
80
+ help="The promtool binary path in the host.",
81
+ ),
82
+ cfg.BoolOpt(
83
+ "prometheus_ssl_enabled",
84
+ default=False,
85
+ help="Whether or not SSL is enabled in prometheus server.",
86
+ ),
87
+ cfg.StrOpt(
88
+ "prometheus_ssl_cert_dir",
89
+ default="",
90
+ help="Path to directory that constains certificates needed to "
91
+ "interact with the Prometheus server.",
92
+ ),
93
+ cfg.StrOpt(
94
+ "prometheus_fqdn_label",
95
+ default="fqdn",
96
+ help="The label that Prometheus uses to store the fqdn of "
97
+ "exporters.",
98
+ ),
99
+ # Podified control plane configuration
100
+ cfg.StrOpt(
101
+ "podified_kubeconfig_path",
102
+ default="",
103
+ help="Path to a kubeconfig file, to run 'oc' commands in a "
104
+ "podified control plane environment."
105
+ ),
106
+ cfg.StrOpt(
107
+ "podified_namespace",
108
+ default="openstack",
109
+ help="Namespace where OpenStack is deployed in a podified "
110
+ "control plane environment."
111
+ ),
112
+ ]
@@ -24,6 +24,7 @@ from tempest.lib.common import rest_client
24
24
  from tempest.lib.services.placement import placement_client
25
25
 
26
26
  from watcher_tempest_plugin.services.infra_optim.v1.json import client as ioc
27
+ from watcher_tempest_plugin.services.metric import prometheus_client as pc
27
28
  from watcher_tempest_plugin.services.metric.v1.json import client as gc
28
29
 
29
30
  CONF = config.CONF
@@ -39,6 +40,22 @@ class BaseManager(clients.Manager, metaclass=abc.ABCMeta):
39
40
  self.auth_provider, 'metric', CONF.identity.region)
40
41
  self.placement_client = ExtendPlacementClient(
41
42
  self.auth_provider, 'placement', CONF.identity.region)
43
+ prom_ssl = "s" if CONF.optimize.prometheus_ssl_enabled else ""
44
+ self.prometheus_client = pc.PromtoolClient(
45
+ "http{}://{}:{}".format(prom_ssl,
46
+ CONF.optimize.prometheus_host,
47
+ CONF.optimize.prometheus_port),
48
+ promtool_path=CONF.optimize.prometheus_promtool,
49
+ openstack_type=CONF.optimize.openstack_type,
50
+ proxy_host_address=CONF.optimize.proxy_host_address,
51
+ proxy_host_user=CONF.optimize.proxy_host_user,
52
+ proxy_host_pkey=CONF.optimize.proxy_host_pkey,
53
+ proxy_host_pkey_type=CONF.optimize.proxy_host_pkey_type,
54
+ podified_ns=CONF.optimize.podified_namespace,
55
+ podified_kubeconfig=CONF.optimize.podified_kubeconfig_path,
56
+ prometheus_ssl_cert=CONF.optimize.prometheus_ssl_cert_dir,
57
+ prometheus_fqdn_label=CONF.optimize.prometheus_fqdn_label,
58
+ )
42
59
 
43
60
 
44
61
  class AdminManager(BaseManager):
@@ -30,5 +30,12 @@ class WatcherTempestPlugin(plugins.TempestPlugin):
30
30
  conf.register_opt(watcher_config.service_option,
31
31
  group='service_available')
32
32
 
33
+ conf.register_group(watcher_config.optimization_group)
34
+ conf.register_opts(watcher_config.OptimizationGroup,
35
+ watcher_config.optimization_group)
36
+
33
37
  def get_opt_lists(self):
34
- return [('service_available', [watcher_config.service_option])]
38
+ return [('service_available', [watcher_config.service_option]),
39
+ (watcher_config.optimization_group.name,
40
+ watcher_config.OptimizationGroup)
41
+ ]
@@ -15,11 +15,19 @@
15
15
  # limitations under the License.
16
16
 
17
17
  import abc
18
+ import base64
18
19
  import functools
20
+ import subprocess
19
21
 
20
22
  import urllib.parse as urlparse
21
23
 
24
+ from oslo_log import log
25
+ from tempest import config
22
26
  from tempest.lib.common import rest_client
27
+ from tempest.lib.common import ssh
28
+
29
+ CONF = config.CONF
30
+ LOG = log.getLogger(__name__)
23
31
 
24
32
 
25
33
  def handle_errors(f):
@@ -157,7 +165,7 @@ class BaseClient(rest_client.RestClient, metaclass=abc.ABCMeta):
157
165
 
158
166
  :param resource: The name of the REST resource, e.g., 'audits'.
159
167
  :param uuid: The unique identifier of an object in UUID format.
160
- :return: A tuple with the server response and the response body.
168
+ :returns: A tuple with the server response and the response body.
161
169
  """
162
170
 
163
171
  uri = self._get_uri(resource, uuid)
@@ -171,7 +179,7 @@ class BaseClient(rest_client.RestClient, metaclass=abc.ABCMeta):
171
179
 
172
180
  :param resource: The name of the REST resource, e.g., 'audits'.
173
181
  :param uuid: The unique identifier of an object in UUID format.
174
- :return: A tuple with the server response and the serialized patched
182
+ :returns: A tuple with the server response and the serialized patched
175
183
  object.
176
184
  """
177
185
 
@@ -207,3 +215,103 @@ class BaseClient(rest_client.RestClient, metaclass=abc.ABCMeta):
207
215
  resp, body = self.put(uri, body=put_body)
208
216
  self.expected_success(202, int(resp['status']))
209
217
  return resp, body
218
+
219
+
220
+ class BaseCmdClient(metaclass=abc.ABCMeta):
221
+
222
+ @abc.abstractmethod
223
+ def exec_cmd(self, cmd, input_data=None, timeout=None):
224
+ """Execute a command with an optional input data.
225
+
226
+ :param cmd: command to be execute, which can be a string
227
+ or a sequence of arguments.
228
+ :param input_data: data to be sent to process stdin
229
+ :param timeout: communication timeout in seconds
230
+ :return: output written to stdout.
231
+ :raises: Exception when command fails.
232
+ """
233
+ pass
234
+
235
+
236
+ class SubProcessCmdClient(BaseCmdClient):
237
+ """Command execution client based on subprocess"""
238
+
239
+ def exec_cmd(self, cmd, input_data=None, timeout=None):
240
+ """Execute a command with an optional input data.
241
+
242
+ :param cmd: command to be execute, which can be a string
243
+ or a sequence of arguments.
244
+ :param input_data: data to be sent to process stdin
245
+ :param timeout: communication timeout in seconds
246
+ :return: output written to stdout.
247
+ :raises: Exception when command fails.
248
+ """
249
+ LOG.debug(f"Executing command '{cmd}' with input data '{input_data}'")
250
+ sp = subprocess.Popen(cmd,
251
+ stdout=subprocess.PIPE,
252
+ stdin=subprocess.PIPE,
253
+ stderr=subprocess.PIPE, text=True)
254
+ out, err = sp.communicate(input=input_data, timeout=timeout)
255
+
256
+ if len(err) > 1:
257
+ raise Exception(f"Subprocess command failed with: {err}")
258
+
259
+ return out
260
+
261
+
262
+ class SshCmdClient(BaseCmdClient, ssh.Client):
263
+
264
+ def __init__(self, host, username, password=None, timeout=300, pkey=None,
265
+ channel_timeout=10, look_for_keys=True, key_filename=None,
266
+ port=22, pkey_type='rsa'):
267
+
268
+ # Prefix to be always include in all commands
269
+ self._cmd_prefix = ""
270
+
271
+ super(SshCmdClient, self).__init__(
272
+ host=host, username=username, password=password, timeout=timeout,
273
+ pkey=pkey, channel_timeout=channel_timeout,
274
+ look_for_keys=look_for_keys, key_filename=key_filename, port=port,
275
+ ssh_key_type=pkey_type)
276
+
277
+ @property
278
+ def cmd_prefix(self):
279
+ return self._cmd_prefix
280
+
281
+ @cmd_prefix.setter
282
+ def cmd_prefix(self, value):
283
+ self._cmd_prefix = value
284
+
285
+ def exec_cmd(self, cmd, input_data=None, timeout=None):
286
+ """Execute a command with an optional input data.
287
+
288
+ :param cmd: command to be execute, which can be a string
289
+ or a sequence of arguments.
290
+ :param input_data: data to be sent to process stdin
291
+ :param timeout: communication timeout in seconds
292
+
293
+ :returns: output written to stdout.
294
+ :raises: Exception when command fails.
295
+ """
296
+ cmd_str = " ".join(cmd) if isinstance(cmd, list) else cmd
297
+
298
+ if input_data:
299
+ # if stdin data, encode to base64 and decode in the remote host
300
+ b64_input_str = base64.b64encode(
301
+ input_data.encode("ascii")).decode("ascii")
302
+ cmd_str = (
303
+ f"sh -c \"echo \"{b64_input_str}\" | base64 -d | {cmd_str}\"")
304
+
305
+ if self.cmd_prefix:
306
+ cmd_str = f"{self.cmd_prefix} {cmd_str}"
307
+
308
+ LOG.debug(f"Executing command '{cmd_str}' on host '{self.host}'")
309
+
310
+ if timeout:
311
+ original_timeout = self.timeout
312
+ self.timeout = timeout
313
+ try:
314
+ return super(SshCmdClient, self).exec_command(cmd=cmd_str)
315
+ finally:
316
+ if timeout:
317
+ self.timeout = original_timeout