summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/ifconfig.py')
-rw-r--r--python/vyos/ifconfig.py26
1 files changed, 2 insertions, 24 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index afc7bbbf8..f55c5fd5c 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -1516,28 +1516,8 @@ class BondIf(VLANIf):
.format(self._ifname))
return list(map(str, slaves.split()))
- @property
- def primary(self):
- """
- A string (eth0, eth2, etc) specifying which slave is the primary
- device. The specified device will always be the active slave while it
- is available. Only when the primary is off-line will alternate devices
- be used. This is useful when one slave is preferred over another, e.g.,
- when one slave has higher throughput than another.
-
- The primary option is only valid for active-backup, balance-tlb and
- balance-alb mode.
-
- Example:
- >>> from vyos.ifconfig import BondIf
- >>> BondIf('bond0').primary
- 'eth1'
- """
- return self._read_sysfs('/sys/class/net/{}/bonding/primary'
- .format(self._ifname))
- @primary.setter
- def primary(self, interface):
+ def set_primary(self, interface):
"""
A string (eth0, eth2, etc) specifying which slave is the primary
device. The specified device will always be the active slave while it
@@ -1550,9 +1530,7 @@ class BondIf(VLANIf):
Example:
>>> from vyos.ifconfig import BondIf
- >>> BondIf('bond0').primary = 'eth2'
- >>> BondIf('bond0').primary
- 'eth2'
+ >>> BondIf('bond0').set_primary('eth2')
"""
if not interface:
# reset primary interface