diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-29 19:51:50 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-29 19:51:50 +0200 |
commit | 80ecb1b7aaab47edeb355c3b74a763e940d88179 (patch) | |
tree | cb0951a838ccfafe7a154cf566461ece0280f0a9 /interface-definitions/include/bgp | |
parent | 52155b9086fa18083efb601bcc9ba8807f147686 (diff) | |
download | vyos-1x-80ecb1b7aaab47edeb355c3b74a763e940d88179.tar.gz vyos-1x-80ecb1b7aaab47edeb355c3b74a763e940d88179.zip |
xml: T4047: use full string match in the regex validator
Diffstat (limited to 'interface-definitions/include/bgp')
9 files changed, 16 insertions, 16 deletions
diff --git a/interface-definitions/include/bgp/afi-ipv4-prefix-list.xml.i b/interface-definitions/include/bgp/afi-ipv4-prefix-list.xml.i index de42eeac9..34b5ec7d7 100644 --- a/interface-definitions/include/bgp/afi-ipv4-prefix-list.xml.i +++ b/interface-definitions/include/bgp/afi-ipv4-prefix-list.xml.i @@ -15,7 +15,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> @@ -31,7 +31,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> diff --git a/interface-definitions/include/bgp/afi-ipv6-prefix-list.xml.i b/interface-definitions/include/bgp/afi-ipv6-prefix-list.xml.i index 2bf4753be..06c661a90 100644 --- a/interface-definitions/include/bgp/afi-ipv6-prefix-list.xml.i +++ b/interface-definitions/include/bgp/afi-ipv6-prefix-list.xml.i @@ -15,7 +15,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> @@ -31,7 +31,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> diff --git a/interface-definitions/include/bgp/afi-label.xml.i b/interface-definitions/include/bgp/afi-label.xml.i index f7a1f609f..9535d19e8 100644 --- a/interface-definitions/include/bgp/afi-label.xml.i +++ b/interface-definitions/include/bgp/afi-label.xml.i @@ -25,7 +25,7 @@ </valueHelp> <constraint> <validator name="numeric" argument="--range 0-1048575"/> - <regex>^(auto)$</regex> + <regex>(auto)</regex> </constraint> </properties> </leafNode> diff --git a/interface-definitions/include/bgp/afi-rd.xml.i b/interface-definitions/include/bgp/afi-rd.xml.i index c4d29268c..767502094 100644 --- a/interface-definitions/include/bgp/afi-rd.xml.i +++ b/interface-definitions/include/bgp/afi-rd.xml.i @@ -17,7 +17,7 @@ <description>Route Distinguisher, (x.x.x.x:yyy|xxxx:yyyy)</description> </valueHelp> <constraint> - <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex> + <regex>((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}</regex> </constraint> </properties> </leafNode> diff --git a/interface-definitions/include/bgp/afi-route-map-export-import.xml.i b/interface-definitions/include/bgp/afi-route-map-export-import.xml.i index eae10d312..c218937c8 100644 --- a/interface-definitions/include/bgp/afi-route-map-export-import.xml.i +++ b/interface-definitions/include/bgp/afi-route-map-export-import.xml.i @@ -10,7 +10,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> @@ -26,7 +26,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> diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv4-ipv6-common.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv4-ipv6-common.xml.i index a56745380..75221a348 100644 --- a/interface-definitions/include/bgp/neighbor-afi-ipv4-ipv6-common.xml.i +++ b/interface-definitions/include/bgp/neighbor-afi-ipv4-ipv6-common.xml.i @@ -27,7 +27,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> @@ -43,7 +43,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> @@ -59,7 +59,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> @@ -177,7 +177,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> diff --git a/interface-definitions/include/bgp/neighbor-graceful-restart.xml.i b/interface-definitions/include/bgp/neighbor-graceful-restart.xml.i index 25558cd5c..4399d7988 100644 --- a/interface-definitions/include/bgp/neighbor-graceful-restart.xml.i +++ b/interface-definitions/include/bgp/neighbor-graceful-restart.xml.i @@ -18,7 +18,7 @@ <description>Enable BGP graceful restart helper only functionality</description> </valueHelp> <constraint> - <regex>^(enable|disable|restart-helper)$</regex> + <regex>(enable|disable|restart-helper)</regex> </constraint> </properties> </leafNode> diff --git a/interface-definitions/include/bgp/protocol-common-config.xml.i b/interface-definitions/include/bgp/protocol-common-config.xml.i index b59ff0287..abaff5232 100644 --- a/interface-definitions/include/bgp/protocol-common-config.xml.i +++ b/interface-definitions/include/bgp/protocol-common-config.xml.i @@ -1106,7 +1106,7 @@ <description>Ignore paths without link bandwidth for ECMP (if other paths have it)</description> </valueHelp> <constraint> - <regex>^(default-weight-for-missing|ignore|skip-missing)$</regex> + <regex>(default-weight-for-missing|ignore|skip-missing)</regex> </constraint> </properties> </leafNode> @@ -1461,7 +1461,7 @@ <properties> <help>Name of peer-group</help> <constraint> - <regex>^[-_a-zA-Z0-9]+$</regex> + <regex>[-_a-zA-Z0-9]+</regex> </constraint> </properties> <children> diff --git a/interface-definitions/include/bgp/remote-as.xml.i b/interface-definitions/include/bgp/remote-as.xml.i index 11eb7c256..58595b3b9 100644 --- a/interface-definitions/include/bgp/remote-as.xml.i +++ b/interface-definitions/include/bgp/remote-as.xml.i @@ -19,7 +19,7 @@ </valueHelp> <constraint> <validator name="numeric" argument="--range 1-4294967294"/> - <regex>^(external|internal)$</regex> + <regex>(external|internal)</regex> </constraint> <constraintErrorMessage>Invalid AS number</constraintErrorMessage> </properties> |