Unblock the gate and update python testing
This combines two commits in one * Change aggregation method to mean Commit 6061286c3133a4b85c4a72160960ecf6a82d02f8 handles ignoring gnocchi api error when metric is not created. However there are functional test failures when the aggregation method is set to last for alarm type gnocchi_aggregation_by_resources_threshold, This fix changes the aggregration method to mean for any create/update of alarm type gnocchi_aggregation_by_resources_threshold. * Update python testing as per zed cycle testing runtime In Zed cycle, we have dropped the python 3.6/3.7[1] testing and its support. Add release notes and update the python classifier for the same. [1] https://governance.openstack.org/tc/reference/runtimes/zed.html Co-Authored-By: Ghanshyam Mann <gmann@ghanshyammann.com> Depends-On: https://review.opendev.org/c/openstack/aodh/+/843764 Change-Id: Ia11f25fa8c36c6051a44994f2545e2b64a665593 Closes-Bug: #1974682
This commit is contained in:

committed by
Matthias Runge

parent
9c3c2c983e
commit
d656c19113
@@ -1,5 +1,5 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-python3-yoga-jobs
|
||||
- openstack-python3-zed-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- openstackclient-plugin-jobs
|
||||
|
@@ -586,14 +586,14 @@ class AodhClientGnocchiRulesTest(base.ClientTestBase):
|
||||
"--query "
|
||||
'\'{"=": {"creator": "cr3at0r"}}\' '
|
||||
"--resource-type generic "
|
||||
"--aggregation-method last "
|
||||
"--aggregation-method mean "
|
||||
"--project-id %s" % PROJECT_ID))
|
||||
alarm = self.details_multiple(result)[0]
|
||||
ALARM_ID = alarm['alarm_id']
|
||||
self.assertEqual('alarm1', alarm['name'])
|
||||
self.assertEqual('cpu', alarm['metric'])
|
||||
self.assertEqual('80.0', alarm['threshold'])
|
||||
self.assertEqual('last', alarm['aggregation_method'])
|
||||
self.assertEqual('mean', alarm['aggregation_method'])
|
||||
self.assertEqual('generic', alarm['resource_type'])
|
||||
self.assertEqual('{"=": {"creator": "cr3at0r"}}',
|
||||
alarm['query'])
|
||||
@@ -609,7 +609,7 @@ class AodhClientGnocchiRulesTest(base.ClientTestBase):
|
||||
"--query "
|
||||
'\'{"=": {"creator": "cr3at0r"}}\' '
|
||||
"--resource-type generic "
|
||||
"--aggregation-method last "
|
||||
"--aggregation-method mean "
|
||||
"--project-id %s" % PROJECT_ID))
|
||||
|
||||
# UPDATE
|
||||
@@ -631,7 +631,7 @@ class AodhClientGnocchiRulesTest(base.ClientTestBase):
|
||||
self.assertEqual('cpu', alarm_show['metric'])
|
||||
self.assertEqual('90.0', alarm_show['threshold'])
|
||||
self.assertEqual('critical', alarm_show['severity'])
|
||||
self.assertEqual('last', alarm_show['aggregation_method'])
|
||||
self.assertEqual('mean', alarm_show['aggregation_method'])
|
||||
self.assertEqual('generic', alarm_show['resource_type'])
|
||||
|
||||
# LIST
|
||||
@@ -793,13 +793,13 @@ class AodhClientGnocchiRulesTest(base.ClientTestBase):
|
||||
"--query "
|
||||
'\'{"=": {"creator": "cr3at0r"}}\' '
|
||||
"--resource-type generic "
|
||||
"--aggregation-method last "
|
||||
"--aggregation-method mean "
|
||||
% ALARM_ID))
|
||||
alarm_updated = self.details_multiple(result)[0]
|
||||
self.assertEqual(ALARM_ID, alarm_updated["alarm_id"])
|
||||
self.assertEqual('cpu', alarm_updated['metric'])
|
||||
self.assertEqual('90.0', alarm_updated['threshold'])
|
||||
self.assertEqual('last', alarm_updated['aggregation_method'])
|
||||
self.assertEqual('mean', alarm_updated['aggregation_method'])
|
||||
self.assertEqual('generic', alarm_updated['resource_type'])
|
||||
self.assertEqual('{"=": {"creator": "cr3at0r"}}',
|
||||
alarm_updated['query'])
|
||||
@@ -843,13 +843,13 @@ class AodhClientGnocchiRulesTest(base.ClientTestBase):
|
||||
"--query "
|
||||
'\'{"=": {"creator": "cr3at0r"}}\' '
|
||||
"--resource-type generic "
|
||||
"--aggregation-method last "))
|
||||
"--aggregation-method mean "))
|
||||
alarm = self.details_multiple(result)[0]
|
||||
ALARM_ID = alarm['alarm_id']
|
||||
self.assertEqual('alarm123', alarm['name'])
|
||||
self.assertEqual('cpu', alarm['metric'])
|
||||
self.assertEqual('80.0', alarm['threshold'])
|
||||
self.assertEqual('last', alarm['aggregation_method'])
|
||||
self.assertEqual('mean', alarm['aggregation_method'])
|
||||
self.assertEqual('generic', alarm['resource_type'])
|
||||
self.assertEqual('{"=": {"creator": "cr3at0r"}}',
|
||||
alarm['query'])
|
||||
@@ -880,13 +880,13 @@ class AodhClientGnocchiRulesTest(base.ClientTestBase):
|
||||
"--query "
|
||||
'\'{"=": {"creator": "cr3at0r"}}\' '
|
||||
"--resource-type generic "
|
||||
"--aggregation-method last "
|
||||
"--aggregation-method mean "
|
||||
% ALARM_ID))
|
||||
alarm_updated = self.details_multiple(result)[0]
|
||||
self.assertEqual(ALARM_ID, alarm_updated["alarm_id"])
|
||||
self.assertEqual('cpu', alarm_updated['metric'])
|
||||
self.assertEqual('80.0', alarm_updated['threshold'])
|
||||
self.assertEqual('last', alarm_updated['aggregation_method'])
|
||||
self.assertEqual('mean', alarm_updated['aggregation_method'])
|
||||
self.assertEqual('generic', alarm_updated['resource_type'])
|
||||
self.assertEqual('{"=": {"creator": "cr3at0r"}}',
|
||||
alarm_updated['query'])
|
||||
|
@@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Python 3.6 & 3.7 support has been dropped. The minimum version of Python now
|
||||
supported is Python 3.8.
|
@@ -6,7 +6,7 @@ description_file =
|
||||
author = OpenStack
|
||||
author_email = openstack-discuss@lists.openstack.org
|
||||
home_page = https://docs.openstack.org/python-aodhclient/latest/
|
||||
python_requires = >=3.6
|
||||
python_requires = >=3.8
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
@@ -16,9 +16,8 @@ classifier =
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
|
||||
[files]
|
||||
packages =
|
||||
|
Reference in New Issue
Block a user