From 872423e103a756ec470846108143e28f70c4d254 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 (cherry picked from commit cabfd006bed9cd2d1512cb313616a8e97fe29b9e) --- 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 dbe089801..54e47f18a 100644 --- a/python/vyos/ifconfig/bond.py +++ b/python/vyos/ifconfig/bond.py @@ -176,6 +176,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. @@ -356,6 +371,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