

def create_record(self, name, zone, type, data, extra=None):
    "\n        >>> driver = DummyDNSDriver('key', 'secret')\n        >>> zone = driver.create_zone(domain='apache.org', type='master',\n        ...                           ttl=100)\n        >>> record = driver.create_record(name='libcloud', zone=zone,\n        ...                               type=RecordType.A, data='127.0.0.1')\n        >>> record #doctest: +ELLIPSIS\n        <Record: zone=apache.org, name=libcloud, type=A, data=127.0.0.1...>\n        >>> record = driver.create_record(name='libcloud', zone=zone,\n        ...                               type=RecordType.A, data='127.0.0.1')\n        ... #doctest: +IGNORE_EXCEPTION_DETAIL\n        Traceback (most recent call last):\n        RecordAlreadyExistsError:\n\n        @inherits: :class:`DNSDriver.create_record`\n        "
    id = ('id-%s' % name)
    zone = self.get_zone(zone_id=zone.id)
    if (id in self._zones[zone.id]['records']):
        raise RecordAlreadyExistsError(record_id=id, value=None, driver=self)
    record = Record(id=id, name=name, type=type, data=data, extra=zone, zone=zone, driver=self)
    self._zones[zone.id]['records'][id] = record
    return record

dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/dummy.py DummyDNSDriver.create_record/VarMisuse@103/379 `extra`->`zone`