AuroraDNS DNS driver documentation¶
PCextreme B.V. is a Dutch cloud provider. It provides a public cloud offering under the name AuroraCompute. All cloud services are under the family name Aurora.
AuroraDNS is a highly available DNS service which also provides health checking.
Records can be attached to a health check. When this health check becomes unhealthy this record will no longer be served.
This provides the possibility to create loadbalancing over multiple servers without the requirement of a central loadbalancer in the network. It is also provider agnostic, health checks can point to any IP/Host on the internet.
Instantiating a driver¶
When you instantiate a driver, you need to pass a your key
and secret
to the driver constructor. These can be obtained in the control panel of
AuroraDNS.
For example:
from libcloud.dns.types import Provider
from libcloud.dns.providers import get_driver
cls = get_driver(Provider.AURORADNS)
driver = cls('myapikey', 'mysecret')
Disabling and enabling records¶
Records in can be disabled and enabled. By default all new records are enabled, but this property can be set during creation and can be updated.
For example:
from libcloud.dns.types import Provider
from libcloud.dns.providers import get_driver
cls = get_driver(Provider.AURORADNS)
driver = cls('myapikey', 'mysecret')
In this example we create a record, but disable it. This means it will not be served.
Afterwards we enable the record and this make the DNS server serve this specific record.
API Docs¶
-
class
libcloud.dns.drivers.auroradns.
AuroraDNSDriver
(key, secret=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) - 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
-
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.
- zone (
-
iterate_records
(zone)¶ 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
-
update_zone
(zone, domain, type='master', ttl=None, extra=None)¶ Update en 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 (
- key (