octodns.zone.cname

Classes

CnameCoexistenceValidator(id[, sets])

Verify that CNAME records do not coexist with other records at the same node, and ALIAS records do not coexist with A or AAAA records.

CnameTargetNotCnameZoneValidator(id[, sets])

Checks that CNAME records do not point to other CNAME records within the same zone.

CnameTargetResolvableInZoneZoneValidator(id)

Checks that CNAME and ALIAS records pointing to targets within the same zone have a corresponding record at that target.

NoCnameLoopZoneValidator(id[, sets])

Checks for circular CNAME or ALIAS chains within the zone.

RootCnameZoneValidator(id[, sets])

Checks that a CNAME record is not present at the zone apex (root).

class octodns.zone.cname.CnameCoexistenceValidator(id, sets=None)[source]

Bases: ZoneValidator

Verify that CNAME records do not coexist with other records at the same node, and ALIAS records do not coexist with A or AAAA records.

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.

class octodns.zone.cname.NoCnameLoopZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks for circular CNAME or ALIAS chains within the zone. Circular references prevent DNS resolution from ever completing and are prohibited by DNS standards.

Reference: https://datatracker.ietf.org/doc/html/rfc1034#section-3.6.2

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.

class octodns.zone.cname.CnameTargetResolvableInZoneZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks that CNAME and ALIAS records pointing to targets within the same zone have a corresponding record at that target. This helps detect “dangling” references that can occur after refactors or deletions.

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.

class octodns.zone.cname.RootCnameZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks that a CNAME record is not present at the zone apex (root). RFC 1912 forbids CNAME records at the root.

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.

class octodns.zone.cname.CnameTargetNotCnameZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks that CNAME records do not point to other CNAME records within the same zone.

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.