MDNS¶
MDNS Handler¶
MDNS Middleware¶
MDNS Notify¶
-
class
designate.mdns.notify.
NotifyEndpoint
(tg)[source]¶ Bases:
designate.mdns.base.BaseEndpoint
-
RPC_API_NAMESPACE
= 'notify'¶
-
RPC_API_VERSION
= '2.0'¶
-
get_serial_number
(context, domain, host, port, timeout, retry_interval, max_retries, delay)[source]¶ Parameters: - context – The user context.
- domain – The designate domain object. This contains the domain name. domain.serial = expected_serial
- host – A notify is sent to this host.
- port – A notify is sent to this port.
- timeout – The time (in seconds) to wait for a SOA response from nameserver.
- retry_interval – The time (in seconds) between retries.
- max_retries – The maximum number of retries mindns would do for an expected serial number. After this many retries, mindns returns an ERROR.
- delay – The time to wait before sending the first request.
Returns: a tuple of (status, actual_serial, retries) status is either “SUCCESS” or “ERROR”. actual_serial is either the serial number returned in the SOA message from the nameserver or None. retries is the number of retries left. The return value is just used for testing and not by pool manager. The pool manager is informed of the status with update_status.
-
notify_zone_changed
(context, domain, host, port, timeout, retry_interval, max_retries, delay)[source]¶ Parameters: - context – The user context.
- domain – The designate domain object. This contains the domain name.
- host – A notify is sent to this host.
- port – A notify is sent to this port.
- timeout – The time (in seconds) to wait for a NOTIFY response from server.
- retry_interval – The time (in seconds) between retries.
- max_retries – The maximum number of retries mindns would do for sending a NOTIFY message. After this many retries, mindns gives up.
- delay – The time to wait before sending the first NOTIFY request.
Returns: a tuple of (response, current_retry) where response is the response on success or None on failure. current_retry is the current retry number. The return value is just used for testing and not by pool manager.
-
poll_for_serial_number
(context, domain, nameserver, timeout, retry_interval, max_retries, delay)[source]¶ Parameters: - context – The user context.
- domain – The designate domain object. This contains the domain name. domain.serial = expected_serial
- nameserver – Destination for the poll
- timeout – The time (in seconds) to wait for a SOA response from nameserver.
- retry_interval – The time (in seconds) between retries.
- max_retries – The maximum number of retries mindns would do for an expected serial number. After this many retries, mindns returns an ERROR.
- delay – The time to wait before sending the first request.
Returns: The pool manager is informed of the status with update_status.
-
MDNS RPC API¶
-
class
designate.mdns.rpcapi.
MdnsAPI
(topic=None)[source]¶ Bases:
object
Client side of the mdns RPC API.
Notify API version history:
1.0 - Added notify_zone_changed and poll_for_serial_number. 1.1 - Added get_serial_number. 2.0 - Changed method signatures- XFR API version history:
- 1.0 - Added perform_zone_xfr.
-
RPC_NOTIFY_API_VERSION
= '2.0'¶
-
RPC_XFR_API_VERSION
= '1.0'¶
-
classmethod
get_instance
()[source]¶ The rpc.get_client() which is called upon the API object initialization will cause a assertion error if the designate.rpc.TRANSPORT isn’t setup by rpc.init() before.
This fixes that by creating the rpcapi when demanded.
-
get_serial_number
(context, domain, host, port, timeout, retry_interval, max_retries, delay)[source]¶