summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-02-24 19:24:46 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2025-02-26 09:55:35 +0000
commit47a8502fcdc4a371742b52176074af91debd66a7 (patch)
treea8634c28e794e2154cce2beffd31ebfc78141f39 /smoketest/scripts/cli
parentecb36ae2d4254acf6c5f7d396895b1bb912cf23a (diff)
downloadvyos-1x-47a8502fcdc4a371742b52176074af91debd66a7.tar.gz
vyos-1x-47a8502fcdc4a371742b52176074af91debd66a7.zip
vd-275: Add loopback bvi interface for a bridge member
Allow to configure VPP loopback interface as BVI interface In the VPP a bridge-domain is the L2 bridge and does not have its own interface Loopback is required if we want to ping from/to the bridge. ``` set vpp interfaces bridge br10 member interface lo23 bvi ```
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py29
1 files changed, 27 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index 69f1410ab..426d19884 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -740,7 +740,7 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
self.assertRegex(out, r'\s*eth1\s+\d+\s+\d+')
# Set non exist member
- # expect raise ConfigErro
+ # expect raise ConfigError
self.cli_set(
base_path
+ [
@@ -799,7 +799,7 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
# Perform assertions based on the normalized output
self.assertIn('BD-ID Index BSN Age(min)', normalized_out)
- self.assertIn('10 1 1 off', normalized_out)
+ self.assertIn('10 1 0 off', normalized_out)
self.assertIn('Learning U-Forwrd UU-Flood Flooding', normalized_out)
self.assertIn('on on flood on', normalized_out)
self.assertIn('Interface If-idx ISN', normalized_out)
@@ -819,6 +819,31 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
self.assertRegex(out, r'\s*eth1\s+\d+\s+\d+')
self.assertRegex(out, r'\s*vxlan_tunnel23\s+\d+\s+\d+')
+ # Add Loopback BVI to the bridge
+ self.cli_set(base_path + ['interfaces', 'loopback', f'lo{vni}'])
+ self.cli_set(
+ base_path
+ + [
+ 'interfaces',
+ 'bridge',
+ interface_bridge,
+ 'member',
+ 'interface',
+ f'lo{vni}',
+ 'bvi',
+ ]
+ )
+ # commit changes
+ self.cli_commit()
+
+ # check bridge interface
+ _, out = rc_cmd('sudo vppctl show bridge-domain 10 detail')
+ # Normalize the output for consistent whitespace
+ normalized_out = re.sub(r'\s+', ' ', out)
+
+ self.assertIn('10 1 0 off', normalized_out)
+ self.assertRegex(out, r'\bloop23\s+\d+\s+\d+\s+\d+\s+\*\s+')
+
def test_08_vpp_ipip(self):
interface_ipip = 'ipip12'
interface_kernel = 'vpptun12'