Skip to content

Commit acfa559

Browse files
Merge pull request #156 from jinyoungmoonDEV/master
add: Route53 RecordSet 정보에서 type A일경우 일부 데이터에서 Value가 없는 이슈 => 처리 다양성 개선
2 parents 31636a8 + 767a9ab commit acfa559

File tree

1 file changed

+6
-1
lines changed
  • src/spaceone/inventory/connector/aws_route53_connector

1 file changed

+6
-1
lines changed

src/spaceone/inventory/connector/aws_route53_connector/connector.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,15 @@ def describe_record_sets(self, host_zone_id):
9797
for data in response_iterator:
9898
for raw in data.get('ResourceRecordSets', []):
9999
display_values = []
100-
if raw.get('Type') == 'A':
100+
rtype = raw.get('Type')
101+
102+
if rtype == 'A' or rtype == 'AAAA':
101103
_alias = raw.get('AliasTarget', {})
102104
if dns_name := _alias.get('DNSName'):
103105
display_values.append(dns_name)
106+
else:
107+
for _r in raw.get('ResourceRecords', []):
108+
display_values.append(_r.get('Value'))
104109
else:
105110
_records = raw.get('ResourceRecords', [])
106111
for _r in _records:

0 commit comments

Comments
 (0)