diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-02 14:05:33 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-02 14:08:08 +0200 |
commit | 3834f62915830af92dd006a8606b3cce75cbb483 (patch) | |
tree | 066171dc70d8e6c6bcc288cf1e155a214cbe5391 /op-mode-definitions/dhcp.xml.in | |
parent | 022c5e810b8fd62b193e6eee62bfe344e294b25e (diff) | |
download | vyos-1x-3834f62915830af92dd006a8606b3cce75cbb483.tar.gz vyos-1x-3834f62915830af92dd006a8606b3cce75cbb483.zip |
op-mode: T1376: speed up tab-completion for DHCP pool listing
Commit 9f20bee81c ("T1376: improve show_dhcp and show_dhcpv6") added the tab
completion helper to list the availbale IP pools to query. This was done by
calling a python script which then called cli-shell-api which resulted in a
penalty by the Python interpreter startup.
This can be solved by directly using the cli-shell-api wrapper available
as <path> in op-mode - as also seen for DHCPv6.
(cherry picked from commit b1ff7baaf3c52c8c364955632fcece2da7033b10)
Diffstat (limited to 'op-mode-definitions/dhcp.xml.in')
-rw-r--r-- | op-mode-definitions/dhcp.xml.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index 1dacbd5ba..6f0c25110 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -22,7 +22,7 @@ <properties> <help>Show DHCP server leases for a specific pool</help> <completionHelp> - <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script> + <path>service dhcp-server shared-network-name</path> </completionHelp> </properties> <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6</command> @@ -57,7 +57,7 @@ <properties> <help>Show DHCP server statistics for a specific pool</help> <completionHelp> - <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script> + <path>service dhcp-server shared-network-name</path> </completionHelp> </properties> <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6</command> |