World Wide DNS Driver Documentation¶
WorldWideDNS provides Primary DNS services, Secondary DNS services, and Dynamic DNS hosting services for thousands of businesses, website hosting, website developers, and consumers. Resellers can completely private label / white label DNS services with custom name servers.
Instantiating the driver¶
from libcloud.dns.types import Provider
from libcloud.dns.providers import get_driver
cls = get_driver(Provider.WORLDWIDEDNS)
# Normal account
driver = cls('username', 'apikey')
# Reseller account
driver = cls('username', 'apikey', reseller_id='reseller_id')
API Docs¶
- class libcloud.dns.drivers.worldwidedns.WorldWideDNSDriver(key, secret=None, reseller_id=None, secure=True, host=None, port=None, **kwargs)[source]¶
- 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 accountssecure (
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
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
- create_zone(domain, type='master', ttl=None, extra=None)[source]¶
Create a new zone.
- Parameters
domain (
str
) – Zone domain name (e.g. example.com)type (
str
) – Zone type (master / slave).ttl (
int
) – TTL for new records. (optional)extra (
dict
) – Extra attributes (driver specific). (optional). Possible parameter in here should be DYN which values should be 1 for standart and 2 for dynamic. Default is 1.
- Return type
Zone
For more info, please see https://www.worldwidedns.net/dns_api_protocol_new_domain.asp or https://www.worldwidedns.net/dns_api_protocol_new_domain_reseller.asp
- delete_record(record)[source]¶
Delete a record.
- Parameters
record (
Record
) – Record to delete.- Return type
bool
- delete_zone(zone)[source]¶
Delete a zone.
Note: This will delete all the records belonging to this zone.
- Parameters
zone (
Zone
) – Zone to delete.- Return type
bool
For more information, please see https://www.worldwidedns.net/dns_api_protocol_delete_domain.asp or https://www.worldwidedns.net/dns_api_protocol_delete_domain_reseller.asp
- ex_transfer_domain(domain, user_id)[source]¶
This command will allow you, if you are a reseller, to change the userid on a domain name to another userid in your account ONLY if that new userid is already created.
- Parameters
domain (
str
) – Domain name.user_id (
str
) – The new userid to connect to the domain name.
- Return type
bool
For more info, please see: https://www.worldwidedns.net/dns_api_protocol_transfer.asp
- ex_view_zone(domain, name_server)[source]¶
View zone file from a name server
- Parameters
domain (
str
) – Domain name.name_server (
int
) – Name server to check. (1, 2 or 3)
- Return type
str
For more info, please see: https://www.worldwidedns.net/dns_api_protocol_viewzone.asp or https://www.worldwidedns.net/dns_api_protocol_viewzone_reseller.asp
- export_zone_to_bind_format(zone)¶
Export Zone object to the BIND compatible format.
- Parameters
zone (
Zone
) – Zone to export.- Returns
Zone data in BIND compatible format.
- Return type
str
- export_zone_to_bind_zone_file(zone, file_path)¶
Export Zone object to the BIND compatible format and write result to a file.
- Parameters
zone (
Zone
) – Zone to export.file_path (
str
) – File path where the output will be saved.
- get_record(zone_id, record_id)[source]¶
Return a Record instance.
- Parameters
zone_id (
str
) – ID of the required zonerecord_id (
str
) – ID number of the required record.
- Return type
Record
- get_zone(zone_id)[source]¶
Return a Zone instance.
- Parameters
zone_id (
str
) – ID of the required zone- Return type
Zone
- iterate_records(zone)[source]¶
Return a generator to iterate over records for the provided zone.
- Parameters
zone (
Zone
) – Zone to list records for.- Return type
generator
ofRecord
- iterate_zones()¶
Return a generator to iterate over available zones.
- Return type
generator
ofZone
- list_record_types()¶
Return a list of RecordType objects supported by the provider.
- Returns
list
ofRecordType
- list_records(zone)¶
Return a list of records for the provided zone.
- Parameters
zone (
Zone
) – Zone to list records for.- Returns
list
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
- update_record(record, name, type, data, extra=None)[source]¶
Update an existing record.
- Parameters
record (
Record
) – Record to update.name (
str
) – Record name without the domain name (e.g. www). Note: If you want to create a record for a base domain name, you should specify empty string (‘’) for this argument.type (
RecordType
) – DNS record type (MX, CNAME, A, NS, SRV, TXT).data (
str
) – Data for the record (depends on the record type).extra (
dict
) – Contains ‘entry’ Entry position (1 thru 40)
- Return type
Record
- update_zone(zone, domain, type='master', ttl=None, extra=None, ex_raw=False)[source]¶
Update an existing zone.
- Parameters
zone (
Zone
) – Zone to update.domain (
str
) – Zone domain name (e.g. example.com)type (
str
) – Zone type (master / slave).ttl (
int
) – TTL for new records. (optional)extra (
dict
) – Extra attributes (driver specific) (optional). Values not specified such as SECURE, IP, FOLDER, HOSTMASTER, REFRESH, RETRY and EXPIRE will be kept as already is. The same will be for S(1 to 40), T(1 to 40) and D(1 to 40) if not in raw mode and for ZONENS and ZONEDATA if it is.ex_raw (
bool
) – Mode we use to do the update using zone file or not.
- Return type
Zone
For more info, please see https://www.worldwidedns.net/dns_api_protocol_list_domain.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_raw.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_reseller.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_raw_reseller.asp