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__ | @requires: api_key, api_secret |
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. |
@requires: api_key, api_secret
>>> driver = DummyDNSDriver('key', 'secret') >>> driver.list_record_types() [0]
>>> driver = DummyDNSDriver('key', 'secret') >>> driver.list_zones() []
Return a list of records for the provided zone. @type zone: C{Zone} @param zone: Zone to list records for. @return: A list of C{Record} instances.
>>> driver = DummyDNSDriver('key', 'secret') >>> driver.get_zone(zone_id='foobar') ... #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ZoneDoesNotExistError:
>>> driver = DummyDNSDriver('key', 'secret') >>> driver.get_record(zone_id='doesnotexist', record_id='exists') ... #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ZoneDoesNotExistError:
>>> 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:
>>> 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:
>>> 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:
>>> 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: