'Check if the specified backend passes the filters.'

def backend_passes_filters(self, context, backend, request_spec, filter_properties):

    weighed_backends = self._get_weighted_candidates(context, request_spec, filter_properties)
    ignore_pool = (not bool(utils.extract_host(backend, 'pool')))
    for weighed_backend in weighed_backends:
        backend_id = weighed_backend.obj.backend_id
        if ignore_pool:
            backend_id = utils.extract_host(backend_id)
        if (backend_id == backend):
            return weighed_backend.obj
    volume_id = request_spec.get('volume_id', '??volume_id    missing??')
    raise exception.NoValidBackend(reason=(_('Cannot    place    volume    %(id)s    on    %(backend)s') % {'id': volume_id, 'backend': backend}))
