'Returns DVR serviced ports on a given subnet in the input host
This method returns ports that need to be serviced by DVR.
:param context: rpc request context
:param host: host id to match and extract ports of interest
:param subnet: subnet id to match and extract ports of interest
:returns: list -- Ports on the given subnet in the input host'

@log_helpers.log_method_call
@db_api.retry_if_session_inactive()
def get_ports_on_host_by_subnet(self, context, host, subnet):

    filters = {'fixed_ips': {'subnet_id': [subnet]}, portbindings.HOST_ID: [host]}
    ports_query = self.plugin._get_ports_query(context, filters=filters)
    owner_filter = or_(models_v2.Port.device_owner.startswith(constants.DEVICE_OWNER_COMPUTE_PREFIX), models_v2.Port.device_owner.in_(utils.get_other_dvr_serviced_device_owners()))
    ports_query = ports_query.filter(owner_filter)
    ports = [self.plugin._make_port_dict(port, process_extensions=False) for port in ports_query.all()]
    LOG.debug('Returning    list    of    dvr    serviced    ports    on    host    %(host)s    for    subnet    %(subnet)s    ports    %(ports)s', {'host': host, 'subnet': subnet, 'ports': ports})
    return ports
