1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00
Files
github-octodns/octodns/record/rr.py
2023-01-02 10:12:59 -05:00

28 lines
644 B
Python

#
#
#
from .exception import RecordException
class RrParseError(RecordException):
def __init__(self, message='failed to parse string value as RR text'):
super().__init__(message)
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
'''
def __init__(self, name, _type, ttl, rdata):
self.name = name
self._type = _type
self.ttl = ttl
self.rdata = rdata
def __repr__(self):
return f'Rr<{self.name}, {self._type}, {self.ttl}, {self.rdata}'