Package DNS :: Module zone :: Class Zone
[show private | hide private]
[frames | no frames]

Class Zone

object --+
         |
        Zone


A DNS zone.

Zones are a container for nodes. The zone object may be treated like a dictionary, e.g. zone[name] will retrieve the node associated with that name. The name may be a DNS.name.Name object, or it may be a string. In the either case, if the name is relative it is treated as relative to the origin of the zone.
Method Summary
  __init__(self, origin, rdclass)
Initialize a zone object.
  __getitem__(self, key)
  __iter__(self)
a new object with type S, a subtype of T __new__(S, ...)
  __setitem__(self, key, value)

Instance Variable Summary
DNS.name.Name object current_origin - The current origin (used when reading from master file format).
DNS.name.Name object last_name - The last name read (used when reading from master file format).
dict nodes - A dictionary mapping the names of nodes in the zone to the nodes themselves.
DNS.name.Name object origin - The origin of the zone.
int rdclass - The zone's rdata class; the default is class IN.
int ttl - The default TTL (used when reading from master file format).

Method Details

__init__(self, origin, rdclass=1)
(Constructor)

Initialize a zone object.
Parameters:
origin - The origin of the zone.
           (type=DNS.name.Name object or string)
rdclass - The zone's rdata class; the default is class IN.
           (type=int)

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

Instance Variable Details

current_origin

The current origin (used when reading from master file format).
Type:
DNS.name.Name object

last_name

The last name read (used when reading from master file format).
Type:
DNS.name.Name object

nodes

A dictionary mapping the names of nodes in the zone to the nodes themselves.
Type:
dict

origin

The origin of the zone.
Type:
DNS.name.Name object

rdclass

The zone's rdata class; the default is class IN.
Type:
int

ttl

The default TTL (used when reading from master file format).
Type:
int

Generated by Epydoc 1.1 on Tue Jun 17 03:55:12 2003 http://epydoc.sf.net