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 <ralonsoh@redhat.com>
Change-Id: Ie38370c3d1040043000b19771ab9a31ae1f42b12
This commit is contained in:
Rodolfo Alonso Hernandez
2025-08-05 10:08:29 +00:00
parent fe94cba45f
commit 082cbd2e28

View File

@@ -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"}' % (