1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

addons: bond: adding attribute bond-(up|down)delay

Ticket: CM-8424
Reviewed By: Roopa, Julien
Testing Done: using the config mentioned in bug

updelay

    Specifies the time, in milliseconds, to wait before enabling a
    slave after a link recovery has been detected.  This option is
    only valid for the miimon link monitor.

downdelay

    Specifies the time, in milliseconds, to wait before disabling
    a slave after a link failure has been detected.  This option
    is only valid for the miimon link monitor.

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>

Conflicts:
	ifupdownaddons/bondutil.py
This commit is contained in:
Nikhil
2017-01-30 14:09:58 -08:00
parent c09025b2b0
commit c3fc3b8f00
2 changed files with 36 additions and 3 deletions

View File

@@ -105,7 +105,16 @@ class bond(moduleBase):
'example' : ['bond-slaves swp1 swp2',
'bond-slaves glob swp1-2',
'bond-slaves regex (swp[1|2)'],
'aliases': ['bond-ports']}}}
'aliases': ['bond-ports']},
'bond-updelay' :
{'help' : 'bond updelay',
'default' : '0',
'example' : ['bond-updelay 100']},
'bond-downdelay':
{'help' : 'bond downdelay',
'default' : '0',
'example' : ['bond-downdelay 100']}
}}
_bond_mode_num = {'0': 'balance-rr',
'1': 'active-backup',
@@ -231,7 +240,9 @@ class bond(moduleBase):
('bond-ad-actor-system' , 'ad_actor_system'),
('bond-ad-sys-priority' , 'ad_actor_sys_prio'),
('bond-ad-actor-sys-prio' , 'ad_actor_sys_prio'),
('bond-lacp-bypass-allow', 'lacp_bypass')])
('bond-lacp-bypass-allow', 'lacp_bypass'),
('bond-updelay', 'updelay'),
('bond-downdelay', 'downdelay')])
linkup = self.ipcmd.is_link_up(ifaceobj.name)
try:
# order of attributes set matters for bond, so
@@ -408,7 +419,11 @@ class bond(moduleBase):
'bond-num-unsol-na' :
self.bondcmd.get_num_unsol_na(bondname),
'bond-num-grat-arp' :
self.bondcmd.get_num_grat_arp(bondname)}
self.bondcmd.get_num_grat_arp(bondname),
'bond-updelay' :
self.bondcmd.get_updelay(bondname),
'bond-downdelay' :
self.bondcmd.get_downdelay(bondname)}
slaves = self.bondcmd.get_slaves(bondname)
if slaves:
bondattrs['bond-slaves'] = slaves