MDNS

MDNS Handler

class designate.mdns.handler.RequestHandler(storage, tg)[source]

Bases: designate.mdns.xfr.XFRMixin

central_api[source]

MDNS Middleware

MDNS Notify

class designate.mdns.notify.NotifyEndpoint(tg)[source]

Bases: designate.mdns.base.BaseEndpoint

RPC_API_NAMESPACE = 'notify'
RPC_API_VERSION = '1.1'
get_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 – nameserver.host:nameserver.port is checked for an updated serial number.
  • 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, nameserver, timeout, retry_interval, max_retries, delay)[source]
Parameters:
  • context – The user context.
  • domain – The designate domain object. This contains the domain name.
  • nameserver – A notify is sent to nameserver.host:nameserver.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 – nameserver.host:nameserver.port is checked for an updated serial number.
  • 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.
XFR API version history:
1.0 - Added perform_zone_xfr.
RPC_NOTIFY_API_VERSION = '1.1'
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, nameserver, timeout, retry_interval, max_retries, delay)[source]
notify_zone_changed(context, domain, nameserver, timeout, retry_interval, max_retries, delay)[source]
perform_zone_xfr(context, domain)[source]
poll_for_serial_number(context, domain, nameserver, timeout, retry_interval, max_retries, delay)[source]

MDNS Service

class designate.mdns.service.Service(threads=None)[source]

Bases: designate.service.DNSService, designate.service.RPCService, designate.service.Service

service_name[source]

Incubated Project

Table Of Contents

Previous topic

Central

Next topic

Objects

This Page