Backend¶
Backend Base¶
- class designate.backend.base.Backend(target)[source]¶
Bases:
designate.plugin.DriverPlugin
Base class for backend implementations
- abstract create_zone(context, zone)[source]¶
Create a DNS zone.
- Parameters
context – Security context information.
zone – the DNS zone.
Backend Bind9¶
Bind 9 backend. Create and delete zones by executing rndc
- class designate.backend.impl_bind9.Bind9Backend(target)[source]¶
Bases:
designate.backend.base.Backend
- create_zone(context, zone)[source]¶
Create a new Zone by executin rndc, then notify mDNS Do not raise exceptions if the zone already exists.
Backend Designate¶
- class designate.backend.impl_designate.DesignateBackend(target)[source]¶
Bases:
designate.backend.base.Backend
Support for Designate to Designate using Secondary zones.
- property client¶
Backend Dynect¶
- class designate.backend.impl_dynect.DynClient(customer_name, user_name, password, endpoint='https://api.dynect.net:443', api_version='3.5.6', headers=None, verify=True, retries=1, timeout=10, timings=False, pool_maxsize=10, pool_connections=10)[source]¶
Bases:
object
DynECT service client.
- poll_response(response)[source]¶
The API might return a job nr in the response in case of a async response: https://github.com/fog/fog/issues/575
- exception designate.backend.impl_dynect.DynClientAuthError(data=None, job_id=None, msgs=None, http_status=None, url=None, method=None, details=None)[source]¶
- exception designate.backend.impl_dynect.DynClientError(data=None, job_id=None, msgs=None, http_status=None, url=None, method=None, details=None)[source]¶
Bases:
designate.exceptions.Backend
The base exception class for all HTTP exceptions.
- exception designate.backend.impl_dynect.DynClientOperationBlocked(*args, **kwargs)[source]¶
Bases:
designate.exceptions.BadRequest
,designate.backend.impl_dynect.DynClientError
- error_type = 'operation_blocked'¶
- class designate.backend.impl_dynect.DynECTBackend(target)[source]¶
Bases:
designate.backend.base.Backend
Support for DynECT as a secondary DNS.
- create_zone(context, zone)[source]¶
Create a DNS zone.
- Parameters
context – Security context information.
zone – the DNS zone.
Backend Infoblox¶
- class designate.backend.impl_infoblox.InfobloxBackend(*args, **kwargs)[source]¶
Bases:
designate.backend.base.Backend
Provides a Designate Backend for Infoblox
Backend Nsd4¶
Backend Fake¶
- class designate.backend.impl_fake.FakeBackend(target)[source]¶
Backend PowerDNS 4¶
Agent Backend KnotDNS¶
backend.agent_backend.impl_knot2¶
Knot DNS agent backend
Create, update, delete zones locally on a Knot DNS resolver using the knotc utility.
Supported Knot versions: >= 2.1, < 3
Warning
Untested, do not use in production.
Note
If the backend is killed during a configuration transaction it might be required to manually abort the transaction with sudo knotc conf-abort
Configured in [service:agent:knot2]
- class designate.backend.agent_backend.impl_knot2.Knot2Backend(*a, **kw)[source]¶
Bases:
designate.backend.agent_backend.base.AgentBackend
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __backend_status__ = 'untested'¶
- __module__ = 'designate.backend.agent_backend.impl_knot2'¶
- __plugin_name__ = 'knot2'¶
- _abc_impl = <_abc._abc_data object>¶
- _execute_knotc(*knotc_args, **kw)[source]¶
Run the Knot client and check the output
- Parameters
expected_output (str) – expected output (default: ‘OK’)
expected_error (str) – expected alternative output, will be logged as info(). Default: not set.
- _lock_name = 'knot2.lock'¶
- _modify_zone(*knotc_args, **kw)[source]¶
Create or delete a zone while locking, and within a Knot transaction. Knot supports only one config transaction at a time.
- Raises
exceptions.Backend
- _start_minidns_to_knot_axfr(zone_name)[source]¶
Instruct Knot to request an AXFR from MiniDNS. No need to lock or enter a configuration transaction.
- create_zone(zone)[source]¶
Create a new Zone by executing knotc Do not raise exceptions if the zone already exists.
- Parameters
zone (raw pythondns Zone) – zone to be created
- delete_zone(zone_name)[source]¶
Delete a new Zone by executing knotc Do not raise exceptions if the zone does not exist.
- Parameters
zone_name (str) – zone name
Agent Backend gdnsd¶
backend.agent_backend.impl_gdnsd¶
gdnsd agent backend
Create, update, delete zones locally on a gdnsd resolver using the gdnsd utility.
Supported Knot versions: >= 2.1, < 3
Warning
Untested, do not use in production.
Note
If the backend is killed during a configuration transaction it might be required to manually abort the transaction with sudo gdnsd conf-abort
Configured in [service:agent:gdnsd]
- class designate.backend.agent_backend.impl_gdnsd.GdnsdBackend(*a, **kw)[source]¶
Bases:
designate.backend.agent_backend.base.AgentBackend
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __backend_status__ = 'experimental'¶
- __module__ = 'designate.backend.agent_backend.impl_gdnsd'¶
- __plugin_name__ = 'gdnsd'¶
- _abc_impl = <_abc._abc_data object>¶
- _generate_zone_filename(zone_name)[source]¶
Generate a filename for a zone file “/” is traslated into “@” Non-valid characters are translated into NNN where NNN is a decimal integer in the range 0 - 255 The filename is lowercase
- Returns
valid filename (string)
- _write_zone_file(zone)[source]¶
Create or update a zone file atomically. The zone file is written to a unique temp file and then renamed
- find_zone_serial(zone_name)[source]¶
Query the local resolver for a zone Times out after SOA_QUERY_TIMEOUT
Agent Backend Djbdns¶
backend.agent_backend.impl_djbdns¶
Djbdns DNS agent backend
Create, update, delete zones locally on a Djbdns DNS resolver using the axfr-get utility.
Warning
Untested, do not use in production.
Configured in [service:agent:djbdns]
- Requires rootwrap (or equivalent sudo privileges) to execute:
tcpclient
axfr-get
tinydns-data
- class designate.backend.agent_backend.impl_djbdns.DjbdnsBackend(*a, **kw)[source]¶
Bases:
designate.backend.agent_backend.base.AgentBackend
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __backend_status__ = 'experimental'¶
- __module__ = 'designate.backend.agent_backend.impl_djbdns'¶
- __plugin_name__ = 'djbdns'¶
- _abc_impl = <_abc._abc_data object>¶
- static _concatenate_zone_datafiles(data_fn, path_glob)[source]¶
Concatenate all zone datafiles into ‘data’
- _perform_axfr_from_minidns(zone_name)[source]¶
Instruct axfr-get to request an AXFR from MiniDNS.
- Raises
exceptions.Backend on error
- _rebuild_data_cdb()[source]¶
Rebuild data.cdb file from zone datafiles Requires global lock
On zone creation, axfr-get creates datafiles atomically by doing rename. On zone deletion, os.remove deletes the file atomically Globbing and reading the datafiles can be done without locking on them. The data and data.cdb files are written into a unique temp directory
Agent Backend MSDNS¶
- class designate.backend.agent_backend.impl_msdns.MSDNSBackend(agent_service)[source]¶
Bases:
designate.backend.agent_backend.base.AgentBackend
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __backend_status__ = 'experimental'¶
- __module__ = 'designate.backend.agent_backend.impl_msdns'¶
- __plugin_name__ = 'msdns'¶
- _abc_impl = <_abc._abc_data object>¶