+ def generate_rr(self, owner: str, zone: 'Zone') -> Any:
+ return zone.RR(owner, 'AAAA', self._address)
+
+
+class MX:
+ def __init__(self, name: str, prio: int = 10) -> None:
+ self._priority = int(prio)
+ self._name = check_hostname(name)
+
+ def generate_rr(self, owner: str, zone: 'Zone') -> Any:
+ return zone.RR(owner, 'MX', '{0} {1}'.format(self._priority, zone.abs_hostname(self._name)))
+
+
+class SRV:
+ def __init__(self, protocol: str, service: str, name: str, port: int, prio: int, weight: int) -> None:
+ self._service = str(service)
+ self._protocol = str(protocol)
+ self._priority = int(prio)
+ self._weight = int(weight)
+ self._port = int(port)
+ self._name = check_hostname(name)
+
+ def generate_rr(self, owner: str, zone: 'Zone') -> Any:
+ return zone.RR('_{0}._{1}.{2}'.format(self._service, self._protocol, owner), 'SRV',
+ '{0} {1} {2} {3}'.format(self._priority, self._weight, self._port, zone.abs_hostname(self._name)))
+
+
+class TLSA:
+ def __init__(self, protocol: str, port: int, key: str) -> None:
+ # TODO: fix key stuff
+ self._port = int(port)
+ self._protocol = str(protocol)
+ self._key = str(key)
+
+ def generate_rr(self, owner: str, zone: 'Zone') -> Any:
+ return zone.RR('_{0}._{1}.{2}'.format(self._port, self._protocol, owner), 'TLSA', self._key)