Package dns :: Module node :: Class Node
[show private | hide private]
[frames | no frames]

Class Node

object --+
         |
        Node


A DNS node.

A node is a set of rdatasets
Method Summary
  __init__(self)
Initialize a DNS node.
bool __eq__(self, other)
Two nodes are equal if they have the same rdatasets.
  __iter__(self)
  __len__(self)
  __ne__(self, other)
a new object with type S, a subtype of T __new__(S, ...)
  __repr__(self)
dns.rdataset.Rdataset object find_rdataset(self, rdclass, rdtype, covers, create, force_unique)
Find an rdataset matching the specified properties in the current node.
string to_text(self, name, **kw)
Convert a node to text format.

Instance Variable Summary
list of dns.rdataset.Rdataset objects rdatasets - the node's rdatasets

Method Details

__init__(self)
(Constructor)

Initialize a DNS node.

__eq__(self, other)
(Equality operator)

Two nodes are equal if they have the same rdatasets.
Returns:
bool

__new__(S, ...)

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

find_rdataset(self, rdclass, rdtype, covers=0, create=0, force_unique=0)

Find an rdataset matching the specified properties in the current node.
Parameters:
rdclass - The class of the rdataset
           (type=int)
rdtype - The type of the rdataset
           (type=int)
covers - The covered type. Usually this value is dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG, then the covers value will be the rdata type the SIG covers. The library treats the SIG type as if it were a family of types, e.g. SIG(A), SIG(NS), SIG(SOA). This makes SIGs much easier to work with than if SIGs covering different rdata types were aggregated into a single SIG rdataset.
           (type=int)
create - If True, create the rdataset if it is not found, unless force_unique is also True, in which case always create a new rdataset. The created rdataset is appended to self.rdatasets.
           (type=bool)
force_unique - If create is True, always create the rdataset, even if it already exists.
           (type=bool)
Returns:
dns.rdataset.Rdataset object

to_text(self, name, **kw)

Convert a node to text format.

Each rdataset at the node is printed. Any keyword arguments to this method are passed on to the rdataset's to_text() method.
Parameters:
name - the owner name of the rdatasets
           (type=dns.name.Name object)
Returns:
string

Instance Variable Details

rdatasets

the node's rdatasets
Type:
list of dns.rdataset.Rdataset objects

Generated by Epydoc 1.1 on Wed Jul 30 23:38:03 2003 http://epydoc.sf.net