summaryrefslogtreecommitdiff
path: root/src/op_mode/show_dhcp.py
AgeCommit message (Collapse)Author
2022-04-16vyos.base: use Warning() helper for op-mode commandsChristian Poessinger
2021-09-02op-mode: T1376: speed up tab-completion for DHCP pool listingChristian Poessinger
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.
2021-07-30vyos.util: drop custom implementations in favor of is_systemd_service_running()Christian Poessinger
Commit f520182b ("vyos.util: add is_systemd_service_running() helper function") added a new helper function that can be used to check if a systemd service is running. Drop all custom implementations in favor of this library call.
2020-07-20dhcp-server: T2717: Fix DHCP pool size in statisticsRobert Schindler
The calculated size of DHCP server address pools was not corrent. The fact that both boundaries of address ranges are inclusive wasn't accounted for, so the calculated size was too small by 1 address per range.
2020-04-20op-mode: dhcp: T2316: bugfix TypeErrorChristian Poessinger
Commit d4b1bc0b ("op-mode: dhcp/dhcpv6: T2268: prettify output for invalid input") uses a different API which caused a TypeError. TypeError: get_leases() missing 1 required positional argument: 'leases'
2020-04-18op-mode: dhcp/dhcpv6: T2268: prettify output for invalid inputJernej Jakob
2020-04-13op-mode: T2185: adjust dhcpv4/v6 systemd service nameChristian Poessinger
2020-04-09util: T2226: os.system was wrongly converted to runThomas Mangin
os.system does print the ouput of the command, run() does not. A new function called call() does the printing and return the error code.
2020-04-06util: T2226: covert most calls from os.system to utilThomas Mangin
As little change a possible but the function call The behaviour should be totally unchanged.
2019-12-13T1873: DHCP: add current year to copyright noticeJernej Jakob
2019-12-13T1873: DHCP: fix service name in op-mode "show dhcp"Jernej Jakob
2019-07-19T1376: improve show_dhcp and show_dhcpv6Jernej Jakob
2019-05-30[dhcp] T1416: fix DHCP server status viewChristian Poessinger
2019-03-08T1277: [dhcp-server] bugfix 'show dhcp server leases'Christian Poessinger
The script did not check if the service was actually configured or not. This caused a FileNotFoundError for unconfigured services. vyos@vyos:~$ show dhcp server leases Traceback (most recent call last): File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 123, in <module> leases = get_leases(lease_file, state='active') File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 60, in get_leases leases = IscDhcpLeases(lease_file).get() File "/usr/lib/python3/dist-packages/isc_dhcp_leases/iscdhcpleases.py", line 110, in get with open(self.filename) as lease_file: FileNotFoundError: [Errno 2] No such file or directory: '/config/dhcpd.leases'
2018-10-13Update show_dhcp.pyEwald van Geffen
I don't really do python, please check/test.
2018-09-04T823: extend the new DHCP op mode.Daniil Baturin
2018-09-02T823: add a new DHCP op mode script, only capable of showing leases now.Daniil Baturin