summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2026-04-02 13:57:19 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2026-04-02 14:27:22 +0300
commit3139ba759c21800386bc1aa127dd95bc63229362 (patch)
tree01ba37b32bd77866cdc908e1e7eedf6b0a3abcab /smoketest/scripts/cli
parent2ad37c4a8a963651bbc183d24662f2571c4682c6 (diff)
downloadvyos-1x-3139ba759c21800386bc1aa127dd95bc63229362.tar.gz
vyos-1x-3139ba759c21800386bc1aa127dd95bc63229362.zip
vpp: T8438: Add bidirectional interface-in-use validation
Add bidirectional VPP interface reference validation: prevent assigning an interface used by a VPP feature (NAT/ACL/IPFIX/sFlow, etc.) as a VPP member (bond/bridge/xconnect) and prevent using a VPP member interface in VPP features. Block interface deletion when it is still referenced by any VPP feature/member. Fix VLAN subinterface removal checks broken by the recent VPP config tree restructuring.
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index d4238f68c..8fcd541f0 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -873,6 +873,13 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
lines = out.split('\n')
self.assertTrue(len(lines) == 3)
+ # Cannot remove inside/outside interface from vpp while it is used in the feature
+ # expect raise ConfigError
+ self.cli_delete(base_bond + [iface_bond, 'vif', vif_1])
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+ self.cli_discard()
+
def test_14_vpp_nat44(self):
base_nat = base_path + ['nat', 'nat44']
exclude_local_addr = '100.64.0.52'
@@ -1018,6 +1025,13 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
for expected_entry in expected_entries:
self.assertIn(expected_entry, out)
+ # Cannot remove interface from vpp while it is used in the feature
+ # expect raise ConfigError
+ self.cli_delete(base_path + ['settings', 'interface', iface_2])
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+ self.cli_discard()
+
# cannot delete system sFlow configuration if VPP sFlow is configured
# expect raise ConfigError
self.cli_delete(base_sflow)