Drop legacy TODO comments

- Add negative tests to validate API enforces MTU minimums
- Clean up Python 2.7 timeout handling code
- Validate reply count and format in multicast tests
- Restore neutron-tempest-plugin-dynamic-routing job voting status

Related-Bug: OSPRH-19569
Change-Id: I5951ad35d8884ad738e0ddb65d38f83c799fd51a
Signed-off-by: Renjing Xiao <rxiao@redhat.com>
This commit is contained in:
Renjing Xiao
2025-09-01 16:24:10 +01:00
parent 9c22c14682
commit 98dacffb4f
6 changed files with 50 additions and 25 deletions

View File

@@ -132,8 +132,6 @@ class NetworksTestJSON(base.BaseNetworkTest):
_check_list_networks_fields(['project_id', 'tenant_id'], True, True)
# TODO(ihrachys): check that bad mtu is not allowed; current API extension
# definition doesn't enforce values
# TODO(ihrachys): check that new segment reservation updates mtu, once
# https://review.opendev.org/#/c/353115/ is merged
class NetworksMtuTestJSON(base.BaseNetworkTest):

View File

@@ -43,3 +43,37 @@ class NetworksNegativeTest(base.BaseNetworkTest):
with testtools.ExpectedException(lib_exc.BadRequest):
self.client.create_network(
mtu=CONF.neutron_plugin_options.max_mtu + 1)
@decorators.attr(type='negative')
@decorators.idempotent_id('53537bba-d6c3-4a2e-bda4-ab5b009fb7d9')
def test_create_subnet_mtu_below_minimum_ipv4(self):
network = self.create_network(mtu=67)
with testtools.ExpectedException(lib_exc.Conflict):
self.create_subnet(network, ip_version=4, cidr='10.0.0.0/24')
@decorators.attr(type='negative')
@decorators.idempotent_id('1de68cb6-e6d4-47df-b820-c5048796f33a')
@testtools.skipUnless(config.CONF.network_feature_enabled.ipv6,
'IPv6 is not enabled')
def test_create_subnet_mtu_below_minimum_ipv6(self):
network = self.create_network(mtu=1279)
with testtools.ExpectedException(lib_exc.Conflict):
self.create_subnet(network, ip_version=6, cidr='2001:db8:0:1::/64')
@decorators.attr(type='negative')
@decorators.idempotent_id('5213df6d-7141-40b2-90ea-a958d9bc97e5')
def test_update_network_mtu_below_minimum_ipv4(self):
network = self.create_network(mtu=1280)
self.create_subnet(network, ip_version=4, cidr='10.0.0.0/24')
with testtools.ExpectedException(lib_exc.Conflict):
self.client.update_network(network['id'], mtu=67)
@decorators.attr(type='negative')
@decorators.idempotent_id('1a714fc4-24b1-4c07-a005-d5c218672eab')
@testtools.skipUnless(config.CONF.network_feature_enabled.ipv6,
'IPv6 is not enabled')
def test_update_network_mtu_below_minimum_ipv6(self):
network = self.create_network(mtu=1280)
self.create_subnet(network, ip_version=6, cidr='2001:db8:0:1::/64')
with testtools.ExpectedException(lib_exc.Conflict):
self.client.update_network(network['id'], mtu=1279)

View File

@@ -16,7 +16,6 @@
import collections
import subprocess
import sys
from oslo_log import log
from tempest.lib import exceptions as lib_exc
@@ -131,12 +130,6 @@ def execute_local_command(command, timeout=None):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
if timeout and sys.version_info < (3, 3):
# TODO(fressi): re-implement to timeout support on older Pythons
LOG.warning("Popen.communicate method doens't support for timeout "
"on Python %r", sys.version)
timeout = None
# Wait for process execution while reading STDERR and STDOUT streams
if timeout:
try:

View File

@@ -333,12 +333,20 @@ class BaseMulticastTest(object):
"Receiver {!r} didn't get multicast message".format(
receiver['id'])))
# TODO(slaweq): add validation of answears on sended server
replies_result = sender['ssh_client'].execute_script(
"cat {path} || echo '{path} not exists yet'".format(
path=self.sender_output_file))
for receiver_id in receiver_ids:
self.assertIn(receiver_id, replies_result)
def _sender_completed():
replies_result = sender['ssh_client'].execute_script(
"cat {path} 2>/dev/null || echo ''".format(
path=self.sender_output_file))
for receiver_id in receiver_ids:
expected_pattern = "received reply b'{}' from".format(
receiver_id)
if expected_pattern not in replies_result:
return False
return replies_result.count('received reply') == len(receiver_ids)
utils.wait_until_true(
_sender_completed,
exception=RuntimeError("Sender didn't complete properly"))
def check_unregistered_host():
unregistered_result = unregistered['ssh_client'].execute_script(

View File

@@ -34,8 +34,6 @@
ADVANCED_INSTANCE_USER: ubuntu
CUSTOMIZE_IMAGE: true
BUILD_TIMEOUT: 784
# TODO(lucasagomes): Re-enable MOD_WSGI after
# https://bugs.launchpad.net/neutron/+bug/1912359 is implemented
NEUTRON_DEPLOY_MOD_WSGI: true
devstack_plugins:
neutron: https://opendev.org/openstack/neutron.git

View File

@@ -213,14 +213,7 @@
- neutron-tempest-plugin-bgpvpn-bagpipe-2024-1
- neutron-tempest-plugin-bgpvpn-bagpipe-2024-2
- neutron-tempest-plugin-bgpvpn-bagpipe-2025-1
- neutron-tempest-plugin-dynamic-routing:
# TODO(ralonsoh): this job is temporarily disabled; it will be
# restored once [1] is merged. This patch has been successfully
# tested in [2]. This job is removed from the gate queue,
# thus **remember to restore it in this queue too**.
# [1]https://review.opendev.org/c/openstack/neutron/+/941202
# [2]https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/940906
voting: false
- neutron-tempest-plugin-dynamic-routing
- neutron-tempest-plugin-dynamic-routing-2024-1
- neutron-tempest-plugin-dynamic-routing-2024-2
- neutron-tempest-plugin-dynamic-routing-2025-1
@@ -245,5 +238,6 @@
jobs:
- neutron-tempest-plugin-sfc
- neutron-tempest-plugin-bgpvpn-bagpipe
- neutron-tempest-plugin-dynamic-routing
- neutron-tempest-plugin-fwaas-ovn
- neutron-tempest-plugin-vpnaas-ovn