Browse Source

ISSUE #26 Skip Alias recordset for Route53 Provider

pull/216/head
Michael McAllister 8 years ago
parent
commit
8c1fe707e8
2 changed files with 14 additions and 0 deletions
  1. +6
    -0
      octodns/provider/route53.py
  2. +8
    -0
      tests/test_octodns_provider_route53.py

+ 6
- 0
octodns/provider/route53.py View File

@ -463,6 +463,12 @@ class Route53Provider(BaseProvider):
record_type = rrset['Type'] record_type = rrset['Type']
if record_type == 'SOA': if record_type == 'SOA':
continue continue
if 'AliasTarget' in rrset:
# Alias records are Route53 specific and are not
# portable, so we need to skip them
self.log.warning("%s is an Alias record. Skipping..."
% rrset['Name'])
continue
data = getattr(self, '_data_for_{}'.format(record_type))(rrset) data = getattr(self, '_data_for_{}'.format(record_type))(rrset)
records[record_name][record_type].append(data) records[record_name][record_type].append(data)


+ 8
- 0
tests/test_octodns_provider_route53.py View File

@ -313,6 +313,14 @@ class TestRoute53Provider(TestCase):
'Value': '0 issue "ca.unit.tests"', 'Value': '0 issue "ca.unit.tests"',
}], }],
'TTL': 69, 'TTL': 69,
}, {
'AliasTarget': {
'HostedZoneId': 'Z119WBBTVP5WFX',
'EvaluateTargetHealth': False,
'DNSName': 'unit.tests.'
},
'Type': 'A',
'Name': 'alias.unit.tests.'
}], }],
'IsTruncated': False, 'IsTruncated': False,
'MaxItems': '100', 'MaxItems': '100',


Loading…
Cancel
Save