4.5.6. Reverse DNS

class dyn.tm.services.reversedns.ReverseDNS(zone, fqdn, *args, **kwargs)[source]

A DynECT ReverseDNS service

__init__(zone, fqdn, *args, **kwargs)[source]

Create an new ReverseDNS object instance

Parameters:
  • zone – The zone under which this service will be attached
  • fqdn – The fqdn where this service will be located
  • hosts – A list of Hostnames of the zones where you want to track records
  • netmask – A netmask to match A/AAAA rdata against. Matched records will get PTR records, any others won’t
  • ttl – TTL for the created PTR records. May be omitted, explicitly specified, set to ‘default’, or ‘match’
  • record_types – A list of which type of records this service will track. Note: Both A and AAAA can not be monitored by the same service
activate()[source]

Activate this ReverseDNS service

active

Indicates whether or not the service is active. When setting directly, rather than using activate/deactivate valid arguments are ‘Y’ or True to activate, or ‘N’ or False to deactivate. Note: If your service is already active and you try to activate it, nothing will happen. And vice versa for deactivation.

Returns:An Active object representing the current state of this ReverseDNS Service
deactivate()[source]

Deactivate this ReverseDNS service

delete()[source]

Delete this ReverseDNS service from the DynECT System

fqdn

The fqdn that this ReverseDNS Service is attached to is a read-only attribute

hosts

Hostnames of zones in your account where you want to track records

iptrack_id

The unique System id for this service. This is a read-only property.

netmask

A netmask to match A/AAAA rdata against. Matched records will get PTR records, any others won’t

record_types

Types of records to track

ttl

TTL for the created PTR records. Omit to use zone default

zone

The zone that this ReverseDNS Service is attached to is a read-only attribute

4.5.6.1. Reverse DNS Examples

The following examples highlight how to use the ReverseDNS class to get/create ReverseDNS‘s on the dyn.tm System and how to edit these objects from within a Python script.

4.5.6.1.1. Creating a new Reverse DNS Service

The following example shows how to create a new ReverseDNS on the dyn.tm System and how to edit some of the fields using the returned ReverseDNS object.

>>> from dyn.tm.services.reversedns import ReverseDNS
>>> # Create a dyn.tmSession
>>> # Assuming you own the zone 'example.com'
>>> rdns = ReverseDNS('example.com', 'example.com.', ['example.com],
...                   '127.0.0.0/8')
>>> rdns.deactivate()
>>> rdns.active
u'N'

4.5.6.1.2. Getting an Existing Reverse DNS Service

The following example shows how to get an existing ReverseDNS from the dyn.tm System and how to edit some of the same fields mentioned above.

>>> from dyn.tm.services.reversedns import ReverseDNS
>>> # Create a dyn.tmSession
>>> # Once again, assuming you own 'example.com'
>>> rdns = ReverseDNS('example.com', 'example.com.', my_rdns_id)