diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2019-06-23 17:01:12 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-11-17 19:06:47 +0100 |
commit | b4b11de59c1f53a15e1d5afbc0d392dfa768fb0d (patch) | |
tree | 8e7b6c5a822107eebc49a6970d3b3abf16ad422d /op-mode-definitions/dhcp.xml | |
parent | fb61e7e72acc372fa49a0cd16fa7f1ba3b0f8dfa (diff) | |
download | vyos-1x-b4b11de59c1f53a15e1d5afbc0d392dfa768fb0d.tar.gz vyos-1x-b4b11de59c1f53a15e1d5afbc0d392dfa768fb0d.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.xml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml index a7d09304e..c284cf14b 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> |