From 082cbd2e286bf7599d066af38de4190e974c981d Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 5 Aug 2025 10:08:29 +0000 Subject: [PATCH] QoS policies with max-bw only rules are enforced with OVN policer Since [1], the QoS enforcement for max-bw ONLY rules will be enforced in the OVN policer (using the QoS registers). The tests that use the check ``_validate_qos_rules_nbdb`` only create policies with max-bw rules (and DSCP marking, but this is not relevant for the BW enforcement). [1]https://review.opendev.org/c/openstack/neutron/+/954137 Closes-Bug: #2119518 Signed-off-by: Rodolfo Alonso Hernandez Change-Id: Ie38370c3d1040043000b19771ab9a31ae1f42b12 --- .../tests/scenario/test_qos.py | 30 ++----------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py index fc324ba..9df190d 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py @@ -1280,21 +1280,6 @@ class QosTestOvn(base.BaseTempestTestCaseOvn, QosBaseTest): 'Bandwidth options are not set as expected') LOG.debug('BW limit options found') - def _validate_bw_limit_nbdb_lsp(self, lsp_settings): - bandwidth_settings = '' - for line in lsp_settings.splitlines(): - if line.startswith('options'): - bandwidth_settings = line - break - - self.assertIn(f'qos_max_rate="{self.MAX_KBPS * 1000:.0f}"', - bandwidth_settings, - 'Bandwidth options are not set as expected') - self.assertIn(f'qos_burst="{self.MAX_BURST_KBPS * 1000:.0f}"', - bandwidth_settings, - 'Bandwidth options are not set as expected') - LOG.debug('BW limit options found') - def _validate_dscp_nbdb_qos(self, qos_settings): dscp_settings = '' for line in qos_settings.splitlines(): @@ -1327,19 +1312,8 @@ class QosTestOvn(base.BaseTempestTestCaseOvn, QosBaseTest): 'port in OVN NBDB') LOG.debug('Success: no QoS policies found, as expected') else: - network_id = self.os_admin.network_client.show_port( - port_id)['port']['network_id'] - network_type = self.os_admin.network_client.show_network( - network_id)['network']['provider:network_type'] - if network_type not in ('vlan', 'flat'): - self._validate_dscp_nbdb_qos(qos_settings) - self._validate_bw_limit_nbdb_qos(qos_settings) - else: - self._validate_dscp_nbdb_qos(qos_settings) - cmd = '{} list logical_switch_port {}'.format(self.nbctl, - port_id) - lsp_settings = self.run_on_master_controller(cmd).rstrip() - self._validate_bw_limit_nbdb_lsp(lsp_settings) + self._validate_dscp_nbdb_qos(qos_settings) + self._validate_bw_limit_nbdb_qos(qos_settings) if fip_id: cmd = r'%s find qos external_ids={"neutron\:fip_id"="%s"}' % (