diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-10 22:33:25 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-07-11 08:17:50 +0200 |
commit | 872423e103a756ec470846108143e28f70c4d254 (patch) | |
tree | 110f89119746df550021c59374546d8e6221d625 /python | |
parent | 84f2c0bf47315f1da7bff185621aa07f3540e440 (diff) | |
download | vyos-1x-872423e103a756ec470846108143e28f70c4d254.tar.gz vyos-1x-872423e103a756ec470846108143e28f70c4d254.zip |
bond: T1557: re-add miimon configuration - lost in translation
(cherry picked from commit cabfd006bed9cd2d1512cb313616a8e97fe29b9e)
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/ifconfig/bond.py | 17 |
1 files changed, 17 insertions, 0 deletions
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') |