summaryrefslogtreecommitdiff
path: root/src/conf_mode/host_name.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-16 19:22:03 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-16 19:22:03 +0200
commite91af67ff82a228f3571a60a9037f9ef96c84537 (patch)
tree533512a57561b11281210bdf44a17f493454a088 /src/conf_mode/host_name.py
parent83a2fc901136b9da68f50a5a2c9ae1f45dbf5e97 (diff)
downloadvyos-1x-e91af67ff82a228f3571a60a9037f9ef96c84537.tar.gz
vyos-1x-e91af67ff82a228f3571a60a9037f9ef96c84537.zip
vyos.base: use Warning() helper where applicable
Diffstat (limited to 'src/conf_mode/host_name.py')
-rwxr-xr-xsrc/conf_mode/host_name.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index 87bad0dc6..93f244f42 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -21,13 +21,14 @@ import copy
import vyos.util
import vyos.hostsd_client
-from vyos import ConfigError
+from vyos.base import Warning
from vyos.config import Config
from vyos.ifconfig import Section
from vyos.template import is_ip
from vyos.util import cmd
from vyos.util import call
from vyos.util import process_named_running
+from vyos import ConfigError
from vyos import airbag
airbag.enable()
@@ -113,7 +114,7 @@ def verify(hosts):
for interface, interface_config in hosts['nameservers_dhcp_interfaces'].items():
# Warnin user if interface does not have DHCP or DHCPv6 configured
if not set(interface_config).intersection(['dhcp', 'dhcpv6']):
- print(f'WARNING: "{interface}" is not a DHCP interface but uses DHCP name-server option!')
+ Warning(f'"{interface}" is not a DHCP interface but uses DHCP name-server option!')
return None