'Check for existence of dvr serviceable ports on host
:param context: request context
:param host: host to look ports on
:param subnet_ids: IDs of subnets to look ports on
:return: return True if dvr serviceable port exists on host,
otherwise return False'

def _check_dvr_serviceable_ports_on_host(self, context, host, subnet_ids):

    if (not subnet_ids):
        return False
    Binding = ml2_models.PortBinding
    IPAllocation = models_v2.IPAllocation
    Port = models_v2.Port
    query = context.session.query(Binding)
    query = query.join(Binding.port)
    query = query.join(Port.fixed_ips)
    query = query.filter(IPAllocation.subnet_id.in_(subnet_ids))
    device_filter = or_(models_v2.Port.device_owner.startswith(n_const.DEVICE_OWNER_COMPUTE_PREFIX), models_v2.Port.device_owner.in_(n_utils.get_other_dvr_serviced_device_owners()))
    query = query.filter(device_filter)
    host_filter = or_((ml2_models.PortBinding.host == host), ml2_models.PortBinding.profile.contains(host))
    query = query.filter(host_filter)
    return (query.first() is not None)
