Skip to content

Commit 7b42041

Browse files
authored
Merge pull request #4645 from l0crian1/add-vni-map-description
vxlan: T7468: add VLAN-to-VNI mapping description
2 parents 6fa4978 + 38c5df7 commit 7b42041

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

interface-definitions/interfaces_vxlan.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<constraintErrorMessage>Not a valid VLAN ID or range, VLAN ID must be between 0 and 4094</constraintErrorMessage>
129129
</properties>
130130
<children>
131+
#include <include/generic-description.xml.i>
131132
<leafNode name="vni">
132133
<properties>
133134
<help>Virtual Network Identifier</help>

src/conf_mode/interfaces_vxlan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def get_config(config=None):
6666
vxlan.update({'vlan_to_vni_removed': {}})
6767
for vlan in tmp:
6868
vni = leaf_node_changed(conf, base + [ifname, 'vlan-to-vni', vlan, 'vni'])
69-
vxlan['vlan_to_vni_removed'].update({vlan : {'vni' : vni[0]}})
69+
if vni:
70+
vxlan['vlan_to_vni_removed'].update({vlan : {'vni' : vni[0]}})
7071

7172
# We need to verify that no other VXLAN tunnel is configured when external
7273
# mode is in use - Linux Kernel limitation

0 commit comments

Comments
 (0)