From cabfd006bed9cd2d1512cb313616a8e97fe29b9e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 10 Jul 2022 22:33:25 +0200 Subject: bond: T1557: re-add miimon configuration - lost in translation --- python/vyos/ifconfig/bond.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'python/vyos/ifconfig') diff --git a/python/vyos/ifconfig/bond.py b/python/vyos/ifconfig/bond.py index c1610ee67..33745ceb3 100644 --- a/python/vyos/ifconfig/bond.py +++ b/python/vyos/ifconfig/bond.py @@ -179,6 +179,21 @@ class BondIf(Interface): """ self.set_interface('bond_lacp_rate', slow_fast) + def set_miimon_interval(self, interval): + """ + Specifies the MII link monitoring frequency in milliseconds. This + determines how often the link state of each slave is inspected for link + failures. A value of zero disables MII link monitoring. A value of 100 + is a good starting point. + + The default value is 0. + + Example: + >>> from vyos.ifconfig import BondIf + >>> BondIf('bond0').set_miimon_interval('100') + """ + return self.set_interface('bond_miimon', interval) + def set_arp_interval(self, interval): """ Specifies the ARP link monitoring frequency in milliseconds. @@ -372,6 +387,8 @@ class BondIf(Interface): if 'shutdown_required' in config: self.set_admin_state('down') + # Specifies the MII link monitoring frequency in milliseconds + self.set_miimon_interval('250') # Bonding transmit hash policy value = config.get('hash_policy') -- cgit v1.2.3