Remove node interfaces discover

Nodes interfaces discover was introduced in [1] where code
was extended to support tcpdump captures on different type of
nodes (including OCP cluster nodes).
Since then the code was modified to capture traffic on OCP nodes
differently comparing to normal nodes and there is no longer need
in interfaces discover for nodes since a config value can be used
instead.

[1] https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/913238

Change-Id: Ida23fa855a7986ba5c5f9ca49663644715783a24
This commit is contained in:
Roman Safronov 2024-08-04 16:41:07 +03:00
parent 2a3d2e7a51
commit 42f8e3c435
2 changed files with 4 additions and 16 deletions

View File

@ -125,11 +125,9 @@ WhiteboxNeutronPluginOptions = [
help="Bridge dedicated for external network. It is used for "
"capturing traffic for routing tests."),
cfg.StrOpt('node_ext_interface',
default=None,
default='eth1',
help='Physical interface of a node that is connected to the '
'external network. In case the value is set to None the '
'interface name will be discovered from a list of '
'interfaces under bridge connected to external network'),
'external network.'),
cfg.IntOpt('minbw_placement_nic_kbps_egress',
default=None,
help='BW configured per NIC for the minimum BW placement '

View File

@ -1056,14 +1056,6 @@ class TrafficFlowTest(BaseTempestWhiteboxTestCase):
node['ovs_pod'] = line.split()[1]
def _start_captures(self, filters, interface=None):
def get_interface(client):
interfaces = client.exec_command(
"sudo ovs-vsctl list-ports " + WB_CONF.ext_bridge +
r"| grep 'eth\|enp\|ens' | grep -v veth " +
"|| true").strip().split()
if interfaces:
return ','.join(interfaces)
for node in self.nodes:
if not (node['is_controller'] or
node['is_compute'] or
@ -1081,10 +1073,8 @@ class TrafficFlowTest(BaseTempestWhiteboxTestCase):
command_prefix = ''
if interface:
capture_interface = interface
elif WB_CONF.node_ext_interface:
capture_interface = WB_CONF.node_ext_interface
else:
capture_interface = get_interface(node['client'])
capture_interface = WB_CONF.node_ext_interface
node['capture'] = capture.TcpdumpCapture(
capture_client, capture_interface, filters, command_prefix)
self.useFixture(node['capture'])