'Finds backends that supports the group type.
Returns a list of backends that meet the required specs,
ordered by their fitness.'

def _get_weighted_candidates_by_group_type(self, context, group_spec, group_filter_properties=None):

    elevated = context.elevated()
    weighed_backends = []
    volume_properties = group_spec['volume_properties']
    resource_properties = volume_properties.copy()
    group_type = group_spec.get('group_type', None)
    resource_type = group_spec.get('group_type', None)
    group_spec.update({'resource_properties': resource_properties})
    config_options = self._get_configuration_options()
    if (group_filter_properties is None):
        group_filter_properties = {}
    self._populate_retry(group_filter_properties, resource_properties)
    group_filter_properties.update({'context': context, 'request_spec': group_spec, 'config_options': config_options, 'group_type': group_type, 'resource_type': resource_type})
    self.populate_filter_properties(group_spec, group_filter_properties)
    all_backends = self.host_manager.get_all_backend_states(elevated)
    if (not all_backends):
        return []
    backends = self.host_manager.get_filtered_backends(all_backends, group_filter_properties)
    if (not backends):
        return []
    LOG.debug('Filtered    %s', backends)
    weighed_backends = self.host_manager.get_weighed_backends(backends, group_filter_properties)
    if (not weighed_backends):
        return []
    return weighed_backends
