def get_designate_zone_objects(designate_client, domain_name=None,
                               domain_id=None):
    """Get all domains matching a given domain_name or domain_id.

    :param designate_client: Client to query designate
    :type designate_client: designateclient.v2.Client
    :param domain_name: Name of domain to lookup
    :type domain_name: str
    :param domain_id: UUID of domain to lookup
    :type domain_id: str
    :returns: List of Domain objects matching domain_name or domain_id
    :rtype: [designateclient.v2.domains.Domain,]
    """
    all_zones = designate_client.zones.list()
    a = [z for z in all_zones
         if z['name'] == domain_name or z['id'] == domain_id]
    return a