summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-07-19 08:43:34 +0200
committerGitHub <noreply@github.com>2019-07-19 08:43:34 +0200
commit9ff4f0c9f7cc75168b116de3a7d7adecbcc3bde1 (patch)
tree9871cc017ad005aeb6b135e7198da25939cb2464 /op-mode-definitions
parentc0b7e14cb2adf5e686a46d5d25c4aed63bac9f53 (diff)
parent9f20bee81c0a0f4632aa152297d0fdf89139d6af (diff)
downloadvyos-1x-9ff4f0c9f7cc75168b116de3a7d7adecbcc3bde1.tar.gz
vyos-1x-9ff4f0c9f7cc75168b116de3a7d7adecbcc3bde1.zip
Merge pull request #91 from jjakob/current
T1376: improve show_dhcp and show_dhcpv6
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/dhcp.xml32
1 files changed, 28 insertions, 4 deletions
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml
index 989c8274a..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,10 +20,31 @@
<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 --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>
<node name="statistics">
@@ -35,6 +56,9 @@
<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 $6</command>
</tagNode>
@@ -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>