summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-01 19:43:36 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-01 19:43:36 +0100
commitfb7c8f0965b0060e9e5ba4fadf9260a9b5ba2894 (patch)
tree21ff622b5619d06036927428e971de11066af8b3 /python
parent95f7a440031c58b47fd88d6aa9fac3ddaf6ae231 (diff)
downloadvyos-1x-fb7c8f0965b0060e9e5ba4fadf9260a9b5ba2894.tar.gz
vyos-1x-fb7c8f0965b0060e9e5ba4fadf9260a9b5ba2894.zip
Revert "ifconfig: T2002: T2009: bugfix for always disabled Ethernet/Bond interfaces"
This reverts commit 95f7a440031c58b47fd88d6aa9fac3ddaf6ae231.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 5d528df36..12ab4548d 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -1067,11 +1067,9 @@ class VLANIf(Interface):
It makes only sense to change the state of an individual VLAN if the
parent interface is up
"""
- parent_state = Interface(self._ifname).get_state()
+ parent_state = self.get_state()
if parent_state == 'up':
super().set_state(state)
- else:
- self._debug_msg('Parent interface down -> VLAN interface down')
def add_vlan(self, vlan_id, ethertype='', ingress_qos='', egress_qos=''):
"""
@@ -1148,17 +1146,6 @@ class EthernetIf(VLANIf):
def __init__(self, ifname):
super().__init__(ifname)
- def set_state(self, state):
- """
- Enable (up) / Disable (down) an interface
- """
-
- # As we inherit from VLANIf we need to call the Interface.set_state()
- # method directly as otherwise the interface will be dead-locked and
- # always stay down.
- Interface.set_state(self, state)
-
-
def get_driver_name(self):
"""
Return the driver name used by NIC. Some NICs don't support all
@@ -1391,15 +1378,6 @@ class BondIf(VLANIf):
i = Interface(slave['ifname'])
i.set_state(slave['state'])
- def set_state(self, state):
- """
- Enable (up) / Disable (down) an interface
- """
-
- # As we inherit from VLANIf we need to call the Interface.set_state()
- # method directly as otherwise the interface will be dead-locked and
- # always stay down.
- Interface.set_state(self, state)
def set_hash_policy(self, mode):
"""