diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2023-08-11 18:26:53 +0000 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2023-08-11 18:26:53 +0000 |
commit | 4e07fa25f551325fd90b92426e4693107090d346 (patch) | |
tree | 10b00deb47480b9f0b5e7505a24d7e785f255ea1 /src/conf_mode/firewall.py | |
parent | f57ad85b346a08bd3aa31d95c9a7438f783c2b6e (diff) | |
download | vyos-1x-4e07fa25f551325fd90b92426e4693107090d346.tar.gz vyos-1x-4e07fa25f551325fd90b92426e4693107090d346.zip |
T5460: remove config-trap from firewall
Diffstat (limited to 'src/conf_mode/firewall.py')
-rwxr-xr-x | src/conf_mode/firewall.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/conf_mode/firewall.py b/src/conf_mode/firewall.py index c8b1e27db..7c09dfe9b 100755 --- a/src/conf_mode/firewall.py +++ b/src/conf_mode/firewall.py @@ -180,14 +180,6 @@ def get_config(config=None): # Update nat and policy-route as firewall groups were updated set_dependents('group_resync', conf) - #if 'config_trap' in firewall and firewall['config_trap'] == 'enable': - if 'config_trap' in firewall and firewall['global_options']['config_trap'] == 'enable': - diff = get_config_diff(conf) - firewall['trap_diff'] = diff.get_child_nodes_diff_str(base) - firewall['trap_targets'] = conf.get_config_dict(['service', 'snmp', 'trap-target'], - key_mangling=('-', '_'), get_first_key=True, - no_tag_node_value_mangle=True) - firewall['geoip_updated'] = geoip_updated(conf, firewall) fqdn_config_parse(firewall) @@ -327,10 +319,6 @@ def verify_nested_group(group_name, group, groups, seen): verify_nested_group(g, groups[g], groups, seen) def verify(firewall): - if 'config_trap' in firewall and firewall['config_trap'] == 'enable': - if not firewall['trap_targets']: - raise ConfigError(f'Firewall config-trap enabled but "service snmp trap-target" is not defined') - if 'group' in firewall: for group_type in nested_group_types: if group_type in firewall['group']: @@ -410,9 +398,6 @@ def post_apply_trap(firewall): if 'first_install' in firewall: return None - if 'config_trap' not in firewall['global_options'] or firewall['global_options']['config_trap'] != 'enable': - return None - if not process_named_running('snmpd'): return None |