diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-06-16 21:31:43 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-06-16 21:31:43 +0200 |
commit | a92e6b272b170339ad0c40cd4c747ebf40d69f7b (patch) | |
tree | 81a01e35a99cd4a7e76237cfb7ffe421097e1146 /smoketest/scripts/cli/test_policy.py | |
parent | 894f2dc05b0c593fbb1c75840b1bb4c9896c0c2b (diff) | |
download | vyos-1x-a92e6b272b170339ad0c40cd4c747ebf40d69f7b.tar.gz vyos-1x-a92e6b272b170339ad0c40cd4c747ebf40d69f7b.zip |
smoketest: policy: T4467: validate relative route-map metric
Diffstat (limited to 'smoketest/scripts/cli/test_policy.py')
-rwxr-xr-x | smoketest/scripts/cli/test_policy.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py index f175d7df7..d1531163f 100755 --- a/smoketest/scripts/cli/test_policy.py +++ b/smoketest/scripts/cli/test_policy.py @@ -723,7 +723,6 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): ipv6_prefix_len= '122' ipv4_nexthop_type= 'blackhole' ipv6_nexthop_type= 'blackhole' - test_data = { 'foo-map-bar' : { @@ -888,6 +887,28 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase): }, }, }, + 'relative-metric' : { + 'rule' : { + '10' : { + 'action' : 'permit', + 'match' : { + 'ip-nexthop-addr' : ipv4_nexthop_address, + }, + 'set' : { + 'metric' : '+10', + }, + }, + '20' : { + 'action' : 'permit', + 'match' : { + 'ip-nexthop-addr' : ipv4_nexthop_address, + }, + 'set' : { + 'metric' : '-20', + }, + }, + }, + }, } self.cli_set(['policy', 'access-list', access_list, 'rule', '10', 'action', 'permit']) |