1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

WIP breakup of octodns.record file

This commit is contained in:
Ross McFarland
2023-01-02 10:12:59 -05:00
parent c9a57bf0a3
commit be7c3d279e
12 changed files with 1185 additions and 1082 deletions

27
octodns/record/rr.py Normal file
View File

@@ -0,0 +1,27 @@
#
#
#
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}'