diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-04 19:35:18 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-05 22:42:29 +0100 |
commit | 1f8c257f126d492a3f41eee72728b2c35b6b534e (patch) | |
tree | a4111e0fa5dccef83b755e3eb9071e39334a2eac /interface-definitions | |
parent | 3dd78cddfe90851cb7a6891add8a0973d23da292 (diff) | |
download | vyos-1x-1f8c257f126d492a3f41eee72728b2c35b6b534e.tar.gz vyos-1x-1f8c257f126d492a3f41eee72728b2c35b6b534e.zip |
route: static: T2450: provide full protocol support in XML and Python with new CLI
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/static-route.xml.i | 14 | ||||
-rw-r--r-- | interface-definitions/include/static-route6.xml.i | 14 | ||||
-rw-r--r-- | interface-definitions/protocols-multicast.xml.in | 1 | ||||
-rw-r--r-- | interface-definitions/protocols-static-arp.xml.in (renamed from interface-definitions/arp.xml.in) | 2 | ||||
-rw-r--r-- | interface-definitions/protocols-static.xml.in | 341 |
5 files changed, 33 insertions, 339 deletions
diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static-route.xml.i index 9ab3926da..1f79aaca8 100644 --- a/interface-definitions/include/static-route.xml.i +++ b/interface-definitions/include/static-route.xml.i @@ -4,7 +4,7 @@ <help>VRF static IPv4 route</help>
<valueHelp>
<format>ipv4net</format>
- <description>VRF static IPv4 route</description>
+ <description>IPv4 static route</description>
</valueHelp>
<constraint>
<validator name="ipv4-prefix"/>
@@ -17,6 +17,18 @@ </properties>
<children>
#include <include/static-route-distance.xml.i>
+ <leafNode name="tag">
+ <properties>
+ <help>Tag value for this route</help>
+ <valueHelp>
+ <format>u32:1-4294967295</format>
+ <description>Tag value for this route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
</children>
</node>
<tagNode name="interface">
diff --git a/interface-definitions/include/static-route6.xml.i b/interface-definitions/include/static-route6.xml.i index d484b285c..1ff6bbead 100644 --- a/interface-definitions/include/static-route6.xml.i +++ b/interface-definitions/include/static-route6.xml.i @@ -4,7 +4,7 @@ <help>VRF static IPv6 route</help>
<valueHelp>
<format>ipv6net</format>
- <description>VRF static IPv6 route</description>
+ <description>IPv6 static route</description>
</valueHelp>
<constraint>
<validator name="ipv6-prefix"/>
@@ -17,6 +17,18 @@ </properties>
<children>
#include <include/static-route-distance.xml.i>
+ <leafNode name="tag">
+ <properties>
+ <help>Tag value for this route</help>
+ <valueHelp>
+ <format>u32:1-4294967295</format>
+ <description>Tag value for this route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
</children>
</node>
<tagNode name="interface">
diff --git a/interface-definitions/protocols-multicast.xml.in b/interface-definitions/protocols-multicast.xml.in index a06f2b287..bf0ead78f 100644 --- a/interface-definitions/protocols-multicast.xml.in +++ b/interface-definitions/protocols-multicast.xml.in @@ -1,5 +1,4 @@ <?xml version="1.0"?> -<!-- Multicast static routing configuration --> <interfaceDefinition> <node name="protocols"> <children> diff --git a/interface-definitions/arp.xml.in b/interface-definitions/protocols-static-arp.xml.in index 082afe00f..e5e8a9ad9 100644 --- a/interface-definitions/arp.xml.in +++ b/interface-definitions/protocols-static-arp.xml.in @@ -18,7 +18,7 @@ <children> <leafNode name="hwaddr"> <properties> - <help>mac address to translate to</help> + <help>Translation MAC address</help> <valueHelp> <format>macaddr</format> <description>Hardware (MAC) address</description> diff --git a/interface-definitions/protocols-static.xml.in b/interface-definitions/protocols-static.xml.in index 3ad6434db..59a7927a5 100644 --- a/interface-definitions/protocols-static.xml.in +++ b/interface-definitions/protocols-static.xml.in @@ -1,193 +1,15 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Protocol STATIC configuration --> +<?xml version="1.0"?> <interfaceDefinition> <node name="protocols"> <children> - <node name="nstatic" owner="${vyos_conf_scripts_dir}/protocols_static.py"> + <node name="static" owner="${vyos_conf_scripts_dir}/protocols_static.py"> <properties> <help>Static route parameters</help> </properties> <children> - <tagNode name="interface-route"> - <properties> - <help>Interface based static route</help> - <valueHelp> - <format>ipv4net</format> - <description>Interface based static route</description> - </valueHelp> - <constraint> - <validator name="ipv4-prefix"/> - </constraint> - </properties> - <children> - <tagNode name="next-hop-interface"> - <properties> - <help>Next-hop interface [REQUIRED]</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </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> - </children> - </tagNode> - <tagNode name="interface-route6"> - <properties> - <help>Interface based IPv6 static route</help> - <valueHelp> - <format>ipv6net</format> - <description>Interface based IPv6 static route</description> - </valueHelp> - <constraint> - <validator name="ipv6-prefix"/> - </constraint> - </properties> - <children> - <tagNode name="next-hop-interface"> - <properties> - <help>Next-hop interface [REQUIRED]</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - </children> - </tagNode> - </children> - </tagNode> #include <include/static-route-map.xml.i> - <tagNode name="route"> - <properties> - <help>Static route</help> - <valueHelp> - <format>ipv4net</format> - <description>Static 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> - <leafNode name="tag"> - <properties> - <help>Tag value for this route</help> - <valueHelp> - <format>u32:1-4294967295</format> - <description>Tag value for this route</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967295"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <leafNode name="dhcp-interface"> - <properties> - <help>DHCP interface that supplies the next-hop IP address for this static route</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - <valueHelp> - <format>txt</format> - <description>DHCP interface</description> - </valueHelp> - </properties> - </leafNode> - <tagNode name="next-hop"> - <properties> - <help>Next-hop router</help> - <valueHelp> - <format>ipv4</format> - <description>Next-hop router</description> - </valueHelp> - <constraint> - <validator name="ipv4-address"/> - </constraint> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - <leafNode name="next-hop-interface"> - <properties> - <help>IPv4 gateway interface name</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - <valueHelp> - <format>txt</format> - <description>IPv4 gateway interface name</description> - </valueHelp> - </properties> - </leafNode> - #include <include/static-route-next-hop-vrf.xml.i> - </children> - </tagNode> - </children> - </tagNode> - <tagNode name="route6"> - <properties> - <help>Static IPv6 route</help> - <valueHelp> - <format>ipv6net</format> - <description>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="next-hop"> - <properties> - <help>Next-hop IPv6 router [REQUIRED]</help> - <valueHelp> - <format>ipv6</format> - <description>Next-hop IPv6 router [REQUIRED]</description> - </valueHelp> - <constraint> - <validator name="ipv6-address"/> - </constraint> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - <leafNode name="interface"> - <properties> - <help>IPv6 gateway interface name</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - <valueHelp> - <format>txt</format> - <description>IPv6 gateway interface name</description> - </valueHelp> - </properties> - </leafNode> - #include <include/static-route-next-hop-vrf.xml.i> - </children> - </tagNode> - </children> - </tagNode> + #include <include/static-route.xml.i> + #include <include/static-route6.xml.i> <tagNode name="table"> <properties> <help>Policy route table number</help> @@ -200,159 +22,8 @@ </constraint> </properties> <children> - <tagNode name="interface-route"> - <properties> - <help>Interface based static route</help> - <valueHelp> - <format>ipv4net</format> - <description>Interface based static route</description> - </valueHelp> - <constraint> - <validator name="ipv4-prefix"/> - </constraint> - </properties> - <children> - <tagNode name="next-hop-interface"> - <properties> - <help>Next-hop interface [REQUIRED]</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - </children> - </tagNode> - </children> - </tagNode> - <tagNode name="interface-route6"> - <properties> - <help>Interface based IPv6 static route</help> - <valueHelp> - <format>ipv6net</format> - <description>Interface based IPv6 static route</description> - </valueHelp> - <constraint> - <validator name="ipv6-prefix"/> - </constraint> - </properties> - <children> - <tagNode name="next-hop-interface"> - <properties> - <help>Next-hop interface [REQUIRED]</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - </children> - </tagNode> - </children> - </tagNode> - <tagNode name="route"> - <properties> - <help>Static route</help> - <valueHelp> - <format>ipv4net</format> - <description>Static 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> - <leafNode name="dhcp-interface"> - <properties> - <help>DHCP interface that supplies the next-hop IP address for this static route</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - <valueHelp> - <format>txt</format> - <description>DHCP interface</description> - </valueHelp> - </properties> - </leafNode> - <tagNode name="next-hop"> - <properties> - <help>Next-hop router</help> - <valueHelp> - <format>ipv4</format> - <description>Next-hop router</description> - </valueHelp> - <constraint> - <validator name="ipv4-address"/> - </constraint> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - <leafNode name="next-hop-interface"> - <properties> - <help>IPv4 gateway interface name</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - <valueHelp> - <format>txt</format> - <description>IPv4 gateway interface name</description> - </valueHelp> - </properties> - </leafNode> - #include <include/static-route-next-hop-vrf.xml.i> - </children> - </tagNode> - </children> - </tagNode> - <tagNode name="route6"> - <properties> - <help>Static IPv6 route</help> - <valueHelp> - <format>ipv6net</format> - <description>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="next-hop"> - <properties> - <help>Next-hop IPv6 router [REQUIRED]</help> - <valueHelp> - <format>ipv6</format> - <description>Next-hop IPv6 router [REQUIRED]</description> - </valueHelp> - <constraint> - <validator name="ipv6-address"/> - </constraint> - </properties> - <children> - #include <include/generic-disable-node.xml.i> - #include <include/static-route-distance.xml.i> - </children> - </tagNode> - </children> - </tagNode> + #include <include/static-route.xml.i> + #include <include/static-route6.xml.i> </children> </tagNode> </children> |