summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-21 21:57:26 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-25 15:36:44 +0200
commit0e2304e0ec903a8183307b51f275097cd87a6995 (patch)
tree2f27453677a49649bbfb97ad8bbd081f685a3c01 /python
parentc9ba8952ad7c373d633516933ddb97e178e339c8 (diff)
downloadvyos-1x-0e2304e0ec903a8183307b51f275097cd87a6995.tar.gz
vyos-1x-0e2304e0ec903a8183307b51f275097cd87a6995.zip
ifconfig: T2653: move bridge member check to base class
This test is reused by a lot of instances and thus must be moved to the base class.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/ethernet.py5
-rw-r--r--python/vyos/ifconfig/interface.py4
2 files changed, 4 insertions, 5 deletions
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py
index 1725116e2..7641e82fd 100644
--- a/python/vyos/ifconfig/ethernet.py
+++ b/python/vyos/ifconfig/ethernet.py
@@ -299,11 +299,6 @@ class EthernetIf(Interface):
duplex = config.get('duplex')
self.set_speed_duplex(speed, duplex)
- # re-add ourselves to any bridge we might have fallen out of
- if 'is_bridge_member' in config:
- bridge = config.get('is_bridge_member')
- self.add_to_bridge(bridge)
-
# remove no longer required 802.1ad (Q-in-Q VLANs)
for vif_s_id in config.get('vif_s_remove', {}):
self.del_vlan(vif_s_id)
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index ea770af23..2d2017b7a 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -946,6 +946,10 @@ class Interface(Control):
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')
+ self.add_to_bridge(bridge)
# Interface administrative state
state = 'down' if 'disable' in config else 'up'