summaryrefslogtreecommitdiff
path: root/op-mode-definitions/dhcp.xml
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions/dhcp.xml')
-rw-r--r--op-mode-definitions/dhcp.xml36
1 files changed, 30 insertions, 6 deletions
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml
index c284cf14b..f142cdd0e 100644
--- a/op-mode-definitions/dhcp.xml
+++ b/op-mode-definitions/dhcp.xml
@@ -9,7 +9,7 @@
<children>
<node name="server">
<properties>
- <help>Show DHCP information</help>
+ <help>Show DHCP server information</help>
</properties>
<children>
<node name="leases">
@@ -20,9 +20,30 @@
<children>
<tagNode name="pool">
<properties>
- <help>Show DHCP leases for a specific pool</help>
+ <help>Show DHCP server leases for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6</command>
+ </tagNode>
+ <tagNode name="sort">
+ <properties>
+ <help>Show DHCP server leases sorted by the specified key</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed sort</script>
+ </completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $4</command>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --sort $6</command>
+ </tagNode>
+ <tagNode name="state">
+ <properties>
+ <help>Show DHCP server leases with a specific state (can be multiple, comma-separated)</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed state</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --state $(echo $6 | tr , " ")</command>
</tagNode>
</children>
</node>
@@ -35,8 +56,11 @@
<tagNode name="pool">
<properties>
<help>Show DHCP server statistics for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ </completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $4</command>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6</command>
</tagNode>
</children>
</node>
@@ -80,12 +104,12 @@
</tagNode>
<tagNode name="state">
<properties>
- <help>Show DHCPv6 server leases with a specific state</help>
+ <help>Show DHCPv6 server leases with a specific state (can be multiple, comma-separated)</help>
<completionHelp>
<script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed state</script>
</completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --state $6</command>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --state $(echo $6 | tr , " ")</command>
</tagNode>
</children>
</node>