def _parse_settings_bond_6(opts, iface, bond_def):
 bond = {'mode': '6'}
 for binding in ['miimon', 'downdelay', 'updelay']:
  if (binding in opts):
   try:
    int(opts[binding])
    bond.update({binding: opts[binding]})
   except Exception:
    _raise_error_iface(iface, binding, ['integer'])
  else:
   _log_default_iface(iface, binding, bond_def[binding])
   bond.update({binding: bond_def[binding]})
 if ('use_carrier' in opts):
  if (opts['use_carrier'] in _CONFIG_TRUE):
   bond.update({'use_carrier': '1'})
  elif (opts['use_carrier'] in _CONFIG_FALSE):
   bond.update({'use_carrier': '0'})
  else:
   valid = (_CONFIG_TRUE + _CONFIG_FALSE)
   _raise_error_iface(iface, 'use_carrier', valid)
 else:
  _log_default_iface(iface, 'use_carrier', bond_def['use_carrier'])
  bond.update({'use_carrier': bond_def['use_carrier']})
 return bond

def _parse_settings_bond_6 ( opts , iface , bond_def ) : bond = { 'mode' : '6' } for binding in [ 'miimon' , 'downdelay' , 'updelay' ] : if ( binding in opts ) : try : int ( opts [ binding ] ) bond . update ( { binding : opts [ binding ] } ) except Exception : _raise_error_iface ( iface , binding , [ 'integer' ] ) else : _log_default_iface ( iface , binding , bond_def [ binding ] ) bond . update ( { binding : bond_def [ binding ] } ) if ( 'use_carrier' in opts ) : if ( opts [ 'use_carrier' ] in _CONFIG_TRUE ) : bond . update ( { 'use_carrier' : '1' } ) elif ( opts [ 'use_carrier' ] in _CONFIG_FALSE ) : bond . update ( { 'use_carrier' : '0' } ) else : valid = ( _CONFIG_TRUE + _CONFIG_FALSE ) _raise_error_iface ( iface , 'use_carrier' , valid ) else : _log_default_iface ( iface , 'use_carrier' , bond_def [ 'use_carrier' ] ) bond . update ( { 'use_carrier' : bond_def [ 'use_carrier' ] } ) return bond
filters given options and outputs valid settings for bond6 .