libcloud.dns.drivers package

Submodules

libcloud.dns.drivers.auroradns module

AuroraDNS DNS Driver

class libcloud.dns.drivers.auroradns.AuroraDNSConnection(user_id, key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: libcloud.common.base.ConnectionUserAndKey

calculate_auth_signature(secret_key, method, url, timestamp)[source]
gen_auth_header(api_key, secret_key, method, url, timestamp)[source]
host = 'api.auroradns.eu'
request(action, params=None, data='', headers=None, method='GET')[source]
responseCls

alias of AuroraDNSResponse

class libcloud.dns.drivers.auroradns.AuroraDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

HEALTHCHECK_TYPE_MAP = {'HTTP': 'HTTP', 'TCP': 'TCP', 'HTTPS': 'HTTPS'}
RECORD_TYPE_MAP = {'A': 'A', 'TLSA': 'TLSA', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'DS': 'DS', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'SSHFP': 'SSHFP', 'TXT': 'TXT', 'PTR': 'PTR'}
connectionCls

alias of AuroraDNSConnection

create_record(name, zone, type, data, extra=None)[source]
create_zone(domain, type='master', ttl=None, extra=None)[source]
delete_record(record)[source]
delete_zone(zone)[source]
ex_create_healthcheck(zone, type, hostname, port, path, interval, threshold, ipaddress=None, enabled=True, extra=None)[source]

Create a new Health Check in a zone

Parameters:
  • zone (Zone) – Zone in which the health check should be created
  • type (AuroraDNSHealthCheckType) – The type of health check to be created
  • hostname (str) – The hostname of the target to monitor
  • port (int) – The port of the target to monitor. E.g. 80 for HTTP
  • path (str) – The path of the target to monitor. Only used by HTTP at this moment. Usually this is simple /.
  • interval (int) – The interval of checks. 10, 30 or 60 seconds.
  • threshold (int) – The threshold of failures before the healthcheck is marked as failed.
  • ipaddress (str) – (optional) The IP Address of the target to monitor. You can pass a empty string if this is not required.
  • enabled (bool) – (optional) If this healthcheck is enabled to run
  • extra (dict) – (optional) Extra attributes (driver specific).
Returns:

AuroraDNSHealthCheck

ex_delete_healthcheck(healthcheck)[source]

Remove an existing Health Check

Parameters:zone (AuroraDNSHealthCheck) – The healthcheck which has to be removed
ex_get_healthcheck(zone, health_check_id)[source]

Get a single Health Check from a zone

Parameters:
  • zone (Zone) – Zone in which the health check is
  • health_check_id (str) – ID of the required health check
Returns:

AuroraDNSHealthCheck

ex_list_healthchecks(zone)[source]

List all Health Checks in a zone.

Parameters:zone (Zone) – Zone to list health checks for.
Returns:list of AuroraDNSHealthCheck
ex_update_healthcheck(healthcheck, type=None, hostname=None, ipaddress=None, port=None, path=None, interval=None, threshold=None, enabled=None, extra=None)[source]

Update an existing Health Check

Parameters:
  • zone (AuroraDNSHealthCheck) – The healthcheck which has to be updated
  • type (AuroraDNSHealthCheckType) – (optional) The type of health check to be created
  • hostname (str) – (optional) The hostname of the target to monitor
  • ipaddress (str) – (optional) The IP Address of the target to monitor. You can pass a empty string if this is not required.
  • port (int) – (optional) The port of the target to monitor. E.g. 80 for HTTP
  • path (str) – (optional) The path of the target to monitor. Only used by HTTP at this moment. Usually just ‘/’.
  • interval (int) – (optional) The interval of checks. 10, 30 or 60 seconds.
  • threshold (int) – (optional) The threshold of failures before the healthcheck is marked as failed.
  • enabled (bool) – (optional) If this healthcheck is enabled to run
  • extra (dict) – (optional) Extra attributes (driver specific).
Returns:

AuroraDNSHealthCheck

get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
iterate_records(zone)[source]
iterate_zones()[source]
list_record_types()[source]
name = 'AuroraDNS'
update_record(record, name, type, data, extra=None)[source]
website = 'https://www.pcextreme.nl/en/aurora/dns'
class libcloud.dns.drivers.auroradns.AuroraDNSHealthCheck(id, type, hostname, ipaddress, port, interval, path, threshold, health, enabled, zone, driver, extra=None)[source]

Bases: object

AuroraDNS Healthcheck resource.

Parameters:
  • id (str) – Healthcheck id
  • hostname (str) – Hostname or FQDN of the target
  • ipaddress (str) – IPv4 or IPv6 address of the target
  • port (int) – The port on the target to monitor
  • interval (int) – The interval of the health check
  • path (str) – The path to monitor on the target
  • threshold (int) – The threshold of before marking a check as failed
  • health (bool) – The current health of the health check
  • enabled (bool) – If the health check is currently enabled
  • zone (Zone) – Zone instance.
  • driver (DNSDriver) – DNSDriver instance.
  • extra (dict) – (optional) Extra attributes (driver specific).
delete()[source]
update(type=None, hostname=None, ipaddress=None, port=None, interval=None, path=None, threshold=None, enabled=None, extra=None)[source]
class libcloud.dns.drivers.auroradns.AuroraDNSHealthCheckType[source]

Bases: object

Healthcheck type.

HTTP = 'HTTP'
HTTPS = 'HTTPS'
TCP = 'TCP'
class libcloud.dns.drivers.auroradns.AuroraDNSResponse(response, connection)[source]

Bases: libcloud.common.base.JsonResponse

Parameters:
  • response (httplib.HTTPResponse) – HTTP response object. (optional)
  • connection (Connection) – Parent connection object.
parse_error()[source]
success()[source]
exception libcloud.dns.drivers.auroradns.HealthCheckDoesNotExistError(value, driver, health_check_id)[source]

Bases: libcloud.dns.drivers.auroradns.HealthCheckError

error_type = 'HealthCheckDoesNotExistError'
exception libcloud.dns.drivers.auroradns.HealthCheckError(value, driver, health_check_id)[source]

Bases: libcloud.common.types.LibcloudError

error_type = 'HealthCheckError'

libcloud.dns.drivers.buddyns module

BuddyNS DNS Driver

class libcloud.dns.drivers.buddyns.BuddyNSDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

connectionCls

alias of BuddyNSDNSConnection

create_zone(domain, type='master', ttl=None, extra=None)[source]
Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (This is not really used. See API docs for extra parameters)
  • ttl (int) – TTL for new records (This is used through the extra param)
  • extra – Extra attributes that are specific to the driver

such as ttl. :type extra: dict

Return type:Zone

Do not forget to pass the master in extra, extra = {‘master’:‘65.55.37.62’} for example.

delete_zone(zone)[source]
Parameters:zone (Zone) – Zone to be deleted.
Returns:Boolean
get_zone(zone_id)[source]
Parameters:zone_id – Zone domain name (e.g. example.com)
Returns:Zone
list_zones()[source]
name = 'BuddyNS DNS'
type = 'buddyns'
website = 'https://www.buddyns.com'

libcloud.dns.drivers.cloudflare module

class libcloud.dns.drivers.cloudflare.CloudFlareDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'URL': 'LOC', 'NS': 'NS', 'TXT': 'TXT', 'MX': 'MX', 'SPF': 'SPF'}
connectionCls

alias of CloudFlareDNSConnection

create_record(name, zone, type, data, extra=None)[source]
delete_record(record)[source]
ex_blacklist_ip(zone, ip)[source]

Blacklist the provided IP.

ex_disable_development_mode(zone)[source]

Disable development mode.

ex_disable_ipv6_support(zone)[source]

Disable IPv6 support for the provided zone.

ex_enable_development_mode(zone)[source]

Enable development mode. When Development Mode is on the cache is bypassed. Development mode remains on for 3 hours or until when it is toggled back off.

ex_enable_ipv6_support(zone)[source]

Enable IPv6 support for the provided zone.

ex_get_ip_threat_score(ip)[source]

Retrieve current threat score for a given IP. Note that scores are on a logarithmic scale, where a higher score indicates a higher threat.

ex_get_zone_settings(zone)[source]

Retrieve all current settings for a given zone.

ex_get_zone_stats(zone, interval=30)[source]
ex_purge_cached_file(zone, url)[source]

Purge single file from CloudFlare’s cache.

Parameters:url (str) – URL to the file to purge from cache.
ex_purge_cached_files(zone)[source]

Purge CloudFlare of any cached files.

ex_set_zone_cache_level(zone, level)[source]

Set the zone caching level.

Parameters:level (str) – Caching level. Valid values are: agg (aggresive), basic.
ex_set_zone_security_level(zone, level)[source]

Set the zone Basic Security Level to I’M UNDER ATTACK! / HIGH / MEDIUM / LOW / ESSENTIALLY OFF.

Parameters:level (str) – Security level. Valid values are: help, high, med, low, eoff.
ex_unlist_ip(zone, ip)[source]

Remove provided ip from the whitelist and blacklist.

ex_whitelist_ip(zone, ip)[source]

Whitelist the provided IP.

ex_zone_check(zones)[source]
get_zone(zone_id)[source]
iterate_records(zone)[source]
iterate_zones()[source]
name = 'CloudFlare DNS'
type = 'cloudflare'
update_record(record, name=None, type=None, data=None, extra=None)[source]
website = 'https://www.cloudflare.com'

libcloud.dns.drivers.digitalocean module

Digital Ocean DNS Driver

class libcloud.dns.drivers.digitalocean.DigitalOceanDNSDriver(key, secret=None, secure=True, host=None, port=None, api_version=None, region=None, ex_per_page=200, **kwargs)[source]

Bases: libcloud.common.digitalocean.DigitalOcean_v2_BaseDriver, libcloud.dns.base.DNSDriver

RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'NS': 'NS', 'MX': 'MX'}
connectionCls

alias of DigitalOcean_v2_Connection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes for MX and SRV. (Depends on record) {“priority” : 0, “port” : 443, “weight” : 100}
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (master / slave) (does nothing).
  • ttl (int) – TTL for new records. (does nothing)
  • extra (dict) – Extra attributes (to set ip). (optional) Note: This can be used to set the default A record with {“ip” : “IP.AD.DR.ESS”} otherwise 127.0.0.1 is used
Return type:

Zone

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'DigitalOcean'
type = 'digitalocean'
update_record(record, name=None, type=None, data=None, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – Record name without the domain name (e.g. www). (Ignored) Note: The value is pulled from the record being updated
  • type (RecordType) – DNS record type (A, AAAA, …). (Ignored) Note: Updating records does not support changing type so this value is ignored
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (driver specific).
Return type:

Record

website = 'https://www.digitalocean.com'

libcloud.dns.drivers.dnsimple module

DNSimple DNS Driver

class libcloud.dns.drivers.dnsimple.DNSimpleDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'URL': 'URL', 'AAAA': 'AAAA', 'ALIAS': 'ALIAS', 'CNAME': 'CNAME', 'SRV': 'SRV', 'HINFO': 'HINFO', 'POOL': 'POOL', 'SOA': 'SOA', 'NAPTR': 'NAPTR', 'TXT': 'TXT', 'SSHFP': 'SSHFP', 'NS': 'NS', 'MX': 'MX', 'SPF': 'SPF'}
connectionCls

alias of DNSimpleDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (All zones are master by design).
  • ttl (int) – TTL for new records. (This is not really used)
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Zone

For more info, please see: http://developer.dnsimple.com/v1/domains/

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'DNSimple'
type = 'dnsimple'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (driver specific).
Return type:

Record

website = 'https://dnsimple.com/'

libcloud.dns.drivers.dnspod module

class libcloud.dns.drivers.dnspod.DNSPodDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of DNSPodDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone which the records will be created for.
  • type (RecordType) – DNS record type ( ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (‘prio’, ‘ttl’).
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]
Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (This is not really used. See API docs for extra parameters)
  • ttl (int) – TTL for new records (This is used through the extra param)
  • extra – Extra attributes that are specific to the driver

such as ttl. :type extra: dict

Return type:Zone
delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]
Parameters:zone (Zone) – Zone to be deleted.
Returns:Boolean
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]
Parameters:zone_id – Zone domain name (e.g. example.com)
Returns:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]
name = 'DNSPod'
type = 'dnspod'
website = 'https://dnspod.com'

libcloud.dns.drivers.dummy module

class libcloud.dns.drivers.dummy.DummyDNSDriver(api_key, api_secret)[source]

Bases: libcloud.dns.base.DNSDriver

Dummy DNS driver.

>>> from libcloud.dns.drivers.dummy import DummyDNSDriver
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.name
'Dummy DNS Provider'
Parameters:
  • api_key (str) – API key or username to used (required)
  • api_secret (str) – Secret password to be used (required)
Return type:

None

create_record(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 
<Record: zone=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')
... 
Traceback (most recent call last):
RecordAlreadyExistsError:

@inherits: DNSDriver.create_record

create_zone(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)
... 
Traceback (most recent call last):
ZoneAlreadyExistsError:

@inherits: DNSDriver.create_zone

delete_record(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) 
Traceback (most recent call last):
RecordDoesNotExistError:

@inherits: DNSDriver.delete_record

delete_zone(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) 
Traceback (most recent call last):
ZoneDoesNotExistError:

@inherits: DNSDriver.delete_zone

get_record(zone_id, record_id)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.get_record(zone_id='doesnotexist', record_id='exists')
... 
Traceback (most recent call last):
ZoneDoesNotExistError:

@inherits: DNSDriver.get_record

get_zone(zone_id)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.get_zone(zone_id='foobar')
... 
Traceback (most recent call last):
ZoneDoesNotExistError:

@inherits: DNSDriver.get_zone

list_record_types()[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.list_record_types()
['A']

@inherits: DNSDriver.list_record_types

list_records(zone)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> list(zone.list_records())
[]
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
>>> list(zone.list_records()) 
[<Record: zone=apache.org, name=libcloud, type=A...>]
list_zones()[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.list_zones()
[]

@inherits: DNSDriver.list_zones

name = 'Dummy DNS Provider'
website = 'http://example.com'

libcloud.dns.drivers.durabledns module

DurableDNS Driver

class libcloud.dns.drivers.durabledns.DurableDNSResponse(response, connection)[source]

Bases: libcloud.common.durabledns.DurableResponse

class libcloud.dns.drivers.durabledns.DurableDNSConnection(user_id, key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: libcloud.common.durabledns.DurableConnection

responseCls

alias of DurableDNSResponse

class libcloud.dns.drivers.durabledns.DurableDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'RP': 'RP', 'TXT': 'TXT', 'SRV': 'SRV', 'HINFO': 'HINFO', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of DurableDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (e.g. ‘aux’, ‘ttl’). (optional)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Name of zone, followed by a dot (.) (e.g. example.com.)
  • type (str) – Zone type (Only master available). (optional)
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) –
    Extra attributes (‘mbox’, ‘ns’, ‘minimum’, ‘refresh’,
    ’expire’, ‘update_acl’, ‘xfer’).

    (optional)

Return type:

Zone

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'DurableDNS'
type = 'durabledns'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (driver specific).
Return type:

Record

update_zone(zone, domain, type='master', ttl=None, extra=None)[source]

Update an existing zone.

Parameters:
  • zone (Zone) – Zone to update.
  • domain (str) – Name of zone, followed by a dot (.) (e.g. example.com.)
  • type (str) – Zone type (master / slave).
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) – Extra attributes (‘ns’, ‘mbox’, ‘refresh’, ‘retry’, ‘expire’, ‘minimum’, ‘xfer’, ‘update_acl’). (optional)
Return type:

Zone

website = 'https://durabledns.com'

libcloud.dns.drivers.gandi module

class libcloud.dns.drivers.gandi.GandiDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.common.gandi.BaseGandiDriver, libcloud.dns.base.DNSDriver

API reference can be found at:

http://doc.rpc.gandi.net/domain/reference.html

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'LOC': 'LOC', 'WKS': 'WKS', 'NS': 'NS', 'MX': 'MX', 'SPF': 'SPF'}
connectionCls

alias of GandiDNSConnection

create_record(name, zone, type, data, extra=None)[source]
create_zone(domain, type='master', ttl=None, extra=None)[source]
delete_record(record)[source]
delete_zone(zone)[source]
get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
list_records(zone)[source]
list_zones()[source]
name = 'Gandi DNS'
type = 'gandi'
update_record(record, name, type, data, extra)[source]
update_zone(zone, domain=None, type=None, ttl=None, extra=None)[source]
website = 'http://www.gandi.net/domain'

libcloud.dns.drivers.godaddy module

class libcloud.dns.drivers.godaddy.GoDaddyDNSDriver(shopper_id, key, secret, secure=True, host=None, port=None)[source]

Bases: libcloud.dns.base.DNSDriver

A driver for GoDaddy DNS.

This is for customers of GoDaddy who wish to purchase, update existing domains and manage records for DNS zones owned by GoDaddy NS servers.

Instantiate a new GoDaddyDNSDriver

Parameters:
  • shopper_id (str) – Your customer ID or shopper ID with GoDaddy
  • key (str) – Your access key from developer.godaddy.com
  • secret (str) – Your access key secret
RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'NS': 'SPF', 'MX': 'MX'}
connectionCls

alias of GoDaddyDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Record

delete_zone(zone)[source]

Delete a zone.

Note: This will CANCEL a purchased domain

Parameters:zone (Zone) – Zone to delete.
Return type:bool
ex_check_availability(domain, for_transfer=False)[source]

Check the availability of the domain

Parameters:
  • domain (str) – the domain name e.g. wazzlewobbleflooble.com
  • for_transfer (bool) – Check if domain is available for transfer
Return type:

list of GoDaddyAvailability

ex_get_agreements(tld, privacy=True)[source]

Get the legal agreements for a tld Use this in conjunction with ex_purchase_domain

Parameters:tld (str) – The top level domain e.g com, eu, uk
Return type:dict the JSON Schema
ex_get_purchase_schema(tld)[source]

Get the schema that needs completing to purchase a new domain Use this in conjunction with ex_purchase_domain

Parameters:tld (str) – The top level domain e.g com, eu, uk
Return type:dict the JSON Schema
ex_list_tlds()[source]

List available TLDs for sale

Return type:list of GoDaddyTLD
ex_purchase_domain(purchase_request)[source]

Purchase a domain with GoDaddy

Parameters:purchase_request (dict) – The completed document from ex_get_purchase_schema
Return type:GoDaddyDomainPurchaseResponse Your order
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Get a zone (by domain)

Parameters:zone_id (str) – The domain, not the ID
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones (purchased domains)

Returns:list of Zone
name = 'GoDaddy DNS'
type = 'godaddy'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (driver specific).
Return type:

Record

website = 'https://www.godaddy.com/'

libcloud.dns.drivers.google module

class libcloud.dns.drivers.google.GoogleDNSDriver(user_id, key, project=None, auth_type=None, scopes=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'SPF': 'SPF', 'PTR': 'PTR'}
connectionCls

alias of GoogleDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – Record name fully qualified, with a ‘.’ at the end.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes. (optional)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com.) with a ‘.’ at the end.
  • type (str) – Zone type (master is the only one supported).
  • ttl (int) – TTL for new records. (unused)
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Zone

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
ex_bulk_record_changes(zone, records)[source]

Bulk add and delete records.

Parameters:
  • zone (Zone) – Zone where the requested record changes are done.
  • records – Dictionary of additions list or deletions list, or both
of resourceRecordSets. For example:
{‘additions’: [{‘rrdatas’: [‘127.0.0.1’],
‘kind’: ‘dns#resourceRecordSet’, ‘type’: ‘A’, ‘name’: ‘www.example.com.’, ‘ttl’: ‘300’}],
‘deletions’: [{‘rrdatas’: [‘127.0.0.1’],
‘kind’: ‘dns#resourceRecordSet’, ‘type’: ‘A’, ‘name’: ‘www2.example.com.’, ‘ttl’: ‘300’}]}
Returns:A dictionary of Record additions and deletions.
Return type:dict of additions and deletions of Record
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
iterate_records(zone)[source]

Return a generator to iterate over records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Return type:generator of Record
iterate_zones()[source]

Return a generator to iterate over available zones.

Return type:generator of Zone
name = 'Google DNS'
type = 'google'
website = 'https://cloud.google.com/'

libcloud.dns.drivers.hostvirtual module

class libcloud.dns.drivers.hostvirtual.HostVirtualDNSDriver(key, secure=True, host=None, port=None)[source]

Bases: libcloud.dns.base.DNSDriver

RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'NS': 'SPF', 'MX': 'MX'}
connectionCls

alias of HostVirtualDNSConnection

create_record(name, zone, type, data, extra=None)[source]
create_zone(domain, type='NATIVE', ttl=None, extra=None)[source]
delete_record(record)[source]
delete_zone(zone)[source]
get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
list_records(zone)[source]
list_zones()[source]
name = 'Host Virtual DNS'
type = 'hostvirtual'
update_record(record, name=None, type=None, data=None, extra=None)[source]
update_zone(zone, domain=None, type=None, ttl=None, extra=None)[source]
website = 'https://www.hostvirtual.com/'

libcloud.dns.drivers.linode module

class libcloud.dns.drivers.linode.LinodeDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'NS': 'NS', 'MX': 'MX'}
connectionCls

alias of LinodeDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

API docs: http://www.linode.com/api/dns/domain.resource.create

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

API docs: http://www.linode.com/api/dns/domain.create

delete_record(record)[source]
delete_zone(zone)[source]
get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
list_records(zone)[source]
list_zones()[source]
name = 'Linode DNS'
type = 'linode'
update_record(record, name=None, type=None, data=None, extra=None)[source]

Update an existing record.

API docs: http://www.linode.com/api/dns/domain.resource.update

update_zone(zone, domain=None, type=None, ttl=None, extra=None)[source]

Update an existing zone.

API docs: http://www.linode.com/api/dns/domain.update

website = 'http://www.linode.com/'

libcloud.dns.drivers.liquidweb module

Liquid Web DNS Driver

class libcloud.dns.drivers.liquidweb.LiquidWebDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of LiquidWebDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone which the records will be created for.
  • type (RecordType) – DNS record type ( ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (‘prio’, ‘ttl’).
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (This is not really used. See API docs for extra parameters).
  • ttl (int) – TTL for new records. (This is not really used)
  • extra (dict) – Extra attributes (driver specific). (‘region_support’, ‘zone_data’)
Return type:

Zone

For more info, please see: https://www.liquidweb.com/storm/api/docs/v1/Network/DNS/Zone.html

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'Liquidweb DNS'
type = 'liquidweb'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type ( ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (‘name’, ‘rdata’, ‘prio’, ‘ttl’).
Return type:

Record

website = 'https://www.liquidweb.com'

libcloud.dns.drivers.luadns module

class libcloud.dns.drivers.luadns.LuadnsDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of LuadnsDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone which the records will be created for.
  • type (RecordType) – DNS record type ( ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (‘prio’, ‘ttl’).
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (This is not really used. See API docs for extra parameters).
  • ttl (int) – TTL for new records. (This is not really used)
  • extra (dict) – Extra attributes (driver specific). (‘region_support’, ‘zone_data’)
Return type:

Zone

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'Luadns'
type = 'luadns'
website = 'https://www.luadns.com'

libcloud.dns.drivers.nfsn module

NFSN DNS Driver

class libcloud.dns.drivers.nfsn.NFSNDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of NFSNConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, MX, TXT).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific, e.g. ‘ttl’). (optional)
Return type:

Record

delete_record(record)[source]

Use this method to delete a record.

Parameters:record (Record) – record to delete
Return type:Bool
ex_get_records_by(zone, name=None, type=None)[source]

Return a list of records for the provided zone, filtered by name and/or type.

Parameters:
  • zone (Zone) – Zone to list records for.
  • zone – Zone where the requested records are found.
  • name (str) – name of the records, for example “www”. (optional)
  • type (RecordType) – DNS record type (A, MX, TXT). (optional)
Returns:

list of Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – name of the required zone, for example “example.com”.
Return type:Zone
Raises:ZoneDoesNotExistError: If no zone could be found.
list_records(zone)[source]

Return a list of all records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
name = 'NFSN DNS'
type = 'nfsn'
website = 'https://www.nearlyfreespeech.net'

libcloud.dns.drivers.nsone module

class libcloud.dns.drivers.nsone.NsOneDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of NsOneDNSConnection

create_record(name, zone, type, data, extra=None)[source]
Parameters:
  • name (str) – Name of the record to create (e.g. foo).
  • zone (Zone) – Zone where the record should be created.
  • type (str) – Type of record (e.g. A, MX etc)
  • data (str) – Data of the record (e.g. 127.0.0.1 for the A record)
  • extra (dict) – Extra data needed to create different types of records
Returns:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]
Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (This is not really used. See API docs for extra parameters)
  • ttl (int) – TTL for new records (This is used through the extra param)
  • extra – Extra attributes that are specific to the driver

such as ttl. :type extra: dict

Return type:Zone
delete_record(record)[source]
Parameters:record (Record) – Record to delete.
Returns:Boolean
delete_zone(zone)[source]
Parameters:zone (Zone) – Zone to be deleted.
Returns:Boolean
ex_zone_exists(zone_id, zones_list)[source]

Function to check if a Zone object exists. :param zone_id: ID of the Zone object. :type zone_id: str

Parameters:zones_list (list.) – A list containing Zone objects.
Return type:Returns True or False.
get_record(zone_id, record_id)[source]
Parameters:zone_id – The id of the zone where to search for

the record (e.g. example.com) :type zone_id: str :param record_id: The type of record to search for (e.g. A, AAA, MX etc)

Returns:Record
get_zone(zone_id)[source]
Parameters:zone_id – Zone domain name (e.g. example.com)
Returns:Zone
list_records(zone)[source]
Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]
name = 'NS1 DNS'
type = 'nsone'
update_record(record, name, type, data, extra=None)[source]
Parameters:
  • record (Record) – Record to update
  • name (str) – Name of the record to update (e.g. foo).
  • type (str) – Type of record (e.g. A, MX etc)
  • data (str) – Data of the record (e.g. 127.0.0.1 for the A record)
  • extra (dict) – Extra data needed to create different types of records
Returns:

Record

website = 'https://ns1.com'

libcloud.dns.drivers.onapp module

OnApp DNS Driver

class libcloud.dns.drivers.onapp.OnAppDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'SOA': 'SOA', 'A': 'A', 'CNAME': 'CNAME', 'SRV': 'SRV', 'AAAA': 'AAAA', 'TXT': 'TXT', 'NS': 'NS', 'MX': 'MX'}
connectionCls

alias of OnAppConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data – Data for the record (depends on the record type).

Used only for A and AAAA record types. :type data: str

Parameters:extra (dict) – Extra attributes (driver specific). (optional)
Return type:Record

For more info, please see: https://docs.onapp.com/display/52API/Add+DNS+Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (All zones are master by design).
  • ttl (int) – TTL for new records. (This is not really used)
  • extra – Extra attributes (set auto_populate: 0 if you

don’t want to auto populate with existing DNS records). (optional) :type extra: dict

Return type:Zone

For more info, please see: https://docs.onapp.com/display/52API/Add+DNS+Zone

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool

For more info, please see: https://docs.onapp.com/display/52API/Delete+DNS+Record

delete_zone(zone)[source]

Delete a zone.

Note: This will also delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'OnApp'
type = 'onapp'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type (A, AAAA, …).
  • data – Data for the record (depends on the record type).

Used only for A and AAAA record types. :type data: str

Parameters:extra (dict) – (optional) Extra attributes (driver specific).
Return type:Record

For more info, please see: https://docs.onapp.com/display/52API/Edit+DNS+Records

website = 'http://onapp.com/'

libcloud.dns.drivers.pointdns module

Point DNS Driver

exception libcloud.dns.drivers.pointdns.PointDNSException(value, http_code, driver=None)[source]

Bases: libcloud.common.types.ProviderError

class libcloud.dns.drivers.pointdns.Redirect(id, name, data, type, driver, zone, iframe=None, query=False)[source]

Bases: object

Point DNS redirect.

Parameters:
  • id (str) – Redirect id.
  • name (str) – The FQDN for the record.
  • data (str) – The data field. (redirect_to)
  • type (str) – The type of redirects 301, 302 or 0 for iframes.
  • driver (DNSDriver) – DNSDriver instance.
  • zone (Zone) – Zone where redirect belongs.
  • iframe (str) – Title of iframe (optional).
  • query (bool) – boolean Information about including query string when redirecting. (optional).
delete()[source]
update(data, name=None, type=None, iframe=None, query=None)[source]
class libcloud.dns.drivers.pointdns.MailRedirect(id, source, destination, zone, driver)[source]

Bases: object

Point DNS mail redirect.

Parameters:
  • id (str) – MailRedirect id.
  • source (str) – The source address of mail redirect.
  • destination (str) – The destination address of mail redirect.
  • zone (Zone) – Zone where mail redirect belongs.
  • driver (DNSDriver) – DNSDriver instance.
delete()[source]
update(destination, source=None)[source]
class libcloud.dns.drivers.pointdns.PointDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'ALIAS': 'ALIAS', 'SSHFP': 'SSHFP', 'NS': 'NS', 'MX': 'MX', 'PTR': 'PTR'}
connectionCls

alias of PointDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (All zones are master by design).
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Zone

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
ex_create_mail_redirect(destination, source, zone)[source]
Parameters:
  • destination (str) – The destination address of mail redirect.
  • source (str) – The source address of mail redirect.
  • zone (Zone) – Zone to list redirects for.
Return type:

list of MailRedirect

ex_create_redirect(redirect_to, name, type, zone, iframe=None, query=None)[source]
Parameters:
  • redirect_to (str) – The data field. (redirect_to)
  • name (str) – The FQDN for the record.
  • type (str) – The type of redirects 301, 302 or 0 for iframes.
  • zone (Zone) – Zone to list redirects for.
  • iframe (str) – Title of iframe (optional).
  • query (bool) – boolean Information about including query string when redirecting. (optional).
Return type:

Record

ex_delete_mail_redirect(mail_r)[source]
Parameters:mail_r (MailRedirect) – Mail redirect to update
Return type:bool
ex_delete_redirect(redirect)[source]
Parameters:mail_r (Redirect) – Redirect to delete
Return type:bool
ex_get_mail_redirects(zone_id, mail_r_id)[source]
Parameters:
  • zone (Zone) – Zone to list redirects for.
  • mail_r_id (str) – Mail redirect id.
Return type:

list of MailRedirect

ex_get_redirect(zone_id, redirect_id)[source]
Parameters:
  • zone (Zone) – Zone to list redirects for.
  • redirect_id (str) – Redirect id.
Return type:

list of Redirect

ex_list_mail_redirects(zone)[source]
Parameters:zone (Zone) – Zone to list redirects for.
Return type:list of MailRedirect
ex_list_redirects(zone)[source]
Parameters:zone (Zone) – Zone to list redirects for.
Return type:list of Record
ex_update_mail_redirect(mail_r, destination, source=None)[source]
Parameters:
  • mail_r (MailRedirect) – Mail redirect to update
  • destination (str) – The destination address of mail redirect.
  • source (str) – The source address of mail redirect. (optional)
Return type:

list of MailRedirect

ex_update_redirect(redirect, redirect_to=None, name=None, type=None, iframe=None, query=None)[source]
Parameters:
  • redirect – Record to update
  • redirect_to (str) – The data field. (optional).
  • name (str) – The FQDN for the record.
  • type (str) – The type of redirects 301, 302 or 0 for iframes. (optional).
  • iframe (str) – Title of iframe (optional).
  • query (bool) – boolean Information about including query string when redirecting. (optional).
Return type:

list of Redirect

get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'Point DNS'
type = 'pointdns'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (driver specific).
Return type:

Record

update_zone(zone, domain, type='master', ttl=None, extra=None)[source]

Update an existing zone.

Parameters:
  • zone (Zone) – Zone to update.
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (All zones are master by design).
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) – Extra attributes (group, user-id). (optional)
Return type:

Zone

website = 'https://pointhq.com/'

libcloud.dns.drivers.powerdns module

PowerDNS Driver

class libcloud.dns.drivers.powerdns.PowerDNSDriver(key, secret=None, secure=False, host=None, port=None, api_version='experimental', **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

PowerDNS Driver defaulting to using PowerDNS 3.x API (ie “experimental”).

Parameters:
  • key (str) – API key or username to used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Off by default for PowerDNS.
  • host (str) – Hostname used for connections.
  • port (int) – Port used for connections.
  • api_version (str) – Specifies the API version to use. experimental and v1 are the only valid options. Defaults to using experimental (optional)
Returns:

None

RECORD_TYPE_MAP = {'LOC': 'LOC', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'HINFO': 'HINFO', 'DS': 'DS', 'SOA': 'SOA', 'RP': 'RP', 'SSHFP': 'SSHFP', 'NS': 'NS', 'PTR': 'PTR', 'SPF': 'SPF', 'A': 'AFSDB', 'TLSA': 'TLSA', 'NSEC': 'NSEC', 'SRV': 'SRV', 'RRSIG': 'RRSIG', 'OPENPGPKEY': 'OPENPGPKEY', 'NAPTR': 'NAPTR', 'TXT': 'TXT', 'CERT': 'CERT', 'KEY': 'KEY', 'DNSKEY': 'DNSKEY', 'MX': 'MX'}
connectionCls

alias of PowerDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

There are two PowerDNS-specific quirks here. Firstly, this method will silently clobber any pre-existing records that might already exist. For example, if PowerDNS already contains a “test.example.com” A record, and you create that record using this function, then the old A record will be replaced with your new one.

Secondly, PowerDNS requires that you provide a ttl for all new records. In other words, the “extra” parameter must be {'ttl': <some-integer>} at a minimum.

Parameters:
  • name (str) – FQDN of the new record, for example “www.example.com”.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific, e.g. ‘ttl’). Note that PowerDNS requires a ttl value for every record.
Return type:

Record

create_zone(domain, type=None, ttl=None, extra={})[source]

Create a new zone.

There are two PowerDNS-specific quirks here. Firstly, the “type” and “ttl” parameters are ignored (no-ops). The “type” parameter is simply not implemented, and PowerDNS does not have an ability to set a zone-wide default TTL. (TTLs must be set per-record.)

Secondly, PowerDNS requires that you provide a list of nameservers for the zone upon creation. In other words, the “extra” parameter must be {'nameservers': ['ns1.example.org']} at a minimum.

Parameters:
  • name (str) – Zone domain name (e.g. example.com)
  • domain (Zone) – Zone type (master / slave). (optional). Note that the PowerDNS driver does nothing with this parameter.
  • ttl (int) – TTL for new records. (optional). Note that the PowerDNS driver does nothing with this parameter.
  • extra (dict) – Extra attributes (driver specific). For example, specify extra={'nameservers': ['ns1.example.org']} to set a list of nameservers for this new zone.
Return type:

Zone

delete_record(record)[source]

Use this method to delete a record.

Parameters:record (Record) – record to delete
Return type:bool
delete_zone(zone)[source]

Use this method to delete a zone.

Parameters:zone (Zone) – zone to delete
Return type:bool
get_zone(zone_id)[source]

Return a Zone instance.

(Note that PowerDNS does not support per-zone TTL defaults, so all Zone objects will have ttl=None.)

Parameters:zone_id (str) – name of the required zone with the trailing period, for example “example.com.”.
Return type:Zone
Raises:ZoneDoesNotExistError: If no zone could be found.
list_records(zone)[source]

Return a list of all records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'PowerDNS'
type = 'powerdns'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – FQDN of the new record, for example “www.example.com”.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (driver specific).
Return type:

Record

website = 'https://www.powerdns.com/'

libcloud.dns.drivers.rackspace module

class libcloud.dns.drivers.rackspace.RackspaceDNSResponse(*args, **kwargs)[source]

Bases: libcloud.compute.drivers.openstack.OpenStack_1_1_Response

Rackspace DNS Response class.

parse_error()[source]
class libcloud.dns.drivers.rackspace.RackspaceDNSConnection(*args, **kwargs)[source]

Bases: libcloud.compute.drivers.openstack.OpenStack_1_1_Connection, libcloud.common.base.PollingConnection

Rackspace DNS Connection class.

XML_NAMESPACE = None
auth_url = 'https://identity.api.rackspacecloud.com'
get_endpoint()[source]
get_poll_request_kwargs(response, context, request_kwargs)[source]
has_completed(response)[source]
poll_interval = 2.5
responseCls

alias of RackspaceDNSResponse

timeout = 30

libcloud.dns.drivers.route53 module

class libcloud.dns.drivers.route53.Route53DNSDriver(*args, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

RECORD_TYPE_MAP = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'TXT': 'TXT', 'SOA': 'SOA', 'NS': 'NS', 'MX': 'MX', 'SPF': 'SPF', 'PTR': 'PTR'}
connectionCls

alias of Route53Connection

create_record(name, zone, type, data, extra=None)[source]
create_zone(domain, type='master', ttl=None, extra=None)[source]
delete_record(record)[source]
delete_zone(zone, ex_delete_records=False)[source]
ex_create_multi_value_record(name, zone, type, data, extra=None)[source]

Create a record with multiple values with a single call.

Returns:A list of created records.
Return type:list of libcloud.dns.base.Record
ex_delete_all_records(zone)[source]

Remove all the records for the provided zone.

Parameters:zone (Zone) – Zone to delete records for.
get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
iterate_records(zone)[source]
iterate_zones()[source]
name = 'Route53 DNS'
type = 'route53'
update_record(record, name=None, type=None, data=None, extra=None)[source]
website = 'http://aws.amazon.com/route53/'

libcloud.dns.drivers.softlayer module

class libcloud.dns.drivers.softlayer.SoftLayerDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'a', 'AAAA': 'aaaa', 'CNAME': 'cname', 'SRV': 'srv', 'TXT': 'txt', 'SOA': 'soa', 'NS': 'ns', 'MX': 'mx', 'SPF': 'spf', 'PTR': 'ptr'}
connectionCls

alias of SoftLayerConnection

create_record(name, zone, type, data, extra=None)[source]
create_zone(domain, ttl=None, extra=None)[source]
delete_record(record)[source]
delete_zone(zone)[source]
get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
iterate_records(zone)[source]
iterate_zones()[source]
name = 'Softlayer DNS'
type = 'softlayer'
update_record(record, name=None, type=None, data=None, extra=None)[source]
website = 'https://www.softlayer.com'

libcloud.dns.drivers.vultr module

Vultr DNS Driver

exception libcloud.dns.drivers.vultr.ZoneRequiredException[source]

Bases: exceptions.Exception

class libcloud.dns.drivers.vultr.VultrDNSResponse(response, connection)[source]

Bases: libcloud.common.vultr.VultrResponse

class libcloud.dns.drivers.vultr.VultrDNSConnection(key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: libcloud.common.vultr.VultrConnection

Initialize user_id and key; set secure to an int based on passed value.

responseCls

alias of VultrDNSResponse

class libcloud.dns.drivers.vultr.VultrDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'NS': 'NS', 'MX': 'MX'}
connectionCls

alias of VultrDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, AAAA, …).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Returns a Zone object.

Parameters:
  • domain (str) – Zone domain name, (e.g. example.com).
  • type (str) – Zone type (master / slave).
  • ttl (int) – TTL for new records. (optional)
  • extra – (optional) Extra attributes (driver specific). (e.g. {‘serverip’:‘127.0.0.1’})
delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
ex_record_exists(record_id, records_list)[source]
Parameters:
  • record_id (str) – Name of the Record object.
  • records_list (list) – A list containing Record objects
Return type:

bool

ex_zone_exists(zone_id, zones_list)[source]

Function to check if a Zone object exists.

Parameters:
  • zone_id (str) – Name of the Zone object.
  • zones_list (list) – A list containing Zone objects
Return type:

Returns True or False

get_record(zone_id, record_id)[source]

Returns a Record instance.

Parameters:
  • zone_id (str) – name of the required zone
  • record_id (str) – ID of the required record
Return type:

class:Record

get_zone(zone_id)[source]

Returns a Zone instance.

Parameters:zone_id (str) – name of the zone user wants to get.
Return type:Zone
list_records(zone)[source]

Returns a list of records for the provided zone.

Parameters:zone (Zone) – zone to list records for
Return type:list of :class: Record
list_zones()[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
name = 'Vultr DNS'
type = 'vultr'
website = 'http://www.vultr.com/'

libcloud.dns.drivers.worldwidedns module

World Wide DNS Driver

class libcloud.dns.drivers.worldwidedns.WorldWideDNSDriver(key, secret=None, reseller_id=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • reseller_id (str) – Reseller ID for reseller accounts
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'CNAME': 'CNAME', 'SRV': 'SRV', 'NS': 'NS', 'MX': 'MX'}
connectionCls

alias of WorldWideDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

We can create 40 record per domain. If all slots are full, we can replace one of them by choosing a specific entry in extra argument.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (MX, CNAME, A, NS, SRV, TXT).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Contains ‘entry’ Entry position (1 thru 40)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (master / slave).
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) – Extra attributes (driver specific). (optional). Possible parameter in here should be DYN which values should be 1 for standart and 2 for dynamic. Default is 1.
Return type:

Zone

For more info, please see https://www.worldwidedns.net/dns_api_protocol_new_domain.asp or https://www.worldwidedns.net/dns_api_protocol_new_domain_reseller.asp

delete_record(record)[source]

Delete a record.

Parameters:record (Record) – Record to delete.
Return type:bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool

For more information, please see https://www.worldwidedns.net/dns_api_protocol_delete_domain.asp or https://www.worldwidedns.net/dns_api_protocol_delete_domain_reseller.asp

ex_transfer_domain(domain, user_id)[source]

This command will allow you, if you are a reseller, to change the userid on a domain name to another userid in your account ONLY if that new userid is already created.

Parameters:
  • domain (str) – Domain name.
  • user_id (str) – The new userid to connect to the domain name.
Return type:

bool

For more info, please see: https://www.worldwidedns.net/dns_api_protocol_transfer.asp

ex_view_zone(domain, name_server)[source]

View zone file from a name server

Parameters:
  • domain (str) – Domain name.
  • name_server (int) – Name server to check. (1, 2 or 3)
Return type:

str

For more info, please see: https://www.worldwidedns.net/dns_api_protocol_viewzone.asp or https://www.worldwidedns.net/dns_api_protocol_viewzone_reseller.asp

get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID number of the required record.
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
iterate_records(zone)[source]

Return a generator to iterate over records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Return type:generator of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone

For more info, please see: https://www.worldwidedns.net/dns_api_protocol_list.asp or https://www.worldwidedns.net/dns_api_protocol_list_reseller.asp

name = 'World Wide DNS'
type = 'worldwidedns'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.
  • name (str) – 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 (RecordType) – DNS record type (MX, CNAME, A, NS, SRV, TXT).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Contains ‘entry’ Entry position (1 thru 40)
Return type:

Record

update_zone(zone, domain, type='master', ttl=None, extra=None, ex_raw=False)[source]

Update an existing zone.

Parameters:
  • zone (Zone) – Zone to update.
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (master / slave).
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) – Extra attributes (driver specific) (optional). Values not specified such as SECURE, IP, FOLDER, HOSTMASTER, REFRESH, RETRY and EXPIRE will be kept as already is. The same will be for S(1 to 40), T(1 to 40) and D(1 to 40) if not in raw mode and for ZONENS and ZONEDATA if it is.
  • ex_raw (bool) – Mode we use to do the update using zone file or not.
Return type:

Zone

For more info, please see https://www.worldwidedns.net/dns_api_protocol_list_domain.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_raw.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_reseller.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_raw_reseller.asp

website = 'https://www.worldwidedns.net/'

libcloud.dns.drivers.zerigo module

class libcloud.dns.drivers.zerigo.ZerigoDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'URL': 'URL', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'SRV': 'SRV', 'REDIRECT': 'REDIRECT', 'NAPTR': 'NAPTR', 'TXT': 'TXT', 'PTR': 'PTR', 'NS': 'NS', 'GEO': 'GEO', 'MX': 'MX', 'SPF': 'SPF'}
connectionCls

alias of ZerigoDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Provider API docs: https://www.zerigo.com/docs/apis/dns/1.1/hosts/create

@inherits: DNSDriver.create_record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Provider API docs: https://www.zerigo.com/docs/apis/dns/1.1/zones/create

@inherits: DNSDriver.create_zone

delete_record(record)[source]
delete_zone(zone)[source]
ex_force_slave_axfr(zone)[source]

Force a zone transfer.

Parameters:zone (Zone) – Zone which should be used.
Return type:Zone
ex_get_zone_by_domain(domain)[source]

Retrieve a zone object by the domain name.

Parameters:domain (str) – The domain which should be used
Return type:Zone
get_record(zone_id, record_id)[source]
get_zone(zone_id)[source]
iterate_records(zone)[source]
iterate_zones()[source]
name = 'Zerigo DNS'
type = 'zerigo'
update_record(record, name=None, type=None, data=None, extra=None)[source]
update_zone(zone, domain=None, type=None, ttl=None, extra=None)[source]

Update an existing zone.

Provider API docs: https://www.zerigo.com/docs/apis/dns/1.1/zones/update

@inherits: DNSDriver.update_zone

website = 'http://www.zerigo.com/'

libcloud.dns.drivers.zonomi module

Zonomi DNS Driver

class libcloud.dns.drivers.zonomi.ZonomiDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: libcloud.dns.base.DNSDriver

Parameters:
  • key (str) – API key or username to used (required)
  • secret (str) – Secret password to be used (required)
  • secure (bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.
  • host (str) – Override hostname used for connections.
  • port (int) – Override port used for connections.
Returns:

None

RECORD_TYPE_MAP = {'A': 'A', 'TXT': 'TXT', 'MX': 'MX'}
connectionCls

alias of ZonomiDNSConnection

create_record(name, zone, type, data, extra=None)[source]

Create a new record.

Parameters:
  • name (str) – 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.
  • zone (Zone) – Zone where the requested record is created.
  • type (RecordType) – DNS record type (A, MX, TXT).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – Extra attributes (driver specific, e.g. ‘prio’ or ‘ttl’). (optional)
Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:zone_id (str) – Zone domain name (e.g. example.com)
Return type:Zone
delete_record(record)[source]

Use this method to delete a record.

Parameters:record (Record) – record to delete
Return type:Bool
delete_zone(zone)[source]

Delete a zone.

Note: This will delete all the records belonging to this zone.

Parameters:zone (Zone) – Zone to delete.
Return type:bool
ex_convert_to_master(zone)[source]

Convert existent zone to master.

Parameters:zone (Zone) – Zone to convert.
Return type:Bool
ex_convert_to_secondary(zone, master)[source]

Convert existent zone to slave.

Parameters:
  • zone (Zone) – Zone to convert.
  • master (str) – the specified master name server IP address.
Return type:

Bool

get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone
  • record_id (str) – ID of the required record
Return type:

Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:zone_id (str) – ID of the required zone
Return type:Zone
list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:zone (Zone) – Zone to list records for.
Returns:list of Record
list_zones()[source]

Return a list of zones.

Returns:list of Zone
name = 'Zonomi DNS'
type = 'zonomi'
website = 'https://zonomi.com'

Module contents