Package dns :: Module rdataset :: Class Rdataset
[show private | hide private]
[frames | no frames]

Class Rdataset

object --+    
         |    
       Set --+
             |
            Rdataset

Known Subclasses:
RRset

A DNS rdataset.
Method Summary
  __init__(self, rdclass, rdtype, covers)
Create a new rdataset of the specified class and type.
  __add__(self, other)
(inherited from Set)
  __and__(self, other)
(inherited from Set)
  __copy__(self)
Make a (shallow) copy of the set. (inherited from Set)
bool __eq__(self, other)
Two rdatasets are equal if they have the same class, type, and covers, and contain the same rdata.
  __iadd__(self, other)
(inherited from Set)
  __iand__(self, other)
(inherited from Set)
  __ior__(self, other)
(inherited from Set)
  __isub__(self, other)
(inherited from Set)
  __iter__(self)
(inherited from Set)
  __len__(self)
(inherited from Set)
  __ne__(self, other)
a new object with type S, a subtype of T __new__(S, ...)
  __or__(self, other)
(inherited from Set)
  __repr__(self)
  __str__(self)
  __sub__(self, other)
(inherited from Set)
  add(self, rd, ttl)
Add the specified rdata to the rdataset.
  clear(self)
Make the set empty. (inherited from Set)
  copy(self)
Make a (shallow) copy of the set. (inherited from Set)
the same type as self difference(self, other)
Return a new set which self - other, i.e. (inherited from Set)
  difference_update(self, other)
Update the set, removing any elements from other which are in the set. (inherited from Set)
  discard(self, item)
Remove an item from the set if present. (inherited from Set)
the same type as self intersection(self, other)
Return a new set which is the intersection of self and other. (inherited from Set)
  intersection_update(self, other)
Update the set, removing any elements from other which are not in both sets.
bool issubset(self, other)
Is self a subset of other? (inherited from Set)
bool issuperset(self, other)
Is self a superset of other? (inherited from Set)
  match(self, rdclass, rdtype, covers)
Returns True if this rdataset matches the specified class, type, and covers
  remove(self, item)
Remove an item from the set. (inherited from Set)
  to_text(self, name, origin, relativize, override_rdclass, **kw)
Convert the rdataset into DNS master file format.
int to_wire(self, name, file, compress, origin, override_rdclass, want_shuffle)
Convert the rdataset to wire format.
the same type as self union(self, other)
Return a new set which is the union of self and other. (inherited from Set)
  union_update(self, other)
Update the set, adding any elements from other which are not already in the set.
  update(self, other)
Add all rdatas in other to self.
  update_ttl(self, ttl)
Set the TTL of the rdataset to be the lesser of the set's current TTL or the specified TTL.

Instance Variable Summary
  covers - The covered type.
  rdclass - The class of the rdataset
  rdtype - The type of the rdataset
  ttl - The DNS TTL (Time To Live) value

Class Variable Summary
list __slots__
int covers
int rdclass
int rdtype
int ttl

Method Details

__init__(self, rdclass, rdtype, covers=0)
(Constructor)

Create a new rdataset of the specified class and type.

See also: the description of the class instance variables for the meaning of rdclass and rdtype

__eq__(self, other)
(Equality operator)

Two rdatasets are equal if they have the same class, type, and covers, and contain the same rdata.
Returns:
bool

__new__(S, ...)

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

add(self, rd, ttl=None)

Add the specified rdata to the rdataset.

If the optional ttl parameter is supplied, then self.update_ttl(ttl) will be called prior to adding the rdata.
Parameters:
rd - The rdata
           (type=dns.rdata.Rdata object)
ttl - The TTL
           (type=int)

intersection_update(self, other)

Update the set, removing any elements from other which are not in both sets.
Parameters:
other - the collection of items with which to update the set
           (type=Set object)
Overrides:
dns.set.Set.intersection_update (inherited documentation)

match(self, rdclass, rdtype, covers)

Returns True if this rdataset matches the specified class, type, and covers

to_text(self, name=None, origin=None, relativize=True, override_rdclass=None, **kw)

Convert the rdataset into DNS master file format.
Parameters:
name - If name is not None, emit a RRs with name as the owner name.
           (type=dns.name.Name object)
origin - The origin for relative names, or None.
           (type=dns.name.Name object)
relativize - True if names should names be relativized
           (type=bool)

See also:

dns.name.Name.choose_relativity for more information on how origin and relativize determine the way names are emitted.

Any additional keyword arguments are passed on to the rdata to_text() method.

to_wire(self, name, file, compress=None, origin=None, override_rdclass=None, want_shuffle=True)

Convert the rdataset to wire format.
Parameters:
name - The owner name of the RRset that will be emitted
           (type=dns.name.Name object)
file - The file to which the wire format data will be appended
           (type=file)
compress - The compression table to use; the default is None.
           (type=dict)
origin - The origin to be appended to any relative names when they are emitted. The default is None.
Returns:
the number of records emitted
           (type=int)

union_update(self, other)

Update the set, adding any elements from other which are not already in the set.
Parameters:
other - the collection of items with which to update the set
           (type=Set object)
Overrides:
dns.set.Set.union_update (inherited documentation)

update(self, other)

Add all rdatas in other to self.
Parameters:
other - The rdataset from which to update
           (type=dns.rdataset.Rdataset object)

update_ttl(self, ttl)

Set the TTL of the rdataset to be the lesser of the set's current TTL or the specified TTL. If the set contains no rdatas, set the TTL to the specified TTL.
Parameters:
ttl - The TTL
           (type=int)

Instance Variable Details

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.

rdclass

The class of the rdataset

rdtype

The type of the rdataset

ttl

The DNS TTL (Time To Live) value

Class Variable Details

__slots__

Type:
list
Value:
['rdclass', 'rdtype', 'covers', 'ttl']                                 

covers

Type:
int
Value:
<member 'covers' of 'Rdataset' objects>                                

rdclass

Type:
int
Value:
<member 'rdclass' of 'Rdataset' objects>                               

rdtype

Type:
int
Value:
<member 'rdtype' of 'Rdataset' objects>                                

ttl

Type:
int
Value:
<member 'ttl' of 'Rdataset' objects>                                   

Generated by Epydoc 1.1 on Fri Nov 7 14:49:27 2003 http://epydoc.sf.net