diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-04-27 15:57:34 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-04-27 15:57:34 +0000 |
commit | 9d7c9af77992eff79132e7131977c78013689a7d (patch) | |
tree | 60cfcec073249bbaa1fcd2d8720ff6f5c9a3feaa /src | |
parent | 5875f9a5e36580e7d4b7f7afc3fd245e1f3f007a (diff) | |
download | vyos-1x-9d7c9af77992eff79132e7131977c78013689a7d.tar.gz vyos-1x-9d7c9af77992eff79132e7131977c78013689a7d.zip |
T5181: Fix condition to detect correct vrf name for vrf-vni
When we delete vrf vni there is a dictionary
{'only_vrf': 'red', 'new_frr_config': '!\n'}
Diffstat (limited to 'src')
-rw-r--r-- | src/conf_mode/vrf_vni.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/vrf_vni.py b/src/conf_mode/vrf_vni.py index a7424b517..9f33536e5 100644 --- a/src/conf_mode/vrf_vni.py +++ b/src/conf_mode/vrf_vni.py @@ -84,7 +84,7 @@ def apply(vrf): frr_cfg = frr.FRRConfig() frr_cfg.load_configuration(frr_daemon) # There is only one VRF inside the dict as we read only one in get_config() - if vrf and 'name' in vrf: + if vrf and 'only_vrf' in vrf: vrf_name = vrf['only_vrf'] frr_cfg.modify_section(f'^vrf {vrf_name}', stop_pattern='^exit-vrf', remove_stop_mark=True) if vrf and 'new_frr_config' in vrf: |