zone.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:zinc 作者: PressLabs 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号