'Retrieve a zone object by the domain name.
:param domain: The domain which should be used
:type  domain: ``str``
:rtype: :class:`Zone`'

def ex_get_zone_by_domain(self, domain):

    path = (API_ROOT + ('zones/%s.xml' % domain))
    self.connection.set_context({'resource': 'zone', 'id': domain})
    data = self.connection.request(path).object
    zone = self._to_zone(elem=data)
    return zone
