summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-07 12:29:12 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-20 21:28:53 +0200
commita610e328750e3cfc23c29a2cafb40d7ef7082b13 (patch)
tree5cbdc864b0d036b92bb3ef60d3246b879016a187 /python/vyos/ifconfig.py
parent4ae44c074e15fa102718d5a4512c23db447d6dc8 (diff)
downloadvyos-1x-a610e328750e3cfc23c29a2cafb40d7ef7082b13.tar.gz
vyos-1x-a610e328750e3cfc23c29a2cafb40d7ef7082b13.zip
ethernet: T1637: initial rewrite in XML/Python style
Diffstat (limited to 'python/vyos/ifconfig.py')
-rw-r--r--python/vyos/ifconfig.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 524c0f276..7181ff42f 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -1047,8 +1047,18 @@ class VLANIf(Interface):
tmp.remove()
-class BondIf(VLANIf):
+class EthernetIf(VLANIf):
+ """
+ Abstraction of a Linux Ethernet Interface
+ """
+ def __init__(self, ifname):
+ super().__init__(ifname)
+ def remove(self):
+ raise OSError('Ethernet interfaces can not be removed')
+
+
+class BondIf(VLANIf):
"""
The Linux bonding driver provides a method for aggregating multiple network
interfaces into a single logical "bonded" interface. The behavior of the
@@ -1056,7 +1066,6 @@ class BondIf(VLANIf):
either hot standby or load balancing services. Additionally, link integrity
monitoring may be performed.
"""
-
def __init__(self, ifname):
super().__init__(ifname, type='bond')