diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-16 23:25:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-16 23:28:30 +0200 |
commit | fe0551a8a51da50b78587b808436840934e7bd23 (patch) | |
tree | 232c01dbfea1c8258d3d72f4f7e9a387fe2f89d2 /src/op_mode/show_dhcpv6.py | |
parent | 8acf3ef56bbce7ec3446143c943045c7a7bfb8de (diff) | |
download | vyos-1x-fe0551a8a51da50b78587b808436840934e7bd23.tar.gz vyos-1x-fe0551a8a51da50b78587b808436840934e7bd23.zip |
vyos.base: use Warning() helper for op-mode commands
Diffstat (limited to 'src/op_mode/show_dhcpv6.py')
-rwxr-xr-x | src/op_mode/show_dhcpv6.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/show_dhcpv6.py b/src/op_mode/show_dhcpv6.py index 1f987ff7b..b34b730e6 100755 --- a/src/op_mode/show_dhcpv6.py +++ b/src/op_mode/show_dhcpv6.py @@ -26,6 +26,7 @@ from datetime import datetime from isc_dhcp_leases import Lease, IscDhcpLeases +from vyos.base import Warning from vyos.config import Config from vyos.util import is_systemd_service_running @@ -203,7 +204,7 @@ if __name__ == '__main__': # if dhcp server is down, inactive leases may still be shown as active, so warn the user. if not is_systemd_service_running('isc-dhcp-server6.service'): - print("WARNING: DHCPv6 server is configured but not started. Data may be stale.") + Warning('DHCPv6 server is configured but not started. Data may be stale.') if args.leases: leases = get_leases(conf, lease_file, args.state, args.pool, args.sort) |