summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2023-01-05 07:24:03 +0100
committerChristian Poessinger <christian@poessinger.com>2023-01-05 07:24:12 +0100
commite3454b7ead66b5481aba2cc07670680dad4f4afa (patch)
treefe1b3b67cd819e3d1fae6c15669ffa85e372c866 /interface-definitions
parentbf790ab67d6261b225849cfca5d8ea092f753b42 (diff)
downloadvyos-1x-e3454b7ead66b5481aba2cc07670680dad4f4afa.tar.gz
vyos-1x-e3454b7ead66b5481aba2cc07670680dad4f4afa.zip
static: T4883: re-use description XML building block
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/generic-description.xml.i3
-rw-r--r--interface-definitions/protocols-static.xml.in21
2 files changed, 10 insertions, 14 deletions
diff --git a/interface-definitions/include/generic-description.xml.i b/interface-definitions/include/generic-description.xml.i
index 03fc564e6..31d540317 100644
--- a/interface-definitions/include/generic-description.xml.i
+++ b/interface-definitions/include/generic-description.xml.i
@@ -6,6 +6,9 @@
<format>txt</format>
<description>Description</description>
</valueHelp>
+ <constraint>
+ <regex>[a-zA-Z0-9_\-]+</regex>
+ </constraint>
</properties>
</leafNode>
<!-- include end -->
diff --git a/interface-definitions/protocols-static.xml.in b/interface-definitions/protocols-static.xml.in
index 033c7759e..ca4ca2d74 100644
--- a/interface-definitions/protocols-static.xml.in
+++ b/interface-definitions/protocols-static.xml.in
@@ -26,20 +26,13 @@
</constraint>
</properties>
<children>
- <leafNode name="description">
- <properties>
- <help>Table description</help>
- <constraint>
- <!--
- iproute2 only considers the first "word" until whitespace in the name field
- but does not complain about special characters.
- We put an artificial limit here to make table descriptions potentially valid node names
- to avoid quoting and simplify future syntax changes if we decide to make any.
- -->
- <regex>[a-zA-Z0-9_\-]+</regex>
- </constraint>
- </properties>
- </leafNode>
+ <!--
+ iproute2 only considers the first "word" until whitespace in the name field
+ but does not complain about special characters.
+ We put an artificial limit here to make table descriptions potentially valid node names
+ to avoid quoting and simplify future syntax changes if we decide to make any.
+ -->
+ #include <include/generic-description.xml.i>
#include <include/static/static-route.xml.i>
#include <include/static/static-route6.xml.i>
</children>