'Return a list of available weigher names.
This function checks input weigher names against a predefined set
of acceptable weighers (all loaded weighers).  If input is None,
it uses CONF.scheduler_default_weighers instead.'

def _choose_backend_weighers(self, weight_cls_names):

    if (weight_cls_names is None):
        weight_cls_names = CONF.scheduler_default_weighers
    if (not isinstance(weight_cls_names, (list, tuple))):
        weight_cls_names = [weight_cls_names]
    good_weighers = []
    bad_weighers = []
    for weigher_name in weight_cls_names:
        found_class = False
        for cls in self.weight_classes:
            if (cls.__name__ == weigher_name):
                good_weighers.append(cls)
                found_class = True
                break
        if (not found_class):
            bad_weighers.append(weigher_name)
    if bad_weighers:
        raise exception.SchedulerHostWeigherNotFound(weigher_name=',    '.join(bad_weighers))
    return good_weighers
