From a1c559e3660aa6eb1c3871c5ba3d4d9cbe449a47 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 26 Apr 2023 09:43:32 +0000 Subject: T5181: Fix for correct deleting vni under vrf --- src/conf_mode/vrf_vni.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf_mode/vrf_vni.py b/src/conf_mode/vrf_vni.py index 6ea714d8b..87d7798b8 100644 --- a/src/conf_mode/vrf_vni.py +++ b/src/conf_mode/vrf_vni.py @@ -33,12 +33,13 @@ def get_config(config=None): vrf_name = None if len(argv) > 1: vrf_name = argv[1] + else: + return None base = ['vrf', 'name', vrf_name] tmp = conf.get_config_dict(base, key_mangling=('-', '_'), no_tag_node_value_mangle=True, get_first_key=True) - if not tmp: - return None + vrf = {'name': {vrf_name: tmp}} return vrf -- cgit v1.2.3