def wait_bonds_lp_interval(): """ mode 4 (802.3ad) is a relevant bond mode where bonds will attempt to synchronize with each other, sending learning packets to the slaves in intervals set via lp_interval """ GRACE_PERIOD = 1 LACP_BOND_MODE = '4' default_lp_interval = int( getDefaultBondingOptions(LACP_BOND_MODE)['lp_interval'][0]) time.sleep(default_lp_interval + GRACE_PERIOD)
def wait_bonds_lp_interval(): """ mode 4 (802.3ad) is a relevant bond mode where bonds will attempt to synchronize with each other, sending learning packets to the slaves in intervals set via lp_interval """ GRACE_PERIOD = 1 LACP_BOND_MODE = '4' default_lp_interval = int( getDefaultBondingOptions(LACP_BOND_MODE)['lp_interval'][0]) time.sleep(default_lp_interval + GRACE_PERIOD)
def _validate_bond_options(bond_options): mode = 'balance-rr' try: for option in bond_options.split(): key, value = option.split('=', 1) if key == 'mode': mode = value except ValueError: raise ne.ConfigNetworkError( ne.ERR_BAD_BONDING, 'Error parsing bonding options: %r' % bond_options) mode = sysfs_options.numerize_bond_mode(mode) defaults = sysfs_options.getDefaultBondingOptions(mode) for option in bond_options.split(): key, _ = option.split('=', 1) if key not in defaults: raise ne.ConfigNetworkError( ne.ERR_BAD_BONDING, '%r is not a valid bonding option' % key)
def _validate_bond_options(bond_options): mode = 'balance-rr' try: for option in bond_options.split(): key, value = option.split('=', 1) if key == 'mode': mode = value except ValueError: raise ne.ConfigNetworkError( ne.ERR_BAD_BONDING, 'Error parsing bonding options: %r' % bond_options ) mode = sysfs_options.numerize_bond_mode(mode) defaults = sysfs_options.getDefaultBondingOptions(mode) for option in bond_options.split(): key, _ = option.split('=', 1) if key not in defaults and key != 'custom': raise ne.ConfigNetworkError( ne.ERR_BAD_BONDING, '%r is not a valid bonding option' % key)