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

Type 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.
bool __eq__(self, other)
Two RRsets are equal if they have the same name and the same rdataset
  __repr__(self)
  __str__(self)
  match(self, name, rdclass, rdtype, covers, deleting)
Returns True if this rrset matches the specified class, type, covers, and deletion state.
  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.
  _clone(self)
Make a (shallow) copy of the set.
    Inherited from Rdataset
  __ne__(self, other)
  add(self, rd, ttl)
Add the specified rdata to the rdataset.
  intersection_update(self, other)
Update the set, removing any elements from other which are not in both sets.
  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.
    Inherited from Set
  __add__(self, other)
  __and__(self, other)
  __copy__(self)
Make a (shallow) copy of the set.
  __delitem__(self, i)
  __delslice__(self, i, j)
  __getitem__(self, i)
  __getslice__(self, i, j)
  __iadd__(self, other)
  __iand__(self, other)
  __ior__(self, other)
  __isub__(self, other)
  __iter__(self)
  __len__(self)
  __or__(self, other)
  __sub__(self, other)
  clear(self)
Make the set empty.
  copy(self)
Make a (shallow) copy of the set.
the same type as self difference(self, other)
Return a new set which self - other, i.e.
  difference_update(self, other)
Update the set, removing any elements from other which are in the set.
  discard(self, item)
Remove an item from the set if present.
the same type as self intersection(self, other)
Return a new set which is the intersection of self and other.
bool issubset(self, other)
Is self a subset of other?
bool issuperset(self, other)
Is self a superset of other?
  remove(self, item)
Remove an item from the set.
the same type as self union(self, other)
Return a new set which is the union of self and other.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Instance Variable Summary
    Inherited from Rdataset
int covers: The covered type.
int rdclass: The class of the rdataset
int rdtype: The type of the rdataset
int ttl: The DNS TTL (Time To Live) value
    Inherited from Set
list items: A list of the items which are in the set

Class Variable Summary
list __slots__ = ['name', 'deleting']
member_descriptor deleting = <member 'deleting' of 'RRset' objects>
member_descriptor name = <member 'name' of 'RRset' objects>

Method Details

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

Create a new RRset.
Overrides:
dns.rdataset.Rdataset.__init__

__eq__(self, other)
(Equality operator)

Two RRsets are equal if they have the same name and the same rdataset
Returns:
bool
Overrides:
dns.rdataset.Rdataset.__eq__

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

Returns True if this rrset matches the specified class, type, covers, and deletion state.
Overrides:
dns.rdataset.Rdataset.match

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)
Overrides:
dns.rdataset.Rdataset.to_text

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.
Overrides:
dns.rdataset.Rdataset.to_wire

_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 2.1 on Sun Jul 31 21:35:42 2005 http://epydoc.sf.net