

def create_zone(self, domain, type='master', ttl=None, extra=None):
    "\n        >>> driver = DummyDNSDriver('key', 'secret')\n        >>> zone = driver.create_zone(domain='apache.org', type='master',\n        ...                           ttl=100)\n        >>> zone\n        <Zone: domain=apache.org, ttl=100, provider=Dummy DNS Provider ...>\n        >>> zone = driver.create_zone(domain='apache.org', type='master',\n        ...                           ttl=100)\n        ... #doctest: +IGNORE_EXCEPTION_DETAIL\n        Traceback (most recent call last):\n        ZoneAlreadyExistsError:\n\n        @inherits: :class:`DNSDriver.create_zone`\n        "
    id = ('id-%s' % domain)
    if (id in self._zones):
        raise ZoneAlreadyExistsError(zone_id=id, value=None, driver=self)
    zone = Zone(id=id, domain=domain, type=type, ttl=ttl, extra={
        
    }, driver=self)
    self._zones[id] = {
        'zone': zone,
        'records': {
            
        },
    }
    return zone

dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/dummy.py DummyDNSDriver.create_zone/original