summaryrefslogtreecommitdiff
path: root/interface-definitions/include
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2023-01-07 09:07:10 +0100
committerChristian Poessinger <christian@poessinger.com>2023-01-07 09:07:40 +0100
commit662bae181cdff07a2472d7121d18ae37d380e062 (patch)
tree52936e037b652fb76562a41c20d6089a614f7065 /interface-definitions/include
parentecb94d82311a415d44728ecef39da895feceb5e2 (diff)
downloadvyos-1x-662bae181cdff07a2472d7121d18ae37d380e062.tar.gz
vyos-1x-662bae181cdff07a2472d7121d18ae37d380e062.zip
xml: T1579: merge generic-description.xml.i and interface/description.xml.i
No need to have two distinct include blocks as one superseeds the other. Also this makes the entire behavior of "description" CLI node simpler.
Diffstat (limited to 'interface-definitions/include')
-rw-r--r--interface-definitions/include/generic-description.xml.i3
-rw-r--r--interface-definitions/include/interface/description.xml.i11
-rw-r--r--interface-definitions/include/interface/vif-s.xml.i4
-rw-r--r--interface-definitions/include/interface/vif.xml.i2
4 files changed, 5 insertions, 15 deletions
diff --git a/interface-definitions/include/generic-description.xml.i b/interface-definitions/include/generic-description.xml.i
index b54897be4..b030c2495 100644
--- a/interface-definitions/include/generic-description.xml.i
+++ b/interface-definitions/include/generic-description.xml.i
@@ -7,8 +7,9 @@
<description>Description</description>
</valueHelp>
<constraint>
- <regex>[a-zA-Z0-9_\-\s]+</regex>
+ <regex>[[:ascii:]]{1,256}</regex>
</constraint>
+ <constraintErrorMessage>Description too long (limit 256 characters)</constraintErrorMessage>
</properties>
</leafNode>
<!-- include end -->
diff --git a/interface-definitions/include/interface/description.xml.i b/interface-definitions/include/interface/description.xml.i
deleted file mode 100644
index de01d22ca..000000000
--- a/interface-definitions/include/interface/description.xml.i
+++ /dev/null
@@ -1,11 +0,0 @@
-<!-- include start from interface/description.xml.i -->
-<leafNode name="description">
- <properties>
- <help>Interface specific description</help>
- <constraint>
- <regex>.{1,256}</regex>
- </constraint>
- <constraintErrorMessage>Description too long (limit 256 characters)</constraintErrorMessage>
- </properties>
-</leafNode>
-<!-- include end -->
diff --git a/interface-definitions/include/interface/vif-s.xml.i b/interface-definitions/include/interface/vif-s.xml.i
index 6d50d7238..fdd62b63d 100644
--- a/interface-definitions/include/interface/vif-s.xml.i
+++ b/interface-definitions/include/interface/vif-s.xml.i
@@ -12,8 +12,8 @@
<constraintErrorMessage>VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
+ #include <include/generic-description.xml.i>
#include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface/description.xml.i>
#include <include/interface/dhcp-options.xml.i>
#include <include/interface/dhcpv6-options.xml.i>
#include <include/interface/disable-link-detect.xml.i>
@@ -53,8 +53,8 @@
<constraintErrorMessage>VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
+ #include <include/generic-description.xml.i>
#include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface/description.xml.i>
#include <include/interface/dhcp-options.xml.i>
#include <include/interface/dhcpv6-options.xml.i>
#include <include/interface/disable-link-detect.xml.i>
diff --git a/interface-definitions/include/interface/vif.xml.i b/interface-definitions/include/interface/vif.xml.i
index 3f8f113ea..ec3921bf6 100644
--- a/interface-definitions/include/interface/vif.xml.i
+++ b/interface-definitions/include/interface/vif.xml.i
@@ -12,8 +12,8 @@
<constraintErrorMessage>VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
+ #include <include/generic-description.xml.i>
#include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface/description.xml.i>
#include <include/interface/dhcp-options.xml.i>
#include <include/interface/dhcpv6-options.xml.i>
#include <include/interface/disable-link-detect.xml.i>