summaryrefslogtreecommitdiff
path: root/src/conf_mode/firewall.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/firewall.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/firewall.py')
-rwxr-xr-xsrc/conf_mode/firewall.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/firewall.py b/src/conf_mode/firewall.py
index f33198a49..de78d53a8 100755
--- a/src/conf_mode/firewall.py
+++ b/src/conf_mode/firewall.py
@@ -21,6 +21,7 @@ from glob import glob
from json import loads
from sys import exit
+from vyos.base import Warning
from vyos.config import Config
from vyos.configdict import dict_merge
from vyos.configdict import node_changed
@@ -225,7 +226,7 @@ def verify_rule(firewall, rule_conf, ipv6):
raise ConfigError(f'Invalid {error_group} "{group_name}" on firewall rule')
if not group_obj:
- print(f'WARNING: {error_group} "{group_name}" has no members')
+ Warning(f'{error_group} "{group_name}" has no members!')
if 'port' in side_conf or dict_search_args(side_conf, 'group', 'port_group'):
if 'protocol' not in rule_conf:
@@ -395,7 +396,7 @@ def resync_policy_route():
# Update policy route as firewall groups were updated
tmp = run(policy_route_conf_script)
if tmp > 0:
- print('Warning: Failed to re-apply policy route configuration')
+ Warning('Failed to re-apply policy route configuration!')
def apply(firewall):
if 'first_install' in firewall: