summaryrefslogtreecommitdiff
path: root/op-mode-definitions/dhcp.xml
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2019-06-23 17:01:12 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2019-06-24 23:25:51 +0200
commit89995dcec3a2a6b9112f11cf1c9e4a1bcb4d66d6 (patch)
tree918452196fecd88c199b7647d061dbbe802b660a /op-mode-definitions/dhcp.xml
parent3d3308b5556e6720e0876d0099a83a7ab3307d3c (diff)
downloadvyos-1x-89995dcec3a2a6b9112f11cf1c9e4a1bcb4d66d6.tar.gz
vyos-1x-89995dcec3a2a6b9112f11cf1c9e4a1bcb4d66d6.zip
T1470: improve output of "show dhcpv6 server leases"
- change DUID to IAID_DUID - format IAID_DUID as colon-separated hex list - implement functions: pool, sort, state - add op-mode definitions for pool, sort, state - add columns: State, Type, Last communication, Pool - implement json output - implement completionHelp function
Diffstat (limited to 'op-mode-definitions/dhcp.xml')
-rw-r--r--op-mode-definitions/dhcp.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml
index 85403af6f..989c8274a 100644
--- a/op-mode-definitions/dhcp.xml
+++ b/op-mode-definitions/dhcp.xml
@@ -59,6 +59,35 @@
<help>Show DHCPv6 server leases</help>
</properties>
<command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCPv6 server leases for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed pool</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --pool $6</command>
+ </tagNode>
+ <tagNode name="sort">
+ <properties>
+ <help>Show DHCPv6 server leases sorted by the specified key</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed sort</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --sort $6</command>
+ </tagNode>
+ <tagNode name="state">
+ <properties>
+ <help>Show DHCPv6 server leases with a specific state</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>
+ </tagNode>
+ </children>
</node>
</children>
</node>