summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-19 20:45:29 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-25 15:36:07 +0200
commita25d7095e009469d8ef60b63deddd94d30921723 (patch)
treedefbe9b68845e714e2d3ddf93b5191592be97f61 /python/vyos/ifconfig/ethernet.py
parent2b1c3dc86fe4033030855d61bf453aa730b6c230 (diff)
downloadvyos-1x-a25d7095e009469d8ef60b63deddd94d30921723.tar.gz
vyos-1x-a25d7095e009469d8ef60b63deddd94d30921723.zip
bridge: ifconfig: T2653: move to get_config_dict()
The current VyOS CLI parser code written in Python contains a ton of duplicates which I can also hold myself accountable for - or maybe mainly me - depends on the angle of judge. While providing a new update() method in vyos.ifconfig.interfaces() this is extended for bridge interfaces in the derived bridge class. Signed-off-by: Christian Poessinger <christian@poessinger.com>
Diffstat (limited to 'python/vyos/ifconfig/ethernet.py')
-rw-r--r--python/vyos/ifconfig/ethernet.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py
index 8a50a8699..1725116e2 100644
--- a/python/vyos/ifconfig/ethernet.py
+++ b/python/vyos/ifconfig/ethernet.py
@@ -299,26 +299,6 @@ class EthernetIf(Interface):
duplex = config.get('duplex')
self.set_speed_duplex(speed, duplex)
- # Delete old IPv6 EUI64 addresses before changing MAC
-
- # Change interface MAC address - re-set to real hardware address (hw-id)
- # if custom mac is removed. Skip if bond member.
- if 'is_bond_member' not in config:
- mac = config.get('hw_id')
- if 'mac' in config:
- mac = config.get('mac')
- if mac:
- self.set_mac(mac)
-
- # Add IPv6 EUI-based addresses
- tmp = jmespath.search('ipv6.address.eui64', config)
- if tmp:
- # XXX: T2636 workaround: convert string to a list with one element
- if isinstance(tmp, str):
- tmp = [tmp]
- for addr in tmp:
- self.add_ipv6_eui64_address(addr)
-
# re-add ourselves to any bridge we might have fallen out of
if 'is_bridge_member' in config:
bridge = config.get('is_bridge_member')