From ef6879ca4cd510125e7e4337ecaaa5df9692f27e Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Thu, 25 Sep 2025 12:24:53 +0300 Subject: T7815: VPP: NAT44 rules with port requires protocol specification and vice versa --- smoketest/scripts/cli/test_vpp.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'smoketest/scripts/cli') diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py index 3cfc2a853..eb14fb2df 100755 --- a/smoketest/scripts/cli/test_vpp.py +++ b/smoketest/scripts/cli/test_vpp.py @@ -1323,6 +1323,13 @@ class TestVPP(VyOSUnitTestSHIM.TestCase): self.cli_set( base_nat + ['exclude', 'rule', '100', 'local-port', exclude_local_port] ) + + # cannot set local-port without specifying protocol + # expect raise ConfigError + with self.assertRaises(ConfigSessionError): + self.cli_commit() + + self.cli_set(base_nat + ['exclude', 'rule', '100', 'protocol', 'tcp']) self.cli_set( base_nat + ['static', 'rule', '100', 'external', 'address', static_ext_addr] ) -- cgit v1.2.3