diff options
| author | Robin Christ <robinchrist@users.noreply.github.com> | 2026-05-13 17:03:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-13 18:03:50 +0300 |
| commit | 69b6be91d0eacfd23feb13f96325923f6e26ed25 (patch) | |
| tree | 17e6d2a5dd5022272abdfa096662a5abc0682c88 /smoketest/scripts/cli | |
| parent | db23d7201c9df78c91aeeeade6963f2cc12b50b1 (diff) | |
| download | vyos-1x-69b6be91d0eacfd23feb13f96325923f6e26ed25.tar.gz vyos-1x-69b6be91d0eacfd23feb13f96325923f6e26ed25.zip | |
bgp: T8588: Add match source-peer to policy route-map (#5149)
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_policy.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py index ad3cc325b..76a9d09a5 100755 --- a/smoketest/scripts/cli/test_policy.py +++ b/smoketest/scripts/cli/test_policy.py @@ -1011,14 +1011,13 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): 'peer' : peer, }, }, - - '31' : { - 'action' : 'permit', - 'match' : { - 'peer' : peerv6, + '31': { + 'action': 'permit', + 'match': { + 'peer': peerv6, + 'source-peer': peer, }, }, - '40' : { 'action' : 'permit', 'match' : { @@ -1279,6 +1278,8 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): self.cli_set(path + ['rule', rule, 'match', 'origin', 'incomplete']) if 'peer' in rule_config['match']: self.cli_set(path + ['rule', rule, 'match', 'peer', rule_config['match']['peer']]) + if 'source-peer' in rule_config['match']: + self.cli_set(path + ['rule', rule, 'match', 'source-peer', rule_config['match']['source-peer']]) if 'rpki-invalid' in rule_config['match']: self.cli_set(path + ['rule', rule, 'match', 'rpki', 'invalid']) if 'rpki-not-found' in rule_config['match']: @@ -1461,6 +1462,9 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): if 'peer' in rule_config['match']: tmp = f'match peer {rule_config["match"]["peer"]}' self.assertIn(tmp, config) + if 'source-peer' in rule_config['match']: + tmp = f'match src-peer {rule_config["match"]["source-peer"]}' + self.assertIn(tmp, config) if 'protocol' in rule_config['match']: tmp = f'match source-protocol {rule_config["match"]["protocol"]}' self.assertIn(tmp, config) |
