'Create a 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 zone: Zone which the records will be created for.
:type zone: :class:`Zone`
:param type: DNS record type ( \'A\', \'AAAA\', \'CNAME\', \'MX\', \'NS\',
\'PTR\', \'SOA\', \'SRV\', \'TXT\').
:type  type: :class:`RecordType`
:param data: Data for the record (depends on the record type).
:type  data: ``str``
:param extra: (optional) Extra attributes (\'prio\', \'ttl\').
:type  extra: ``dict``
:rtype: :class:`Record`'

def create_record(self, name, zone, type, data, extra=None):

    action = '/Record.Create'
    data = {'sub_domain': name, 'value': data, 'record_type': type, 'domain_id': zone.id}
    if (extra is not None):
        data.update(extra)
    try:
        response = self._make_request(action=action, method='POST', data=data)
    except DNSPodException:
        e = sys.exc_info()[1]
        if (e.message == 'Record    impacted,    same    record    exists    or    CNAME/URL    impacted'):
            raise RecordAlreadyExistsError(record_id='', driver=self, value=name)
        raise e
    record_id = response.object['record'].get('id')
    record = self.get_record(zone_id=zone.id, record_id=record_id)
    return record
