1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00
Files
github-octodns/octodns/record/alias.py
2023-01-02 14:58:03 -05:00

27 lines
488 B
Python

#
#
#
from .base import Record, ValueMixin
from .target import _TargetValue
class AliasValue(_TargetValue):
pass
class AliasRecord(ValueMixin, Record):
_type = 'ALIAS'
_value_type = AliasValue
@classmethod
def validate(cls, name, fqdn, data):
reasons = []
if name != '':
reasons.append('non-root ALIAS not allowed')
reasons.extend(super().validate(name, fqdn, data))
return reasons
Record.register_type(AliasRecord)