def evaluate_filter_op(value, operator, threshold):
 if (operator == 'gt'):
  return (value > threshold)
 elif (operator == 'gte'):
  return (value >= threshold)
 elif (operator == 'lt'):
  return (value < threshold)
 elif (operator == 'lte'):
  return (value <= threshold)
 elif (operator == 'neq'):
  return (value != threshold)
 elif (operator == 'eq'):
  return (value == threshold)
 msg = _('Unable to filter on a unknown operator.')
 raise exception.InvalidFilterOperatorValue(msg)

def evaluate_filter_op ( value , operator , threshold ) : if ( operator == 'gt' ) : return ( value > threshold ) elif ( operator == 'gte' ) : return ( value >= threshold ) elif ( operator == 'lt' ) : return ( value < threshold ) elif ( operator == 'lte' ) : return ( value <= threshold ) elif ( operator == 'neq' ) : return ( value != threshold ) elif ( operator == 'eq' ) : return ( value == threshold ) msg = _ ( 'Unable to filter on a unknown operator.' ) raise exception . InvalidFilterOperatorValue ( msg )
evaluate a comparison operator .