diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-05 21:01:31 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-05 22:42:29 +0100 |
commit | 96d51fa69fbe072fe5c9e8efd4fa6a89d8a2771a (patch) | |
tree | 8d2ddfca0ce711059081a4ce9d65ef2f80449248 /interface-definitions | |
parent | 44f6896311a559687458a4a6c4fadb86b0a91646 (diff) | |
download | vyos-1x-96d51fa69fbe072fe5c9e8efd4fa6a89d8a2771a.tar.gz vyos-1x-96d51fa69fbe072fe5c9e8efd4fa6a89d8a2771a.zip |
xml: add new common "interface-name" validator
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/bgp-update-source.xml.i | 2 | ||||
-rw-r--r-- | interface-definitions/include/static-route-interface.xml.i (renamed from interface-definitions/include/static-route-next-hop-interface.xml.i) | 4 | ||||
-rw-r--r-- | interface-definitions/include/static-route-vrf.xml.i (renamed from interface-definitions/include/static-route-next-hop-vrf.xml.i) | 2 | ||||
-rw-r--r-- | interface-definitions/include/static-route.xml.i | 8 | ||||
-rw-r--r-- | interface-definitions/include/static-route6.xml.i | 8 | ||||
-rw-r--r-- | interface-definitions/protocols-bgp.xml.in | 2 | ||||
-rw-r--r-- | interface-definitions/protocols-ospf.xml.in | 5 | ||||
-rw-r--r-- | interface-definitions/protocols-ospfv3.xml.in | 2 |
8 files changed, 17 insertions, 16 deletions
diff --git a/interface-definitions/include/bgp-update-source.xml.i b/interface-definitions/include/bgp-update-source.xml.i index c1db2e2c1..a8b212720 100644 --- a/interface-definitions/include/bgp-update-source.xml.i +++ b/interface-definitions/include/bgp-update-source.xml.i @@ -21,7 +21,7 @@ <constraint> <validator name="ipv4-address"/> <validator name="ipv6-address"/> - <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + <validator name="interface-name"/> </constraint> </properties> </leafNode> diff --git a/interface-definitions/include/static-route-next-hop-interface.xml.i b/interface-definitions/include/static-route-interface.xml.i index 01c253597..0f10837df 100644 --- a/interface-definitions/include/static-route-next-hop-interface.xml.i +++ b/interface-definitions/include/static-route-interface.xml.i @@ -1,4 +1,4 @@ -<!-- included start from static-route-next-hop-interface.xml.i --> +<!-- included start from static-route-interface.xml.i --> <leafNode name="interface"> <properties> <help>Gateway interface name</help> @@ -10,7 +10,7 @@ <description>Gateway interface name</description> </valueHelp> <constraint> - <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + <validator name="interface-name"/> </constraint> </properties> </leafNode> diff --git a/interface-definitions/include/static-route-next-hop-vrf.xml.i b/interface-definitions/include/static-route-vrf.xml.i index ae2515a12..70f8b0be8 100644 --- a/interface-definitions/include/static-route-next-hop-vrf.xml.i +++ b/interface-definitions/include/static-route-vrf.xml.i @@ -1,4 +1,4 @@ -<!-- included start from static-route-next-hop-vrf.xml.i --> +<!-- included start from static-route-vrf.xml.i --> <leafNode name="vrf"> <properties> <help>VRF to leak route</help> diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static-route.xml.i index 1f79aaca8..6225025ca 100644 --- a/interface-definitions/include/static-route.xml.i +++ b/interface-definitions/include/static-route.xml.i @@ -42,13 +42,13 @@ <description>Gateway interface name</description>
</valueHelp>
<constraint>
- <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex>
+ <validator name="interface-name"/>
</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>
+ #include <include/static-route-vrf.xml.i>
</children>
</tagNode>
<tagNode name="next-hop">
@@ -65,8 +65,8 @@ <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>
+ #include <include/static-route-interface.xml.i>
+ #include <include/static-route-vrf.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/include/static-route6.xml.i b/interface-definitions/include/static-route6.xml.i index 1ff6bbead..25d4d22a2 100644 --- a/interface-definitions/include/static-route6.xml.i +++ b/interface-definitions/include/static-route6.xml.i @@ -42,13 +42,13 @@ <description>Gateway interface name</description>
</valueHelp>
<constraint>
- <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex>
+ <validator name="interface-name"/>
</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>
+ #include <include/static-route-vrf.xml.i>
</children>
</tagNode>
<tagNode name="next-hop">
@@ -65,8 +65,8 @@ <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>
+ #include <include/static-route-interface.xml.i>
+ #include <include/static-route-vrf.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in index 3edacb0ca..e5122fe8d 100644 --- a/interface-definitions/protocols-bgp.xml.in +++ b/interface-definitions/protocols-bgp.xml.in @@ -307,7 +307,7 @@ <constraint> <validator name="ipv4-address"/> <validator name="ipv6-address"/> - <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + <validator name="interface-name"/> </constraint> </properties> <children> diff --git a/interface-definitions/protocols-ospf.xml.in b/interface-definitions/protocols-ospf.xml.in index 7a5cef6ef..ca848c289 100644 --- a/interface-definitions/protocols-ospf.xml.in +++ b/interface-definitions/protocols-ospf.xml.in @@ -697,7 +697,8 @@ <description>Default to suppress routing updates on all interfaces</description> </valueHelp> <constraint> - <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo|default$</regex> + <regex>^(default)$</regex> + <validator name="interface-name"/> </constraint> <multi/> </properties> @@ -713,7 +714,7 @@ <description>Interface to be passive (i.e. suppress routing updates)</description> </valueHelp> <constraint> - <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + <validator name="interface-name"/> </constraint> <multi/> </properties> diff --git a/interface-definitions/protocols-ospfv3.xml.in b/interface-definitions/protocols-ospfv3.xml.in index 7f80f9f9d..bd6a55b45 100644 --- a/interface-definitions/protocols-ospfv3.xml.in +++ b/interface-definitions/protocols-ospfv3.xml.in @@ -52,7 +52,7 @@ <description>Interface used for routing information exchange</description> </valueHelp> <constraint> - <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + <validator name="interface-name"/> </constraint> <multi/> </properties> |