def set_coalesce(devname, **kwargs):
 try:
  coalesce = ethtool.get_coalesce(devname)
 except IOError:
  log.error('Interrupt coalescing not supported on {0}'.format(devname))
  return 'Not supported'
 changed = False
 for (param, value) in kwargs.items():
  if (param in ethtool_coalesce_map):
   param = ethtool_coalesce_map[param]
   if (param in coalesce):
    if (coalesce[param] != value):
     coalesce[param] = value
     changed = True
 try:
  if changed:
   ethtool.set_coalesce(devname, coalesce)
  return show_coalesce(devname)
 except IOError:
  log.error('Invalid coalesce arguments on {0}: {1}'.format(devname, coalesce))
  return 'Invalid arguments'

def set_coalesce ( devname , ** kwargs ) : try : coalesce = ethtool . get_coalesce ( devname ) except IOError : log . error ( 'Interrupt coalescing not supported on {0}' . format ( devname ) ) return 'Not supported' changed = False for ( param , value ) in kwargs . items ( ) : if ( param in ethtool_coalesce_map ) : param = ethtool_coalesce_map [ param ] if ( param in coalesce ) : if ( coalesce [ param ] != value ) : coalesce [ param ] = value changed = True try : if changed : ethtool . set_coalesce ( devname , coalesce ) return show_coalesce ( devname ) except IOError : log . error ( 'Invalid coalesce arguments on {0}: {1}' . format ( devname , coalesce ) ) return 'Invalid arguments'
changes the coalescing settings of the specified network device cli example: .