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
-
host
= 'api.auroradns.eu'¶
-
request
(action, params=None, data='', headers=None, method='GET')[source]¶ Request a given action.
Basically a wrapper around the connection object’s request that does some helpful pre-processing.
Parameters: - action (
str
) – A path. This can include arguments. If included, any extra parameters are appended to the existing ones. - params (
dict
) – Optional mapping of additional parameters to send. If None, leave as an emptydict
. - data (
unicode
) – A body of data to send with the request. - headers (
dict
) – Extra headers to add to the request None, leave as an emptydict
. - method (
str
) – An HTTP method such as “GET” or “POST”. - raw (
bool
) – True to perform a “raw” request aka only send the headers and use the rawResponseCls class. This is used with storage API when uploading a file. - stream (
bool
) – True to return an iterator in Response.iter_content and allow streaming of the response data (for downloading large files)
Returns: An
Response
instance.Return type: Response
instance- action (
-
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', 'HTTPS': 'HTTPS', 'TCP': 'TCP'}¶
-
RECORD_TYPE_MAP
= {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'DS': 'DS', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
AuroraDNSConnection
-
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
- name (
-
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)
Return type: Zone
- domain (
-
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_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: - zone (
-
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: - zone (
-
ex_list_healthchecks
(zone)[source]¶ List all Health Checks in a zone.
Parameters: zone ( Zone
) – Zone to list health checks for.Returns: list
ofAuroraDNSHealthCheck
-
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: - zone (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
iterate_zones
()[source]¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
list_record_types
()[source]¶ Return a list of RecordType objects supported by the provider.
Returns: list
ofRecordType
-
name
= 'AuroraDNS'¶
-
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
- record (
-
website
= 'https://www.pcextreme.nl/en/aurora/dns'¶
- key (
-
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).
- id (
-
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.
- response (
-
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.
- domain (
-
name
= 'BuddyNS DNS'¶
-
type
= 'buddyns'¶
-
website
= 'https://www.buddyns.com'¶
- key (
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
-
MEMBERSHIPS_PAGE_SIZE
= 50¶
-
RECORDS_PAGE_SIZE
= 100¶
-
RECORD_TYPE_MAP
= {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT', 'URL': 'LOC'}¶
-
ZONES_PAGE_SIZE
= 50¶
-
connectionCls
¶ alias of
CloudFlareDNSConnection
-
create_record
(name, zone, type, data, extra=None)[source]¶ @inherits:
DNSDriver.create_record
Note that for
extra
record properties, only the ones specified inRECORD_CREATE_ATTRIBUTES
can be set at creation time. Any non-settable properties are ignored.
-
create_zone
(domain, type='master', ttl=None, extra=None)[source]¶ @inherits:
DNSDriver.create_zone
Note that for users who have more than one account membership, the id of the account in which to create the zone must be specified via the
extra
keyaccount
.Note that for
extra
zone properties, only the ones specified inZONE_CREATE_ATTRIBUTES
can be set at creation time. Additionally, setting the ``ttl` property is not supported.
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
iterate_zones
()[source]¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
name
= 'CloudFlare DNS'¶
-
type
= 'cloudflare'¶
-
update_record
(record, name=None, type=None, data=None, extra=None)[source]¶ @inherits:
DNSDriver.update_record
Note that for
extra
record properties, only the ones specified inRECORD_UPDATE_ATTRIBUTES
can be updated. Any non-updatable properties are ignored.
-
update_zone
(zone, domain, type='master', ttl=None, extra=None)[source]¶ @inherits:
DNSDriver.update_zone
Note that the
zone
,type
andttl
properties can’t be updated. The only updatable properties are theextra
zone properties specified inZONE_UPDATE_ATTRIBUTES
. Only one property may be updated at a time. Any non-updatable properties are ignored.
-
website
= 'https://www.cloudflare.com'¶
- key (
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', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
libcloud.common.digitalocean.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
- name (
-
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
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
- 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', 'AAAA': 'AAAA', 'ALIAS': 'ALIAS', 'CNAME': 'CNAME', 'HINFO': 'HINFO', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'POOL': 'POOL', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TXT': 'TXT', 'URL': 'URL'}¶
-
connectionCls
¶
-
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
- name (
-
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/
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
- record (
-
website
= 'https://dnsimple.com/'¶
- key (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
delete_record
(record)[source]¶ Delete a record.
Parameters: record ( Record
) – Record 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
- zone_id (
-
list_records
(zone)[source]¶ Return a list of records for the provided zone.
Parameters: zone ( Zone
) – Zone to list records for.Returns: list
ofRecord
-
name
= 'DNSPod'¶
-
type
= 'dnspod'¶
-
website
= 'https://dnspod.com'¶
- key (
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 #doctest: +ELLIPSIS <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') ... #doctest: +IGNORE_EXCEPTION_DETAIL 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) ... #doctest: +IGNORE_EXCEPTION_DETAIL 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) #doctest: +IGNORE_EXCEPTION_DETAIL 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) #doctest: +IGNORE_EXCEPTION_DETAIL 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') ... #doctest: +IGNORE_EXCEPTION_DETAIL 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') ... #doctest: +IGNORE_EXCEPTION_DETAIL 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()) #doctest: +ELLIPSIS [<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'¶
- api_key (
libcloud.dns.drivers.durabledns module¶
DurableDNS Driver
-
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', 'HINFO': 'HINFO', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'RP': 'RP', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
- 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
- zone (
-
website
= 'https://durabledns.com'¶
- key (
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', 'LOC': 'LOC', 'MX': 'MX', 'NS': 'NS', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT', 'WKS': 'WKS'}¶
-
connectionCls
¶ alias of
GandiDNSConnection
-
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
- name (
-
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)
Return type: Zone
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
name
= 'Gandi DNS'¶
-
type
= 'gandi'¶
-
update_record
(record, name, type, data, extra)[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
- record (
-
update_zone
(zone, domain=None, type=None, 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 (master / slave). - ttl (
int
) – TTL for new records. (optional) - extra (
dict
) – Extra attributes (driver specific). (optional)
Return type: Zone
- zone (
-
website
= 'http://www.gandi.net/domain'¶
- key (
libcloud.dns.drivers.gandi_live module¶
-
class
libcloud.dns.drivers.gandi_live.
GandiLiveDNSDriver
(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]¶ Bases:
libcloud.common.gandi_live.BaseGandiLiveDriver
,libcloud.dns.base.DNSDriver
API reference can be found at:
https://doc.livedns.gandi.net/
Please note that the Libcloud paradigm of one zone per domain does not match exactly with Gandi LiveDNS. For Gandi, a “zone” can apply to multiple domains. This driver behaves as if the domain is a zone, but be warned that modifying a domain means modifying the zone. Iif you have a zone associated with mutiple domains, all of those domains will be modified as well.
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', 'ALIAS': 'ALIAS', 'CNAME': 'CNAME', 'DNAME': 'DNAME', 'DS': 'DS', 'KEY': 'KEY', 'LOC': 'LOC', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT', 'WKS': 'WKS'}¶
-
connectionCls
¶ alias of
GandiLiveDNSConnection
-
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
- name (
-
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)
Return type: Zone
- domain (
-
delete_record
(record)[source]¶ Delete a record.
Parameters: record ( Record
) – Record to delete.Return type: bool
-
export_zone_to_bind_format
(zone)[source]¶ Export Zone object to the BIND compatible format.
Parameters: zone ( Zone
) – Zone to export.Returns: Zone data in BIND compatible format. Return type: str
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
name
= 'Gandi LiveDNS'¶
-
type
= 'gandi'¶
-
update_record
(record, name, type, data, extra)[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
- record (
-
website
= 'http://www.gandi.net/domain'¶
- key (
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', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
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, ukReturn 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, ukReturn type: dict the JSON Schema
-
ex_purchase_domain
(purchase_request)[source]¶ Purchase a domain with GoDaddy
Parameters: purchase_request ( dict
) – The completed document from ex_get_purchase_schemaReturn 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
- zone_id (
-
get_zone
(zone_id)[source]¶ Get a zone (by domain)
Parameters: zone_id ( str
) – The domain, not the IDReturn 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
ofRecord
-
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
- record (
-
website
= 'https://www.godaddy.com/'¶
- shopper_id (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
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 ofRecord
- zone (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
iterate_zones
()[source]¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
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', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
HostVirtualDNSConnection
-
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
- name (
-
create_zone
(domain, type='NATIVE', 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)
Return type: Zone
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
name
= 'Host Virtual DNS'¶
-
type
= 'hostvirtual'¶
-
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). 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
- record (
-
update_zone
(zone, domain=None, type=None, 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 (master / slave). - ttl (
int
) – TTL for new records. (optional) - extra (
dict
) – Extra attributes (driver specific). (optional)
Return type: Zone
- zone (
-
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', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
-
website
= 'http://www.linode.com/'¶
- key (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
- record (
-
website
= 'https://www.liquidweb.com'¶
- key (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
name
= 'Luadns'¶
-
type
= 'luadns'¶
-
website
= 'https://www.luadns.com'¶
- key (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
libcloud.common.nfsn.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
- name (
-
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
ofRecord
- zone (
-
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
ofRecord
-
name
= 'NFSN DNS'¶
-
type
= 'nfsn'¶
-
website
= 'https://www.nearlyfreespeech.net'¶
- key (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- domain (
-
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
-
list_records
(zone)[source]¶ Parameters: zone ( Zone
) – Zone to list records for.Returns: list
ofRecord
-
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
- record (
-
website
= 'https://ns1.com'¶
- key (
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
= {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
connectionCls
¶
-
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
- name (
-
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
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
- record (
-
website
= 'http://onapp.com/'¶
- key (
libcloud.dns.drivers.pointdns module¶
Point DNS Driver
-
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).
- id (
-
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.
- id (
-
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', 'ALIAS': 'ALIAS', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TXT': 'TXT'}¶
-
connectionCls
¶
-
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
- name (
-
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
- domain (
-
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
ofMailRedirect
- destination (
-
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
- redirect_to (
-
ex_delete_mail_redirect
(mail_r)[source]¶ Parameters: mail_r ( MailRedirect
) – Mail redirect to updateReturn type: bool
-
ex_delete_redirect
(redirect)[source]¶ Parameters: mail_r ( Redirect
) – Redirect to deleteReturn 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
ofMailRedirect
- zone (
-
ex_get_redirect
(zone_id, redirect_id)[source]¶ Parameters: - zone (
Zone
) – Zone to list redirects for. - redirect_id (
str
) – Redirect id.
Return type: list
ofRedirect
- zone (
-
ex_list_mail_redirects
(zone)[source]¶ Parameters: zone ( Zone
) – Zone to list redirects for.Return type: list
ofMailRedirect
-
ex_list_redirects
(zone)[source]¶ Parameters: zone ( Zone
) – Zone to list redirects for.Return type: list
ofRecord
-
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
ofMailRedirect
- mail_r (
-
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
ofRedirect
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
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
- 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
- zone (
-
website
= 'https://pointhq.com/'¶
- key (
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
andv1
are the only valid options. Defaults to usingexperimental
(optional)
Returns: None
-
RECORD_TYPE_MAP
= {'A': 'AFSDB', 'AAAA': 'AAAA', 'CERT': 'CERT', 'CNAME': 'CNAME', 'DNSKEY': 'DNSKEY', 'DS': 'DS', 'HINFO': 'HINFO', 'KEY': 'KEY', 'LOC': 'LOC', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'NSEC': 'NSEC', 'OPENPGPKEY': 'OPENPGPKEY', 'PTR': 'PTR', 'RP': 'RP', 'RRSIG': 'RRSIG', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT'}¶
-
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
- name (
-
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, specifyextra={'nameservers': ['ns1.example.org']}
to set a list of nameservers for this new zone.
Return type: Zone
- name (
-
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
ofRecord
-
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
- record (
-
website
= 'https://www.powerdns.com/'¶
- key (
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.
-
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]¶ Selects the endpoint to use based on provider specific values, or overrides passed in by the user when setting up the driver.
Returns: url of the relevant endpoint for the driver
-
get_poll_request_kwargs
(response, context, request_kwargs)[source]¶ Return keyword arguments which are passed to the request() method when polling for the job status.
Parameters: - response (
dict
) – Response object returned by poll request. - request_kwargs – Kwargs previously used to initiate the poll request.
:return
dict
Keyword arguments- response (
-
has_completed
(response)[source]¶ Return job completion status.
Parameters: response ( HTTPResponse
) – Response object returned by poll request.:return
bool
True if the job has completed, False otherwise.
-
poll_interval
= 2.5¶
-
responseCls
¶ alias of
RackspaceDNSResponse
-
timeout
= 30¶
-
libcloud.dns.drivers.rcodezero module¶
RcodeZero DNS Driver
-
class
libcloud.dns.drivers.rcodezero.
RcodeZeroDNSDriver
(key, secret=None, secure=True, host=None, port=None, api_version='v1', **kwargs)[source]¶ Bases:
libcloud.dns.base.DNSDriver
Parameters: - key (
str
) – API token to be used (required) - secret – Password to be used, ignored by RcodeZero
- secure (
bool
) – Whether to use HTTPS (default) or HTTP. - host (
str
) – Hostname used for connections. - port (
int
) – Port used for connections. - api_version (
str
) – Specifies the API version to use.v1
is currently the only valid option (and default)
Returns: None
-
RECORD_TYPE_MAP
= {'A': 'AFSDB', 'AAAA': 'AAAA', 'ALIAS': 'ALIAS', 'CERT': 'CERT', 'CNAME': 'CNAME', 'DNAME': 'DNAME', 'DNSKEY': 'DNSKEY', 'DS': 'DS', 'HINFO': 'HINFO', 'KEY': 'KEY', 'LOC': 'LOC', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'NSEC': 'NSEC', 'OPENPGPKEY': 'OPENPGPKEY', 'PTR': 'PTR', 'RP': 'RP', 'RRSIG': 'RRSIG', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
RcodeZeroConnection
-
create_record
(name, zone, type, data, extra=None)[source]¶ Create a new record in a given, existing zone.
Parameters: - name (
str
) – name of the new record without the domain name, for example “www”. - zone (
Zone
) – Zone in which the requested record is created. - type (
RecordType
) – DNS resource record type (A, AAAA, …). - data (
str
) – Data for the record (depending on the record type). - extra (
dict
) – Extra attributes: ‘ttl’, ‘disabled’
Return type: Record
- name (
-
create_zone
(domain, type='master', ttl=None, extra={})[source]¶ Create a new zone.
Parameters: - name (
str
) – Zone domain name (e.g. example.com) - domain (
Zone
) – Zone type (‘master’ / ‘slave’). (required). - ttl (
int
) – TTL for new records. (optional). Ignored by RcodeZero. RcodeZero uses record specific TTLs. - extra (
dict
) – Extra attributes: ‘masters’ (for type=slave):extra={'masters': ['193.0.2.2','2001:db8::2']}
sets the Master nameservers for a type=slave zone.
Return type: Zone
- name (
-
delete_record
(record)[source]¶ Delete a record in a given zone.
Parameters: record (Record) – record to delete (record object) Return type: bool
-
delete_zone
(zone)[source]¶ Delete a zone and all its records.
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Get a Zone object.
Parameters: zone_id ( str
) – name of the zone, for example “example.com”.Return type: Zone
Raises: ZoneDoesNotExistError: if zone could not be found.
-
list_records
(zone)[source]¶ Return a list of all record objects for the given zone.
Parameters: zone ( Zone
) – Zone object to list records for.Returns: list
ofRecord
-
name
= 'RcodeZero DNS'¶
-
type
= 'rcodezero'¶
-
update_record
(record, name, type, data, extra=None)[source]¶ Update an existing record.
Parameters: - record (
Record
) – Record object to update. - name (
str
) – name of the new record, for example “www”. - type (
RecordType
) – DNS resource record type (A, AAAA, …). - data (
str
) – Data for the record (depending on the record type). - extra (
dict
) – Extra attributes: ‘ttl’,’disabled’ (optional)
Return type: Record
- record (
-
update_zone
(zone, domain, type=None, 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 (‘master’ / ‘slave’). - ttl (
int
) – not supported. RcodeZero uses RRSet-specific TTLs - extra (
dict
) – Extra attributes: ‘masters’ (for type=slave)extra={'masters': ['193.0.2.2','2001:db8::2']}
sets the Master nameserver addresses for a type=slave zone
Return type: Zone
- zone (
-
website
= 'https://www.rcodezero.at/'¶
- key (
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', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
Route53Connection
-
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
- name (
-
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)
Return type: Zone
- domain (
-
delete_record
(record)[source]¶ Delete a record.
Parameters: record ( Record
) – Record to delete.Return type: bool
-
delete_zone
(zone, ex_delete_records=False)[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_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
oflibcloud.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]¶ Return a Record instance.
Parameters: - zone_id (
str
) – ID of the required zone - record_id (
str
) – ID of the required record
Return type: Record
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
iterate_zones
()[source]¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
name
= 'Route53 DNS'¶
-
type
= 'route53'¶
-
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). 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
- record (
-
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', 'MX': 'mx', 'NS': 'ns', 'PTR': 'ptr', 'SOA': 'soa', 'SPF': 'spf', 'SRV': 'srv', 'TXT': 'txt'}¶
-
connectionCls
¶
-
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
- name (
-
create_zone
(domain, 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)
Return type: Zone
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
iterate_zones
()[source]¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
name
= 'Softlayer DNS'¶
-
type
= 'softlayer'¶
-
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). 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
- record (
-
website
= 'https://www.softlayer.com'¶
- key (
libcloud.dns.drivers.vultr module¶
Vultr DNS Driver
-
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', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
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
- name (
-
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’})
- domain (
-
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
- record_id (
-
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
- zone_id (
-
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 - zone_id (
-
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
ofRecord
-
name
= 'Vultr DNS'¶
-
type
= 'vultr'¶
-
website
= 'http://www.vultr.com/'¶
- key (
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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SRV': 'SRV', 'TXT': 'TXT'}¶
-
connectionCls
¶ alias of
libcloud.common.worldwidedns.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
- name (
-
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
- domain (
-
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
- domain (
-
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
- domain (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
list_zones
()[source]¶ Return a list of zones.
Returns: list
ofZone
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
- 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
- zone (
-
website
= 'https://www.worldwidedns.net/'¶
- key (
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', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'GEO': 'GEO', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'PTR': 'PTR', 'REDIRECT': 'REDIRECT', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT', 'URL': 'URL'}¶
-
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 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_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 usedReturn type: Zone
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
iterate_zones
()[source]¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
name
= 'Zerigo DNS'¶
-
type
= 'zerigo'¶
-
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). 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
- record (
-
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/'¶
- key (
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', 'MX': 'MX', 'TXT': 'TXT'}¶
-
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
- name (
-
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
- zone (
-
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
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn 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
ofRecord
-
name
= 'Zonomi DNS'¶
-
type
= 'zonomi'¶
-
website
= 'https://zonomi.com'¶
- key (