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: 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: Dict[RecordType, str] = {'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

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

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

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 of Record

list_zones()[source]

Return a list of zone objects for this account.

Returns:

list of Zone

name: str = '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

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

website: str = 'https://www.rcodezero.at/'