summaryrefslogtreecommitdiff
path: root/src/conf_mode/lldp.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/lldp.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/lldp.py')
-rwxr-xr-xsrc/conf_mode/lldp.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/conf_mode/lldp.py b/src/conf_mode/lldp.py
index db8328259..2bb615eb7 100755
--- a/src/conf_mode/lldp.py
+++ b/src/conf_mode/lldp.py
@@ -18,6 +18,7 @@ import os
from sys import exit
+from vyos.base import Warning
from vyos.config import Config
from vyos.configdict import dict_merge
from vyos.validate import is_addr_assigned
@@ -84,11 +85,11 @@ def verify(lldp):
if 'management_address' in lldp:
for address in lldp['management_address']:
- message = f'WARNING: LLDP management address "{address}" is invalid'
+ message = f'LLDP management address "{address}" is invalid'
if is_loopback_addr(address):
- print(f'{message} - loopback address')
+ Warning(f'{message} - loopback address')
elif not is_addr_assigned(address):
- print(f'{message} - not assigned to any interface')
+ Warning(f'{message} - not assigned to any interface')
if 'interface' in lldp:
for interface, interface_config in lldp['interface'].items():