summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-03-17 21:45:43 +0100
committerGitHub <noreply@github.com>2024-03-17 21:45:43 +0100
commit42f3b83dd89893ca077bf41275d58a40294832f6 (patch)
tree0c0438793ed933464171bf8c801c1ce38e9a9395
parent2942040d8099a9e5cee6adf50faa536817c01b33 (diff)
parentc54b1fd63d5a046befe58da299530de12798cf36 (diff)
downloadvyos-1x-42f3b83dd89893ca077bf41275d58a40294832f6.tar.gz
vyos-1x-42f3b83dd89893ca077bf41275d58a40294832f6.zip
Merge pull request #3142 from vyos/mergify/bp/sagitta/pr-3139
policy: T6129: add route-map option "as-path exclude all" (backport #3139)
-rw-r--r--interface-definitions/policy.xml.in12
-rwxr-xr-xsmoketest/scripts/cli/test_policy.py1
2 files changed, 11 insertions, 2 deletions
diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in
index 0d82cd3f8..791fa1d87 100644
--- a/interface-definitions/policy.xml.in
+++ b/interface-definitions/policy.xml.in
@@ -1124,12 +1124,20 @@
<leafNode name="exclude">
<properties>
<help>Remove/exclude from the as-path attribute</help>
+ <completionHelp>
+ <list>all</list>
+ </completionHelp>
<valueHelp>
- <format>u32</format>
+ <format>u32:1-4294967295</format>
<description>AS number</description>
</valueHelp>
+ <valueHelp>
+ <format>all</format>
+ <description>Exclude all AS numbers from the as-path</description>
+ </valueHelp>
<constraint>
<validator name="as-number-list"/>
+ <regex>(all)</regex>
</constraint>
</properties>
</leafNode>
@@ -1137,7 +1145,7 @@
<properties>
<help>Prepend to the as-path</help>
<valueHelp>
- <format>u32</format>
+ <format>u32:1-4294967295</format>
<description>AS number</description>
</valueHelp>
<constraint>
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py
index c21d8af4e..ee4445251 100755
--- a/smoketest/scripts/cli/test_policy.py
+++ b/smoketest/scripts/cli/test_policy.py
@@ -1065,6 +1065,7 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
'20' : {
'action' : 'permit',
'set' : {
+ 'as-path-exclude' : 'all',
'evpn-gateway-ipv4' : '192.0.2.99',
'evpn-gateway-ipv6' : '2001:db8:f00::1',
},