'Update an existing record.
:param record: Record to update.
:type  record: :class:`Record`
:param name: Record name without the domain name (e.g. www).
Note: If you want to create a record for a base domain
name, you should specify empty string (\'\') for this
argument.
:type  name: ``str``
:param type: DNS record type (A, AAAA, ...).
:type  type: :class:`RecordType`
:param data: Data for the record (depends on the record type).
:type  data: ``str``
:param extra: (optional) Extra attributes (driver specific).
:type  extra: ``dict``
:rtype: :class:`Record`'

def update_record(self, record, name, type, data, extra=None):

    zone = record.zone
    r_json = {'name': name, 'content': data}
    if (extra is not None):
        r_json.update(extra)
    r_data = json.dumps({'record': r_json})
    response = self.connection.request(('/v1/domains/%s/records/%s' % (zone.id, record.id)), method='PUT', data=r_data)
    record = self._to_record(response.object, zone=zone)
    return record
