diff options
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_policy.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py index 8849ee182..58d00c3eb 100755 --- a/smoketest/scripts/cli/test_policy.py +++ b/smoketest/scripts/cli/test_policy.py @@ -938,6 +938,12 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): 'tag': tag, }, }, + '7' : { + 'action' : 'deny', + 'match' : { + 'rpki-comm-invalid': '', + }, + }, '10' : { 'action' : 'permit', 'match' : { @@ -946,6 +952,12 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): 'rpki-not-found': '', }, }, + '12' : { + 'action' : 'permit', + 'match' : { + 'rpki-comm-not-found': '', + }, + }, '15' : { 'action' : 'permit', 'match' : { @@ -956,6 +968,12 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): 'next' : '', }, }, + '17' : { + 'action' : 'permit', + 'match' : { + 'rpki-comm-valid': '', + }, + }, '20' : { 'action' : 'permit', 'match' : { @@ -1268,6 +1286,12 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): self.cli_set(path + ['rule', rule, 'match', 'rpki', 'notfound']) if 'rpki-valid' in rule_config['match']: self.cli_set(path + ['rule', rule, 'match', 'rpki', 'valid']) + if 'rpki-comm-invalid' in rule_config['match']: + self.cli_set(path + ['rule', rule, 'match', 'rpki-extcommunity', 'invalid']) + if 'rpki-comm-not-found' in rule_config['match']: + self.cli_set(path + ['rule', rule, 'match', 'rpki-extcommunity', 'notfound']) + if 'rpki-comm-valid' in rule_config['match']: + self.cli_set(path + ['rule', rule, 'match', 'rpki-extcommunity', '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']: @@ -1450,6 +1474,15 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): if 'rpki-valid' in rule_config['match']: tmp = f'match rpki valid' self.assertIn(tmp, config) + if 'rpki-comm-invalid' in rule_config['match']: + tmp = f'match rpki-extcommunity invalid' + self.assertIn(tmp, config) + if 'rpki-comm-not-found' in rule_config['match']: + tmp = f'match rpki-extcommunity notfound' + self.assertIn(tmp, config) + if 'rpki-comm-valid' in rule_config['match']: + tmp = f'match rpki-extcommunity 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) |
