summaryrefslogtreecommitdiff
path: root/interface-definitions/protocols-static-arp.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-27 21:42:22 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-28 15:03:36 +0200
commitb0aeb2a9c196ea7048545e38e6f3c5759ff4a5ac (patch)
tree3bfc4a149cabf926adb9aea94ec6c0e890ba020d /interface-definitions/protocols-static-arp.xml.in
parent92b834fdc0129b24de6683afe18a81a24f7bc495 (diff)
downloadvyos-1x-b0aeb2a9c196ea7048545e38e6f3c5759ff4a5ac.tar.gz
vyos-1x-b0aeb2a9c196ea7048545e38e6f3c5759ff4a5ac.zip
arp: T4397: change CLI syntax to support interface and VRF bound ARP entries
* set protocols static arp interface eth0 address 192.0.2.1 mac 01:23:45:67:89:01
Diffstat (limited to 'interface-definitions/protocols-static-arp.xml.in')
-rw-r--r--interface-definitions/protocols-static-arp.xml.in44
1 files changed, 29 insertions, 15 deletions
diff --git a/interface-definitions/protocols-static-arp.xml.in b/interface-definitions/protocols-static-arp.xml.in
index e5e8a9ad9..8b1b3b5e1 100644
--- a/interface-definitions/protocols-static-arp.xml.in
+++ b/interface-definitions/protocols-static-arp.xml.in
@@ -4,32 +4,46 @@
<children>
<node name="static">
<children>
- <tagNode name="arp" owner="${vyos_conf_scripts_dir}/arp.py">
+ <node name="arp" owner="${vyos_conf_scripts_dir}/arp.py">
<properties>
<help>Static ARP translation</help>
- <valueHelp>
- <format>ipv4</format>
- <description>IPv4 destination address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
</properties>
<children>
- <leafNode name="hwaddr">
+ <tagNode name="interface">
<properties>
- <help>Translation MAC address</help>
+ <help>Interface configuration</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
<valueHelp>
- <format>macaddr</format>
- <description>Hardware (MAC) address</description>
+ <format>txt</format>
+ <description>Interface name</description>
</valueHelp>
<constraint>
- <validator name="mac-address"/>
+ <validator name="interface-name"/>
</constraint>
</properties>
- </leafNode>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>IP address for static ARP entry</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 destination address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-description.xml.i>
+ #include <include/interface/mac.xml.i>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
</children>
- </tagNode>
+ </node>
</children>
</node>
</children>