diff options
Diffstat (limited to 'interface-definitions/include')
6 files changed, 160 insertions, 13 deletions
diff --git a/interface-definitions/include/static-route-blackhole.xml.i b/interface-definitions/include/static-route-blackhole.xml.i new file mode 100644 index 000000000..c880ee778 --- /dev/null +++ b/interface-definitions/include/static-route-blackhole.xml.i @@ -0,0 +1,10 @@ +<!-- included start from static-route-blackhole.xml.i -->
+<node name="blackhole">
+ <properties>
+ <help>Silently discard packets when matched</help>
+ </properties>
+ <children>
+ #include <include/static-route-distance.xml.i>
+ </children>
+</node>
+<!-- included end -->
diff --git a/interface-definitions/include/static-route-disable.xml.i b/interface-definitions/include/static-route-disable.xml.i deleted file mode 100644 index 100ca3cbf..000000000 --- a/interface-definitions/include/static-route-disable.xml.i +++ /dev/null @@ -1,8 +0,0 @@ -<!-- included start from static-route-disable.xml.i.xml.i --> -<leafNode name="disable"> - <properties> - <help>Disable interface static route</help> - <valueless/> - </properties> -</leafNode> -<!-- included end --> diff --git a/interface-definitions/include/static-route-next-hop-interface.xml.i b/interface-definitions/include/static-route-next-hop-interface.xml.i new file mode 100644 index 000000000..01c253597 --- /dev/null +++ b/interface-definitions/include/static-route-next-hop-interface.xml.i @@ -0,0 +1,17 @@ +<!-- included start from static-route-next-hop-interface.xml.i --> +<leafNode name="interface"> + <properties> + <help>Gateway interface name</help> + <completionHelp> + <script>${vyos_completion_dir}/list_interfaces.py</script> + </completionHelp> + <valueHelp> + <format>txt</format> + <description>Gateway interface name</description> + </valueHelp> + <constraint> + <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + </constraint> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/static-route-next-hop-vrf.xml.i b/interface-definitions/include/static-route-next-hop-vrf.xml.i index c90140856..ae2515a12 100644 --- a/interface-definitions/include/static-route-next-hop-vrf.xml.i +++ b/interface-definitions/include/static-route-next-hop-vrf.xml.i @@ -1,16 +1,18 @@ <!-- included start from static-route-next-hop-vrf.xml.i --> -<leafNode name="next-hop-vrf"> +<leafNode name="vrf"> <properties> <help>VRF to leak route</help> + <completionHelp> + <list>default</list> + <path>vrf name</path> + </completionHelp> <valueHelp> <format>txt</format> <description>Name of VRF to leak to</description> </valueHelp> - <completionHelp> - <path>protocols vrf</path> - </completionHelp> <constraint> - <regex>^[a-zA-Z0-9\-_]{1,100}$</regex> + <regex>^(default)$</regex> + <validator name="vrf-name"/> </constraint> </properties> </leafNode> diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static-route.xml.i new file mode 100644 index 000000000..9ab3926da --- /dev/null +++ b/interface-definitions/include/static-route.xml.i @@ -0,0 +1,63 @@ +<!-- included start from static-route.xml.i -->
+<tagNode name="route">
+ <properties>
+ <help>VRF static IPv4 route</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>VRF static IPv4 route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="blackhole">
+ <properties>
+ <help>Silently discard pkts when matched</help>
+ </properties>
+ <children>
+ #include <include/static-route-distance.xml.i>
+ </children>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>Next-hop IPv4 router interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Gateway interface name</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-next-hop-vrf.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="next-hop">
+ <properties>
+ <help>Next-hop IPv4 router address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Next-hop router address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-next-hop-interface.xml.i>
+ #include <include/static-route-next-hop-vrf.xml.i>
+ </children>
+ </tagNode>
+ </children>
+</tagNode>
+<!-- included end -->
+
diff --git a/interface-definitions/include/static-route6.xml.i b/interface-definitions/include/static-route6.xml.i new file mode 100644 index 000000000..d484b285c --- /dev/null +++ b/interface-definitions/include/static-route6.xml.i @@ -0,0 +1,63 @@ +<!-- included start from static-route6.xml.i -->
+<tagNode name="route6">
+ <properties>
+ <help>VRF static IPv6 route</help>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>VRF static IPv6 route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="blackhole">
+ <properties>
+ <help>Silently discard pkts when matched</help>
+ </properties>
+ <children>
+ #include <include/static-route-distance.xml.i>
+ </children>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>IPv6 gateway interface name</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Gateway interface name</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-next-hop-vrf.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="next-hop">
+ <properties>
+ <help>IPv6 gateway address</help>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Next-hop IPv6 router</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-next-hop-interface.xml.i>
+ #include <include/static-route-next-hop-vrf.xml.i>
+ </children>
+ </tagNode>
+ </children>
+</tagNode>
+<!-- included end -->
+
|