summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrf_vni.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-26 12:12:09 +0200
committerGitHub <noreply@github.com>2023-04-26 12:12:09 +0200
commit930f76cf88a4175d485bc4e2df4c149ea547b380 (patch)
tree19d99c1e6c20e8b95ce4dbf94893eb9eba8d20a6 /src/conf_mode/vrf_vni.py
parent28429f615e1ebe1716388d53343b14ff984dfd18 (diff)
parenta1c559e3660aa6eb1c3871c5ba3d4d9cbe449a47 (diff)
downloadvyos-1x-930f76cf88a4175d485bc4e2df4c149ea547b380.tar.gz
vyos-1x-930f76cf88a4175d485bc4e2df4c149ea547b380.zip
Merge pull request #1971 from sever-sever/T5181
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