summaryrefslogtreecommitdiff
path: root/interface-definitions/container.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-12-25 11:09:21 +0100
committerChristian Poessinger <christian@poessinger.com>2022-12-25 11:12:09 +0100
commita0d3c5702dfcf0ac0008039357a2e0e02c625235 (patch)
tree9516374016dfbf5d1cca74b6e8eeeb71dafb9317 /interface-definitions/container.xml.in
parent1ef7ba760bc7c21a754ef7cf3e5049ec88739b12 (diff)
downloadvyos-1x-a0d3c5702dfcf0ac0008039357a2e0e02c625235.tar.gz
vyos-1x-a0d3c5702dfcf0ac0008039357a2e0e02c625235.zip
container: T2216: use defaultValue XML definition to define port protocol
Instead of hardcoding the default protocol as TCP in the Python script we shall use the XML based defaultValue approach instead. This also automatically exports the default to the CLI completion helper.
Diffstat (limited to 'interface-definitions/container.xml.in')
-rw-r--r--interface-definitions/container.xml.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index d50039665..4bac305d1 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -207,14 +207,23 @@
</leafNode>
<leafNode name="protocol">
<properties>
- <help>Protocol tcp/udp</help>
+ <help>Transport protocol used for port mapping</help>
<completionHelp>
<list>tcp udp</list>
</completionHelp>
+ <valueHelp>
+ <format>tcp</format>
+ <description>Use Transmission Control Protocol for given port</description>
+ </valueHelp>
+ <valueHelp>
+ <format>udp</format>
+ <description>Use User Datagram Protocol for given port</description>
+ </valueHelp>
<constraint>
<regex>(tcp|udp)</regex>
</constraint>
</properties>
+ <defaultValue>tcp</defaultValue>
</leafNode>
</children>
</tagNode>