Source code for octodns.record.rr
#
#
#
from .exception import RecordException
[docs]
class RrParseError(RecordException):
[docs]
def __init__(self, message='failed to parse string value as RR text'):
super().__init__(message)
[docs]
class Rr(object):
'''
Simple object intended to be used with Record.from_rrs to allow providers
that work with RFC formatted rdata to share centralized parsing/encoding
code
'''
[docs]
def __init__(self, name, _type, ttl, rdata):
self.name = name
self._type = _type
self.ttl = ttl
self.rdata = rdata
[docs]
def __repr__(self):
return f'Rr<{self.name}, {self._type}, {self.ttl}, {self.rdata}'