summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrf_vni.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-11-27 19:36:34 +0100
committerGitHub <noreply@github.com>2021-11-27 19:36:34 +0100
commit59dc14bee7ca6e4fd2bbabe5c5ae7518839e7a80 (patch)
tree8164c4cb49efaf0be512e6133259f4b4cfac6009 /src/conf_mode/vrf_vni.py
parent1df8ba611f04c46d49f4cf70d6fa22cfef089392 (diff)
parent5e38895c906f05ecd3815573f07106a9ccab145a (diff)
downloadvyos-1x-59dc14bee7ca6e4fd2bbabe5c5ae7518839e7a80.tar.gz
vyos-1x-59dc14bee7ca6e4fd2bbabe5c5ae7518839e7a80.zip
Merge pull request #1089 from c-po/t3753-frr8
T3753 - CLI adjustments for FRR8.1
Diffstat (limited to 'src/conf_mode/vrf_vni.py')
-rwxr-xr-xsrc/conf_mode/vrf_vni.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/vrf_vni.py b/src/conf_mode/vrf_vni.py
index 50d60f0dc..a357f30dd 100755
--- a/src/conf_mode/vrf_vni.py
+++ b/src/conf_mode/vrf_vni.py
@@ -47,8 +47,9 @@ def apply(vrf):
# add configuration to FRR
frr_cfg = frr.FRRConfig()
frr_cfg.load_configuration(frr_daemon)
- frr_cfg.modify_section(f'^vrf .+$', '')
- frr_cfg.add_before(r'(interface .*|line vty)', vrf['new_frr_config'])
+ frr_cfg.modify_section(f'^vrf .+', '')
+ if 'new_frr_config' in vrf:
+ frr_cfg.add_before(frr.default_add_before, vrf['new_frr_config'])
frr_cfg.commit_configuration(frr_daemon)
# Save configuration to /run/frr/config/frr.conf