diff options
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/ifconfig.py | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index a155ce572..2c627f0b0 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -1097,27 +1097,8 @@ class BondIf(VLANIf): i = Interface(slave['ifname']) i.set_state(slave['state']) - @property - def xmit_hash_policy(self): - """ - Selects the transmit hash policy to use for slave selection in - balance-xor, 802.3ad, and tlb modes. Possible values are: layer2, - layer2+3, layer3+4, encap2+3, encap3+4. - - The default value is layer2 - - Example: - >>> from vyos.ifconfig import BondIf - >>> BondIf('bond0').xmit_hash_policy - 'layer3+4' - """ - # Linux Kernel appends has policy value to string, e.g. 'layer3+4 1', - # so remove the later part and only return the mode as string. - return self._read_sysfs('/sys/class/net/{}/bonding/xmit_hash_policy' - .format(self._ifname)).split()[0] - @xmit_hash_policy.setter - def xmit_hash_policy(self, mode): + def set_hash_policy(self, mode): """ Selects the transmit hash policy to use for slave selection in balance-xor, 802.3ad, and tlb modes. Possible values are: layer2, @@ -1127,9 +1108,7 @@ class BondIf(VLANIf): Example: >>> from vyos.ifconfig import BondIf - >>> BondIf('bond0').xmit_hash_policy = 'layer2+3' - >>> BondIf('bond0').proxy_arp - '1' + >>> BondIf('bond0').set_hash_policy('layer2+3') """ if not mode in ['layer2', 'layer2+3', 'layer3+4', 'encap2+3', 'encap3+4']: raise ValueError("Value out of range") |