From ea3c7785d06ed341487efb800c141fa7a7797ba7 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 27 Nov 2021 10:32:01 +0100 Subject: frr: T3753: add default_add_before mnemonic for routing protocols to re-use code --- src/conf_mode/policy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/conf_mode/policy.py') diff --git a/src/conf_mode/policy.py b/src/conf_mode/policy.py index 1a03d520b..5c592a599 100755 --- a/src/conf_mode/policy.py +++ b/src/conf_mode/policy.py @@ -191,7 +191,7 @@ def apply(policy): frr_cfg.modify_section(r'^bgp extcommunity-list .*') frr_cfg.modify_section(r'^bgp large-community-list .*') frr_cfg.modify_section(r'^route-map .*') - frr_cfg.add_before('^line vty', policy['new_frr_config']) + frr_cfg.add_before(frr.default_add_before, policy['new_frr_config']) frr_cfg.commit_configuration(bgp_daemon) # The route-map used for the FIB (zebra) is part of the zebra daemon @@ -201,7 +201,7 @@ def apply(policy): frr_cfg.modify_section(r'^ip prefix-list .*') frr_cfg.modify_section(r'^ipv6 prefix-list .*') frr_cfg.modify_section(r'^route-map .*') - frr_cfg.add_before('^line vty', policy['new_frr_config']) + frr_cfg.add_before(frr.default_add_before, policy['new_frr_config']) frr_cfg.commit_configuration(zebra_daemon) # If FRR config is blank, rerun the blank commit x times due to frr-reload -- cgit v1.2.3