summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-21 21:43:22 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-21 21:43:47 +0200
commita9764320d00a8540d8fb1f7ee67b774306389afc (patch)
tree9723cb8d09cf4dac3fe82a8adf36d02c8d5baf0d /python/vyos/ifconfig
parent6ae413b2ca10413b393a1343cbfb23126fa99a50 (diff)
downloadvyos-1x-a9764320d00a8540d8fb1f7ee67b774306389afc.tar.gz
vyos-1x-a9764320d00a8540d8fb1f7ee67b774306389afc.zip
vyos.ifconfig: T4384: get_interface_dict() should provide "ifname" key for VIFs
Diffstat (limited to 'python/vyos/ifconfig')
-rwxr-xr-xpython/vyos/ifconfig/interface.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index ea7497e92..22441d1d2 100755
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1587,12 +1587,10 @@ class Interface(Control):
tmp['source_interface'] = ifname
tmp['vlan_id'] = vif_s_id
- vif_s_ifname = f'{ifname}.{vif_s_id}'
- vif_s_config['ifname'] = vif_s_ifname
-
# It is not possible to change the VLAN encapsulation protocol
# "on-the-fly". For this "quirk" we need to actively delete and
# re-create the VIF-S interface.
+ vif_s_ifname = f'{ifname}.{vif_s_id}'
if self.exists(vif_s_ifname):
cur_cfg = get_interface_config(vif_s_ifname)
protocol = dict_search('linkinfo.info_data.protocol', cur_cfg).lower()
@@ -1614,7 +1612,6 @@ class Interface(Control):
tmp['vlan_id'] = vif_c_id
vif_c_ifname = f'{vif_s_ifname}.{vif_c_id}'
- vif_c_config['ifname'] = vif_c_ifname
c_vlan = VLANIf(vif_c_ifname, **tmp)
c_vlan.update(vif_c_config)
@@ -1625,10 +1622,7 @@ class Interface(Control):
# create/update 802.1q VLAN interfaces
for vif_id, vif_config in config.get('vif', {}).items():
-
vif_ifname = f'{ifname}.{vif_id}'
- vif_config['ifname'] = vif_ifname
-
tmp = deepcopy(VLANIf.get_config())
tmp['source_interface'] = ifname
tmp['vlan_id'] = vif_id