Merge "Re-enable GLOBAL_VENV"
diff --git a/.zuul.yaml b/.zuul.yaml
index 6c73d69..d939716 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -60,16 +60,38 @@
     name: telemetry-dsvm-integration-2024-2
     parent: telemetry-tempest-base
     override-checkout: stable/2024.2
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
+    vars: &prefix_grouping_vars
+      devstack_local_conf:
+        test-config:
+          $TEMPEST_CONFIG:
+            service_available:
+              sg_core: True
+            telemetry_services:
+              metric_backends: gnocchi,prometheus
+            telemetry:
+              disable_ssl_certificate_validation: True
+              ceilometer_polling_interval: 15
+              autoscaling_instance_grouping: prefix
 
 - job:
     name: telemetry-dsvm-integration-2024-1
     parent: telemetry-tempest-base
     override-checkout: stable/2024.1
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
+    vars: *prefix_grouping_vars
 
 - job:
     name: telemetry-dsvm-integration-2023-2
     parent: telemetry-tempest-base
     override-checkout: stable/2023.2
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
     vars: &no_prometheus_vars
       devstack_localrc:
         TEMPEST_PLUGINS: '"/opt/stack/telemetry-tempest-plugin /opt/stack/heat-tempest-plugin"'
@@ -88,11 +110,37 @@
             telemetry:
               disable_ssl_certificate_validation: True
               ceilometer_polling_interval: 15
+              autoscaling_instance_grouping: prefix
 
 - job:
-    name: telemetry-dsvm-integration-2023-1
+    name: telemetry-dsvm-integration
     parent: telemetry-tempest-base
-    override-checkout: stable/2023.1
+    branches:
+      - stable/2024.2
+      - stable/2024.1
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
+    vars: *prefix_grouping_vars
+
+- job:
+    name: telemetry-dsvm-integration
+    parent: telemetry-tempest-base
+    branches:
+      - stable/2023.2
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
+    vars: *no_prometheus_vars
+
+- job:
+    name: telemetry-dsvm-integration
+    parent: telemetry-tempest-base
+    branches:
+      - stable/2023.1
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.5
     vars: *no_prometheus_vars
 
 - job:
@@ -105,7 +153,7 @@
         USE_PYTHON3: False
 
 - job:
-    name: telemetry-dsvm-integration-ipv6-only
+    name: telemetry-dsvm-integration-ipv6-only-base
     parent: devstack-tempest-ipv6
     description: |
       Telemetry devstack tempest tests job for IPv6-only deployment
@@ -119,6 +167,43 @@
     vars: *base_vars
 
 - job:
+    name: telemetry-dsvm-integration-ipv6-only
+    parent: telemetry-dsvm-integration-ipv6-only-base
+    description: |
+      Telemetry devstack tempest tests job for IPv6-only deployment
+    branches:
+      - stable/2024.2
+      - stable/2024.1
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
+    vars: *prefix_grouping_vars
+
+- job:
+    name: telemetry-dsvm-integration-ipv6-only
+    parent: telemetry-dsvm-integration-ipv6-only-base
+    description: |
+      Telemetry devstack tempest tests job for IPv6-only deployment
+    branches:
+      - stable/2023.2
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.6
+    vars: *no_prometheus_vars
+
+- job:
+    name: telemetry-dsvm-integration-ipv6-only
+    parent: telemetry-dsvm-integration-ipv6-only-base
+    description: |
+      Telemetry devstack tempest tests job for IPv6-only deployment
+    branches:
+      - stable/2023.1
+    required-projects:
+      - name: gnocchixyz/gnocchi
+        override-checkout: stable/4.5
+    vars: *no_prometheus_vars
+
+- job:
     name: telemetry-dsvm-integration-wallaby
     parent: telemetry-dsvm-integration
     nodeset: openstack-single-node-focal
@@ -177,7 +262,6 @@
     check:
       jobs:
         - telemetry-dsvm-integration
-        - telemetry-dsvm-integration-2023-1
         - telemetry-dsvm-integration-2023-2
         - telemetry-dsvm-integration-2024-1
         - telemetry-dsvm-integration-2024-2
diff --git a/releasenotes/notes/drop-python38-support-59b0b2f406651efb.yaml b/releasenotes/notes/drop-python38-support-59b0b2f406651efb.yaml
new file mode 100644
index 0000000..5630753
--- /dev/null
+++ b/releasenotes/notes/drop-python38-support-59b0b2f406651efb.yaml
@@ -0,0 +1,6 @@
+---
+upgrade:
+  - |
+    Support for Python 3.8 has been dropped. Latest release of
+    telemetry-tempest-plugin to support python 3.8 is 2.3.0.
+    The minimum version of Python now supported is Python 3.9.
diff --git a/releasenotes/notes/use-metadata-grouping-for-prometheus-autoscaling-763c98141a940531.yaml b/releasenotes/notes/use-metadata-grouping-for-prometheus-autoscaling-763c98141a940531.yaml
new file mode 100644
index 0000000..b046fe9
--- /dev/null
+++ b/releasenotes/notes/use-metadata-grouping-for-prometheus-autoscaling-763c98141a940531.yaml
@@ -0,0 +1,7 @@
+---
+features:
+  - |
+    Added ability to use metadata instance grouping when testing prometheus based autoscaling.
+    This method of instance grouping is supported since 2025.1 and it's the default option.
+    The ``autoscaling_instance_grouping`` configuration option has been added, which switches
+    the grouping method between ``metadata`` grouping and ``instance`` grouping.
diff --git a/setup.cfg b/setup.cfg
index ecad152..b3af9b6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -6,7 +6,7 @@
 author = OpenStack
 author_email = openstack-discuss@lists.openstack.org
 home_page = https://www.openstack.org/
-python_requires = >=3.6
+python_requires = >=3.9
 classifier =
     Environment :: OpenStack
     Intended Audience :: Information Technology
@@ -17,10 +17,10 @@
     Programming Language :: Python :: Implementation :: CPython
     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
+    Programming Language :: Python :: 3.10
+    Programming Language :: Python :: 3.11
+    Programming Language :: Python :: 3.12
 
 [files]
 packages =
diff --git a/telemetry_tempest_plugin/config.py b/telemetry_tempest_plugin/config.py
index 68e47ce..e2e1766 100644
--- a/telemetry_tempest_plugin/config.py
+++ b/telemetry_tempest_plugin/config.py
@@ -45,16 +45,13 @@
 telemetry_services_group = cfg.OptGroup(name='telemetry_services',
                                         title='Telemetry Services')
 
-event_group = cfg.OptGroup(name='event',
-                           title='Event Service Options')
-
 alarming_group = cfg.OptGroup(name='alarming_plugin',
                               title='Alarming Service Options')
 
 metric_group = cfg.OptGroup(name='metric',
                             title='Metric Service Options')
 
-TelemetryGroup = [
+telemetry_opts = [
     cfg.IntOpt('notification_wait',
                default=120,
                help="The seconds to wait for notifications which "
@@ -97,14 +94,19 @@
                default=15,
                help="Scrape interval configured for prometheus. This can "
                     "be used in test cases to properly configure autoscaling"),
-    cfg.StrOpt('autoscaling_instance_grouping',
-               default='prefix',
-               choices=['prefix', 'metadata'],
-               help="How to group instances for autoscaling testing. "
-                    "'prefix' relies on the instances having a common string "
-                    "at the start of their name. 'metadata' is a new and "
-                    "prefered way of grouping since 2024.2 relying on "
-                    "metering.server_group instance metadata")
+    cfg.StrOpt(
+        'autoscaling_instance_grouping',
+        default='metadata',
+        choices=[
+            ('prefix', 'Use a common string at the start of instance names to '
+                       'group instances'),
+            ('metadata', 'Use metering.server_group instance metadata to '
+                         'group instances. This is preferred method since '
+                         '2025.1')
+        ],
+        help="The method to group instances for autoscaling testing. Note "
+             "that this option affects only tests with prometheus metric "
+             "backend")
 ]
 
 telemetry_services_opts = [
@@ -118,18 +120,7 @@
                help="Database used by the aodh service"),
 ]
 
-event_opts = [
-    cfg.StrOpt('catalog_type',
-               default='event',
-               help="Catalog type of the Event service."),
-    cfg.StrOpt('endpoint_type',
-               default='publicURL',
-               choices=['public', 'admin', 'internal',
-                        'publicURL', 'adminURL', 'internalURL'],
-               help="The endpoint type to use for the event service."),
-]
-
-AlarmingGroup = [
+alarming_opts = [
     cfg.StrOpt('catalog_type',
                default='alarming',
                help="Catalog type of the Alarming service."),
diff --git a/telemetry_tempest_plugin/plugin.py b/telemetry_tempest_plugin/plugin.py
index 51c40f9..1ac2a20 100644
--- a/telemetry_tempest_plugin/plugin.py
+++ b/telemetry_tempest_plugin/plugin.py
@@ -36,30 +36,25 @@
             tempest_config.service_option)
         config.register_opt_group(
             conf, tempest_config.telemetry_group,
-            tempest_config.TelemetryGroup)
+            tempest_config.telemetry_opts)
         config.register_opt_group(
             conf, tempest_config.telemetry_services_group,
             tempest_config.telemetry_services_opts)
         config.register_opt_group(
-            conf, tempest_config.event_group,
-            tempest_config.event_opts)
-        config.register_opt_group(
             conf, tempest_config.alarming_group,
-            tempest_config.AlarmingGroup)
+            tempest_config.alarming_opts)
         config.register_opt_group(
             conf, tempest_config.metric_group,
             tempest_config.metric_opts)
 
     def get_opt_lists(self):
         return [(tempest_config.telemetry_group.name,
-                 tempest_config.TelemetryGroup),
+                 tempest_config.telemetry_opts),
                 (tempest_config.telemetry_services_group.name,
                  tempest_config.telemetry_services_opts),
-                (tempest_config.event_group.name,
-                 tempest_config.event_opts),
                 (config.service_available_group.name,
                  tempest_config.service_option),
                 (tempest_config.alarming_group.name,
-                 tempest_config.AlarmingGroup),
+                 tempest_config.alarming_opts),
                 (tempest_config.metric_group.name,
                  tempest_config.metric_opts)]
diff --git a/tox.ini b/tox.ini
index e23dbc8..558e6f8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -20,7 +20,7 @@
 commands = stestr run {posargs}
 
 [testenv:pep8]
-deps = hacking>=3.0,<3.1.0
+deps = hacking>=6.1.0,<6.2.0
 commands = flake8 {posargs}
 
 [testenv:venv]