'Update an existing zone.
Provider API docs:
https://www.zerigo.com/docs/apis/dns/1.1/zones/update
@inherits: :class:`DNSDriver.update_zone`'

def update_zone(self, zone, domain=None, type=None, ttl=None, extra=None):

    if domain:
        raise LibcloudError('Domain    cannot    be    changed', driver=self)
    path = (API_ROOT + ('zones/%s.xml' % zone.id))
    zone_elem = self._to_zone_elem(domain=domain, type=type, ttl=ttl, extra=extra)
    response = self.connection.request(action=path, data=ET.tostring(zone_elem), method='PUT')
    assert (response.status == httplib.OK)
    merged = merge_valid_keys(params=copy.deepcopy(zone.extra), valid_keys=VALID_ZONE_EXTRA_PARAMS, extra=extra)
    updated_zone = get_new_obj(obj=zone, klass=Zone, attributes={'type': type, 'ttl': ttl, 'extra': merged})
    return updated_zone
