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

check dns config when comparing profiles for equality

This commit is contained in:
Viranch Mehta
2021-05-28 12:48:09 -07:00
parent 92d14587b1
commit e97675fe3d
2 changed files with 22 additions and 8 deletions

View File

@@ -284,10 +284,18 @@ def _profile_is_match(have, desired):
# compare basic attributes
if have.name != desired.name or \
have.traffic_routing_method != desired.traffic_routing_method or \
have.dns_config.ttl != desired.dns_config.ttl or \
len(have.endpoints) != len(desired.endpoints):
return False
# compare dns config
dns_have = have.dns_config
dns_desired = desired.dns_config
if dns_have.ttl != dns_desired.ttl or \
dns_have.relative_name is None or \
dns_desired.relative_name is None or \
dns_have.relative_name != dns_desired.relative_name:
return False
# compare monitoring configuration
monitor_have = have.monitor_config
monitor_desired = desired.monitor_config