def _reconcile_zone(self):
"""
Handles zone creation/deletion.
"""
if self.db_zone.deleted:
self.delete()
elif self.db_zone.route53_id is None:
self.create()
elif not self.exists:
try:
self.create()
except ClientError as excp:
if excp.response['Error']['Code'] != 'HostedZoneAlreadyExists':
raise
# This can happen if a zone was manually deleted from AWS.
# Create will fail because we re-use the caller_reference
self.db_zone.caller_reference = None
self.db_zone.save()
self.create()
评论列表
文章目录