'Filter hosts with access to network_id.
This method returns a subset of candidate_hosts with the ones with
network access to network_id.
A plugin can overload this method to define its own host network_id
based filter.'

@db_api.retry_if_session_inactive()
def filter_hosts_with_network_access(self, context, network_id, candidate_hosts):

    return candidate_hosts
