Package dns :: Module rrset :: Class RRset
[show private | hide private]
[frames | no frames]

Class RRset

object --+        
         |        
       Set --+    
             |    
      Rdataset --+
                 |
                RRset


A DNS RRset (named rdataset).

RRset inherits from Rdataset, and RRsets can be treated as Rdatasets in most cases. There are, however, a few notable exceptions. RRsets have different to_wire() and to_text() method arguments, reflecting the fact that RRsets always have an owner name.
Method Summary
  __init__(self, name, rdclass, rdtype, covers, deleting)
Create a new RRset.
  __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 RRsets are equal if they have the same name and the same rdataset
  __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)
(inherited from Rdataset)
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. (inherited from 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. (inherited from Rdataset)
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, name, rdclass, rdtype, covers, deleting)
Returns True if this rrset matches the specified class, type, covers, and deletion state.
  remove(self, item)
Remove an item from the set. (inherited from Set)
  to_text(self, origin, relativize, **kw)
Convert the RRset into DNS master file format.
  to_wire(self, file, compress, origin, **kw)
Convert the RRset 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. (inherited from Rdataset)
  update(self, other)
Add all rdatas in other to self. (inherited from Rdataset)
  update_ttl(self, ttl)
Set the TTL of the rdataset to be the lesser of the set's current TTL or the specified TTL. (inherited from Rdataset)
  _clone(self)
Make a (shallow) copy of the set.

Class Variable Summary
list __slots__
member_descriptor deleting
member_descriptor name

Method Details

__init__(self, name, rdclass, rdtype, covers=0, deleting=None)
(Constructor)

Create a new RRset.

__eq__(self, other)
(Equality operator)

Two RRsets are equal if they have the same name and the same rdataset
Returns:
bool

__new__(S, ...)

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

match(self, name, rdclass, rdtype, covers, deleting=None)

Returns True if this rrset matches the specified class, type, covers, and deletion state.

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

Convert the RRset into DNS master file format.
Parameters:
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, file, compress=None, origin=None, **kw)

Convert the RRset to wire format.

_clone(self)

Make a (shallow) copy of the set.

There is a 'clone protocol' that subclasses of this class should use. To make a copy, first call your super's _clone() method, and use the object returned as the new instance. Then make shallow copies of the attributes defined in the subclass.

This protocol allows us to write the set algorithms that return new instances (e.g. union) once, and keep using them in subclasses.
Overrides:
dns.rdataset.Rdataset._clone (inherited documentation)

Class Variable Details

__slots__

Type:
list
Value:
['name', 'deleting']                                                   

deleting

Type:
member_descriptor
Value:
<member 'deleting' of 'RRset' objects>                                 

name

Type:
member_descriptor
Value:
<member 'name' of 'RRset' objects>                                     

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