def validate_weigher(weigher):
 weight_classes = CONF.filter_scheduler.weight_classes
 if ('nova.scheduler.weights.all_weighers' in weight_classes):
  return True
 return (weigher in weight_classes)

def validate_weigher ( weigher ) : weight_classes = CONF . filter_scheduler . weight_classes if ( 'nova.scheduler.weights.all_weighers' in weight_classes ) : return True return ( weigher in weight_classes )
validates that the weigher is configured in the default weighers .