summaryrefslogtreecommitdiff
path: root/interface-definitions/policy.xml.in
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions/policy.xml.in')
-rw-r--r--interface-definitions/policy.xml.in151
1 files changed, 121 insertions, 30 deletions
diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in
index 225f9a6f9..50b7cbc84 100644
--- a/interface-definitions/policy.xml.in
+++ b/interface-definitions/policy.xml.in
@@ -242,7 +242,7 @@
<description>BGP extended community-list name</description>
</valueHelp>
<constraint>
- <regex>^[-_a-zA-Z0-9]+$</regex>
+ <regex>[-_a-zA-Z0-9]+</regex>
</constraint>
<constraintErrorMessage>Should be an alphanumeric name</constraintErrorMessage>
</properties>
@@ -291,7 +291,7 @@
<description>BGP large-community-list name</description>
</valueHelp>
<constraint>
- <regex>^[-_a-zA-Z0-9]+$</regex>
+ <regex>[-_a-zA-Z0-9]+</regex>
</constraint>
<constraintErrorMessage>Should be an alphanumeric name</constraintErrorMessage>
</properties>
@@ -340,7 +340,7 @@
<description>Name of IPv4 prefix-list</description>
</valueHelp>
<constraint>
- <regex>^[-_a-zA-Z0-9]+$</regex>
+ <regex>[-_a-zA-Z0-9]+</regex>
</constraint>
<constraintErrorMessage>Name of prefix-list can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
</properties>
@@ -408,7 +408,7 @@
<description>Name of IPv6 prefix-list</description>
</valueHelp>
<constraint>
- <regex>^[-_a-zA-Z0-9]+$</regex>
+ <regex>[-_a-zA-Z0-9]+</regex>
</constraint>
<constraintErrorMessage>Name of prefix-list6 can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
</properties>
@@ -476,7 +476,7 @@
<description>Route map name</description>
</valueHelp>
<constraint>
- <regex>^[-_a-zA-Z0-9.]+$</regex>
+ <regex>[-_a-zA-Z0-9.]+</regex>
</constraint>
<constraintErrorMessage>Name of route-map can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
</properties>
@@ -582,7 +582,7 @@
<description>Prefix route</description>
</valueHelp>
<constraint>
- <regex>^(macip|multicast|prefix)$</regex>
+ <regex>(macip|multicast|prefix)</regex>
</constraint>
</properties>
</leafNode>
@@ -793,7 +793,7 @@
</node>
<leafNode name="local-preference">
<properties>
- <help>local-preference_help</help>
+ <help>Local Preference</help>
<valueHelp>
<format>u32:0-4294967295</format>
<description>Local Preference</description>
@@ -834,7 +834,7 @@
<description>Incomplete origin</description>
</valueHelp>
<constraint>
- <regex>^(egp|igp|incomplete)$</regex>
+ <regex>(egp|igp|incomplete)</regex>
</constraint>
</properties>
</leafNode>
@@ -869,7 +869,7 @@
<description>Match valid entries</description>
</valueHelp>
<constraint>
- <regex>^(invalid|notfound|valid)$</regex>
+ <regex>(invalid|notfound|valid)</regex>
</constraint>
</properties>
</leafNode>
@@ -948,24 +948,49 @@
</leafNode>
</children>
</node>
- <leafNode name="as-path-exclude">
+ <node name="as-path">
<properties>
- <help>Remove ASN(s) from a Border Gateway Protocol (BGP) AS-path attribute</help>
- <valueHelp>
- <format>txt</format>
- <description>BGP AS path exclude string (ex: "456 64500 45001")</description>
- </valueHelp>
- </properties>
- </leafNode>
- <leafNode name="as-path-prepend">
- <properties>
- <help>Prepend string for a Border Gateway Protocol (BGP) AS-path attribute</help>
- <valueHelp>
- <format>txt</format>
- <description>BGP AS path prepend string (ex: "64501 64501")</description>
- </valueHelp>
+ <help>Transform BGP AS_PATH attribute</help>
</properties>
- </leafNode>
+ <children>
+ <leafNode name="exclude">
+ <properties>
+ <help>Remove/exclude from the as-path attribute</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>AS number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="as-number-list"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="prepend">
+ <properties>
+ <help>Prepend to the as-path</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>AS number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="as-number-list"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="prepend-last-as">
+ <properties>
+ <help>Use the last AS-number in the as-path</help>
+ <valueHelp>
+ <format>u32:1-10</format>
+ <description>Number of times to insert</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-10"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
<leafNode name="atomic-aggregate">
<properties>
<help>BGP atomic aggregate attribute</help>
@@ -1045,6 +1070,44 @@
</constraint>
</properties>
</leafNode>
+ <node name="evpn">
+ <properties>
+ <help>Ethernet Virtual Private Network</help>
+ </properties>
+ <children>
+ <node name="gateway">
+ <properties>
+ <help>Set gateway IP for prefix advertisement route</help>
+ </properties>
+ <children>
+ <leafNode name="ipv4">
+ <properties>
+ <help>Set gateway IPv4 address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Gateway IPv4 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="ipv6">
+ <properties>
+ <help>Set gateway IPv6 address</help>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Gateway IPv6 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
<node name="extcommunity">
<properties>
<help>BGP extended community attribute</help>
@@ -1070,7 +1133,7 @@
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 1-25600"/>
- <regex>^(cumulative|num-multipaths)$</regex>
+ <regex>(cumulative|num-multipaths)</regex>
</constraint>
</properties>
</leafNode>
@@ -1086,7 +1149,7 @@
<description>Based on a router-id IP address</description>
</valueHelp>
<constraint>
- <regex>^((?:[0-9]{1,3}\.){3}[0-9]{1,3}|\d+):\d+$</regex>
+ <regex>(((\b(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\.){3}(?:(?:2([0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9]))\b)|(\d+)):(\d+) ?)+</regex>
</constraint>
<constraintErrorMessage>Should be in form: ASN:NN or IPADDR:NN where ASN is autonomous system number</constraintErrorMessage>
</properties>
@@ -1103,7 +1166,7 @@
<description>Based on a router-id IP address</description>
</valueHelp>
<constraint>
- <regex>^((?:[0-9]{1,3}\.){3}[0-9]{1,3}|\d+):\d+$</regex>
+ <regex>((?:[0-9]{1,3}\.){3}[0-9]{1,3}|\d+):\d+</regex>
</constraint>
<constraintErrorMessage>Should be in form: ASN:NN or IPADDR:NN where ASN is autonomous system number</constraintErrorMessage>
</properties>
@@ -1113,12 +1176,25 @@
<leafNode name="ip-next-hop">
<properties>
<help>Nexthop IP address</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_local_ips.sh --ipv4</script>
+ <list>unchanged peer-address</list>
+ </completionHelp>
<valueHelp>
<format>ipv4</format>
<description>IP address</description>
</valueHelp>
+ <valueHelp>
+ <format>unchanged</format>
+ <description>Set the BGP nexthop address as unchanged</description>
+ </valueHelp>
+ <valueHelp>
+ <format>peer-address</format>
+ <description>Set the BGP nexthop address to the address of the peer</description>
+ </valueHelp>
<constraint>
<validator name="ipv4-address"/>
+ <regex>(unchanged|peer-address)</regex>
</constraint>
</properties>
</leafNode>
@@ -1130,6 +1206,9 @@
<leafNode name="global">
<properties>
<help>Nexthop IPv6 global address</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_local_ips.sh --ipv6</script>
+ </completionHelp>
<valueHelp>
<format>ipv6</format>
<description>IPv6 address and prefix length</description>
@@ -1142,6 +1221,9 @@
<leafNode name="local">
<properties>
<help>Nexthop IPv6 local address</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_local_ips.sh --ipv6</script>
+ </completionHelp>
<valueHelp>
<format>ipv6</format>
<description>IPv6 address and prefix length</description>
@@ -1151,6 +1233,12 @@
</constraint>
</properties>
</leafNode>
+ <leafNode name="peer-address">
+ <properties>
+ <help>Use peer address (for BGP only)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
<leafNode name="prefer-global">
<properties>
<help>Prefer global address as the nexthop</help>
@@ -1226,7 +1314,7 @@
<description>OSPF external type 2 metric</description>
</valueHelp>
<constraint>
- <regex>^(type-1|type-2)$</regex>
+ <regex>(type-1|type-2)</regex>
</constraint>
</properties>
</leafNode>
@@ -1249,7 +1337,7 @@
<description>Incomplete origin</description>
</valueHelp>
<constraint>
- <regex>^(igp|egp|incomplete)$</regex>
+ <regex>(igp|egp|incomplete)</regex>
</constraint>
</properties>
</leafNode>
@@ -1268,6 +1356,9 @@
<leafNode name="src">
<properties>
<help>Source address for route</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_local_ips.sh --both</script>
+ </completionHelp>
<valueHelp>
<format>ipv4</format>
<description>IPv4 address</description>