MDNS

MDNS Base

class designate.mdns.base.BaseEndpoint(tg)[source]

Bases: object

RPC_API_NAMESPACE = None
RPC_API_VERSION = None
central_api[source]
pool_manager_api[source]

MDNS Handler

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

Bases: designate.mdns.xfr.XFRMixin

central_api[source]

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, zone, host, port, timeout, retry_interval, max_retries, delay)[source]
Parameters:
  • context – The user context.
  • zone – The designate zone object. This contains the zone name. zone.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, zone, host, port, timeout, retry_interval, max_retries, delay)[source]
Parameters:
  • context – The user context.
  • zone – The designate zone object. This contains the zone 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, zone, nameserver, timeout, retry_interval, max_retries, delay)[source]

Get the serial number of a zone on a resolver, then call update_status on Pool Manager to update the zone status.

Parameters:
  • context – The user context.
  • zone – The designate zone object. This contains the zone name. zone.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:

None

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, zone, host, port, timeout, retry_interval, max_retries, delay)[source]
notify_zone_changed(context, zone, host, port, timeout, retry_interval, max_retries, delay)[source]
perform_zone_xfr(context, zone)[source]
poll_for_serial_number(context, zone, nameserver, timeout, retry_interval, max_retries, delay)[source]

MDNS Service

class designate.mdns.service.Service(*args, **kwargs)[source]

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

service_name[source]
storage[source]

MDNS XFR

class designate.mdns.xfr.XFRMixin[source]

Bases: object

Utility mixin that holds common methods for XFR functionality.

zone_sync(context, zone, servers=None)[source]
class designate.mdns.xfr.XfrEndpoint(tg)[source]

Bases: designate.mdns.base.BaseEndpoint, designate.mdns.xfr.XFRMixin

RPC_API_NAMESPACE = 'xfr'
RPC_API_VERSION = '1.0'
perform_zone_xfr(context, zone)[source]

Table Of Contents

Previous topic

Central

Next topic

Objects

Project Source

This Page