def bw_usage_update(context, uuid, mac, start_period, bw_in, bw_out, last_ctr_in, last_ctr_out, last_refreshed=None, update_cells=True):
 rv = IMPL.bw_usage_update(context, uuid, mac, start_period, bw_in, bw_out, last_ctr_in, last_ctr_out, last_refreshed=last_refreshed)
 if update_cells:
  try:
   cells_rpcapi.CellsAPI().bw_usage_update_at_top(context, uuid, mac, start_period, bw_in, bw_out, last_ctr_in, last_ctr_out, last_refreshed)
  except Exception:
   LOG.exception(_('Failed to notify cells of bw_usage update'))
 return rv

def bw_usage_update ( context , uuid , mac , start_period , bw_in , bw_out , last_ctr_in , last_ctr_out , last_refreshed = None , update_cells = True ) : rv = IMPL . bw_usage_update ( context , uuid , mac , start_period , bw_in , bw_out , last_ctr_in , last_ctr_out , last_refreshed = last_refreshed ) if update_cells : try : cells_rpcapi . CellsAPI ( ) . bw_usage_update_at_top ( context , uuid , mac , start_period , bw_in , bw_out , last_ctr_in , last_ctr_out , last_refreshed ) except Exception : LOG . exception ( _ ( 'Failed to notify cells of bw_usage update' ) ) return rv
update cached bandwidth usage for an instances network based on mac address .