diff options
author | Christian Breunig <christian@breunig.cc> | 2025-02-27 11:54:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-27 11:54:25 +0100 |
commit | 37ec095d61c6ac9622926f6495ffed5719da7fb2 (patch) | |
tree | 07b0bb058caf518d0167a19b76554cdce72386a8 /smoketest/scripts/cli | |
parent | 92ad401f0b7459fa3c50092a1bdd8255946e5661 (diff) | |
parent | 757fb7c27ed94e67af1e790722f27d55199fe3cc (diff) | |
download | vyos-1x-37ec095d61c6ac9622926f6495ffed5719da7fb2.tar.gz vyos-1x-37ec095d61c6ac9622926f6495ffed5719da7fb2.zip |
Merge pull request #4373 from aapostoliuk/T7158-circinus
policy: T7158: Added match source-vrf to route-map
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-x | smoketest/scripts/cli/test_policy.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py index 9d4fc0845..985097726 100755 --- a/smoketest/scripts/cli/test_policy.py +++ b/smoketest/scripts/cli/test_policy.py @@ -1149,6 +1149,16 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): }, }, }, + 'vrf-match': { + 'rule': { + '10': { + 'action': 'permit', + 'match': { + 'source-vrf': 'TEST', + }, + }, + }, + }, } self.cli_set(['policy', 'access-list', access_list, 'rule', '10', 'action', 'permit']) @@ -1260,6 +1270,8 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): self.cli_set(path + ['rule', rule, 'match', 'rpki', 'valid']) if 'protocol' in rule_config['match']: self.cli_set(path + ['rule', rule, 'match', 'protocol', rule_config['match']['protocol']]) + if 'source-vrf' in rule_config['match']: + self.cli_set(path + ['rule', rule, 'match', 'source-vrf', rule_config['match']['source-vrf']]) if 'tag' in rule_config['match']: self.cli_set(path + ['rule', rule, 'match', 'tag', rule_config['match']['tag']]) @@ -1438,6 +1450,9 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): if 'rpki-valid' in rule_config['match']: tmp = f'match rpki valid' self.assertIn(tmp, config) + if 'source-vrf' in rule_config['match']: + tmp = f'match source-vrf {rule_config["match"]["source-vrf"]}' + self.assertIn(tmp, config) if 'tag' in rule_config['match']: tmp = f'match tag {rule_config["match"]["tag"]}' self.assertIn(tmp, config) |