summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrf_vni.py
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-04-26 09:43:32 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-04-26 09:43:32 +0000
commita1c559e3660aa6eb1c3871c5ba3d4d9cbe449a47 (patch)
tree19d99c1e6c20e8b95ce4dbf94893eb9eba8d20a6 /src/conf_mode/vrf_vni.py
parent28429f615e1ebe1716388d53343b14ff984dfd18 (diff)
downloadvyos-1x-a1c559e3660aa6eb1c3871c5ba3d4d9cbe449a47.tar.gz
vyos-1x-a1c559e3660aa6eb1c3871c5ba3d4d9cbe449a47.zip
T5181: Fix for correct deleting vni under vrf
Diffstat (limited to 'src/conf_mode/vrf_vni.py')
-rw-r--r--src/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 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