diff options
Diffstat (limited to 'src/conf_mode/vrf.py')
-rwxr-xr-x | src/conf_mode/vrf.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py index a13bb8b1e..6eea9af4d 100755 --- a/src/conf_mode/vrf.py +++ b/src/conf_mode/vrf.py @@ -38,7 +38,6 @@ from vyos.utils.system import sysctl_write from vyos import ConfigError from vyos import airbag airbag.enable() -frrender = FRRender() config_file = '/etc/iproute2/rt_tables.d/vyos-vrf.conf' k_mod = ['vrf'] @@ -135,7 +134,7 @@ def get_config(config=None): # We need to merge the FRR rendering dict into the VRF dict # this is required to get the route-map information to FRR - vrf.update({'frrender' : get_frrender_dict(conf)}) + vrf.update({'frr_dict' : get_frrender_dict(conf)}) # We also need the route-map information from the config # @@ -210,8 +209,8 @@ def generate(vrf): # Render iproute2 VR helper names render(config_file, 'iproute2/vrf.conf.j2', vrf) - if 'frrender' in vrf: - frrender.generate(vrf['frrender']) + if 'frr_dict' in vrf and 'frrender_cls' not in vrf['frr_dict']: + FRRender().generate(vrf['frr_dict']) return None @@ -353,8 +352,8 @@ def apply(vrf): if has_rule(afi, 2000, 'l3mdev'): call(f'ip {afi} rule del pref 2000 l3mdev unreachable') - if 'frrender' in vrf: - frrender.apply() + if 'frr_dict' in vrf and 'frrender_cls' not in vrf['frr_dict']: + FRRender().apply() return None |