l.d.d.d.DummyDNSDriver(DNSDriver) : class documentation

Part of libcloud.dns.drivers.dummy View Source View In Hierarchy

Dummy DNS driver.

>>> from libcloud.dns.drivers.dummy import DummyDNSDriver
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.name
'Dummy DNS Provider'
Method __init__
Method list_record_types
>>> driver = DummyDNSDriver('key', 'secret') >>> driver.list_record_types() [0]
Method list_zones
>>> driver = DummyDNSDriver('key', 'secret') >>> driver.list_zones() []
Method list_records Return a list of records for the provided zone.
Method get_zone No summary
Method get_record No summary
Method create_zone No summary
Method create_record No summary
Method delete_zone No summary
Method delete_record No summary

Inherited from DNSDriver:

Method update_zone Update en existing zone.
Method update_record Update an existing record.
Method _string_to_record_type Return a string representation of a DNS record type to a libcloud RecordType ENUM.

Inherited from BaseDriver (via DNSDriver):

Method _ex_connection_class_kwargs Return extra connection keyword arguments which are passed to the Connection class constructor.
def __init__(self, api_key, api_secret): (source)
ParameterskeyAPI key or username to used (type: str)
secretSecret password to be used (type: str)
secureWeither to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default. (type: bool)
hostOverride hostname used for connections. (type: str)
portOverride port used for connections. (type: int)
api_versionOptional API version. Only used by drivers which support multiple API versions. (type: str)
def list_record_types(self): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.list_record_types()
[0]
def list_zones(self): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.list_zones()
[]
def list_records(self, zone): (source)
Return a list of records for the provided zone.
ParameterszoneZone to list records for. (type: Zone)
ReturnsA list of Record instances.
def get_zone(self, zone_id): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.get_zone(zone_id='foobar')
... #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
ZoneDoesNotExistError:
def get_record(self, zone_id, record_id): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.get_record(zone_id='doesnotexist', record_id='exists')
... #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
ZoneDoesNotExistError:
def create_zone(self, domain, type='master', ttl=None, extra=None): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> zone
<Zone: domain=apache.org, ttl=100, provider=Dummy DNS Provider ...>
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
... #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
ZoneAlreadyExistsError:
def create_record(self, name, zone, type, data, extra=None): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
>>> record #doctest: +ELLIPSIS
<Record: zone=id-apache.org, name=libcloud, type=A, data=127.0.0.1...>
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
... #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
RecordAlreadyExistsError:
def delete_zone(self, zone): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> driver.delete_zone(zone)
True
>>> driver.delete_zone(zone) #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
ZoneDoesNotExistError:
def delete_record(self, record): (source)
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
>>> driver.delete_record(record)
True
>>> driver.delete_record(record) #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
RecordDoesNotExistError:
API Documentation for libcloud, generated by pydoctor at 2012-07-15 18:47:55.