当前位置: 首页>>代码示例>>Python>>正文


Python route53.Route53Connection方法代码示例

本文整理汇总了Python中boto.route53.Route53Connection方法的典型用法代码示例。如果您正苦于以下问题:Python route53.Route53Connection方法的具体用法?Python route53.Route53Connection怎么用?Python route53.Route53Connection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boto.route53的用法示例。


在下文中一共展示了route53.Route53Connection方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_route53_records

# 需要导入模块: from boto import route53 [as 别名]
# 或者: from boto.route53 import Route53Connection [as 别名]
def get_route53_records(self):
        ''' Get and store the map of resource records to domain names that
        point to them. '''

        r53_conn = route53.Route53Connection()
        all_zones = r53_conn.get_zones()

        route53_zones = [ zone for zone in all_zones if zone.name[:-1]
                          not in self.route53_excluded_zones ]

        self.route53_records = {}

        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone.id)

            for record_set in rrsets:
                record_name = record_set.name

                if record_name.endswith('.'):
                    record_name = record_name[:-1]

                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name) 
开发者ID:openshift,项目名称:origin-ci-tool,代码行数:26,代码来源:ec2.py

示例2: get_route53_records

# 需要导入模块: from boto import route53 [as 别名]
# 或者: from boto.route53 import Route53Connection [as 别名]
def get_route53_records(self):
        ''' Get and store the map of resource records to domain names that
        point to them. '''
 
        r53_conn = route53.Route53Connection()
        all_zones = r53_conn.get_zones()
 
        route53_zones = [ zone for zone in all_zones if zone.name[:-1]
                          not in self.route53_excluded_zones ]
 
        self.route53_records = {}
 
        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone.id)
 
            for record_set in rrsets:
                record_name = record_set.name
 
                if record_name.endswith('.'):
                    record_name = record_name[:-1]
 
                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name) 
开发者ID:geerlingguy,项目名称:ansible-for-devops,代码行数:26,代码来源:ec2.py

示例3: get_route53_records

# 需要导入模块: from boto import route53 [as 别名]
# 或者: from boto.route53 import Route53Connection [as 别名]
def get_route53_records(self):
        ''' Get and store the map of resource records to domain names that
        point to them. '''

        r53_conn = route53.Route53Connection()
        zone_response = r53_conn.get_all_hosted_zones()
        all_zones = zone_response.get('ListHostedZonesResponse', {}).get('HostedZones', [])

        route53_zones = [ zone for zone in all_zones if zone['Name'][:-1]
                          not in self.route53_excluded_zones ]

        self.route53_records = {}

        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone['Id'].split('/')[-1])

            for record_set in rrsets:
                record_name = record_set.name

                if record_name.endswith('.'):
                    record_name = record_name[:-1]

                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name) 
开发者ID:edx,项目名称:edx-analytics-pipeline,代码行数:27,代码来源:ec2.py

示例4: get_route53_records

# 需要导入模块: from boto import route53 [as 别名]
# 或者: from boto.route53 import Route53Connection [as 别名]
def get_route53_records(self):
        ''' Get and store the map of resource records to domain names that
        point to them. '''

        if self.boto_profile:
            r53_conn = route53.Route53Connection(profile_name=self.boto_profile)
        else:
            r53_conn = route53.Route53Connection()
        all_zones = r53_conn.get_zones()

        route53_zones = [zone for zone in all_zones if zone.name[:-1] not in self.route53_excluded_zones]

        self.route53_records = {}

        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone.id)

            for record_set in rrsets:
                record_name = record_set.name

                if record_name.endswith('.'):
                    record_name = record_name[:-1]

                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name) 
开发者ID:PacktPublishing,项目名称:Hands-On-Auto-DevOps-with-GitLab-CI,代码行数:28,代码来源:ec2.py

示例5: get_route53_records

# 需要导入模块: from boto import route53 [as 别名]
# 或者: from boto.route53 import Route53Connection [as 别名]
def get_route53_records(self):
        ''' Get and store the map of resource records to domain names that
        point to them. '''

        if self.boto_profile:
            r53_conn = route53.Route53Connection(
                profile_name=self.boto_profile)
        else:
            r53_conn = route53.Route53Connection()
        all_zones = r53_conn.get_zones()

        route53_zones = [zone for zone in all_zones if zone.name[:-1]
                         not in self.route53_excluded_zones]

        self.route53_records = {}

        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone.id)

            for record_set in rrsets:
                record_name = record_set.name

                if record_name.endswith('.'):
                    record_name = record_name[:-1]

                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name) 
开发者ID:tanikode,项目名称:devops-starter,代码行数:30,代码来源:ec2.py

示例6: get_route53_records

# 需要导入模块: from boto import route53 [as 别名]
# 或者: from boto.route53 import Route53Connection [as 别名]
def get_route53_records(self):
        ''' Get and store the map of resource records to domain names that
        point to them. '''

        if self.boto_profile:
            r53_conn = route53.Route53Connection(profile_name=self.boto_profile)
        else:
            r53_conn = route53.Route53Connection()
        all_zones = r53_conn.get_zones()

        route53_zones = [ zone for zone in all_zones if zone.name[:-1]
                          not in self.route53_excluded_zones ]

        self.route53_records = {}

        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone.id)

            for record_set in rrsets:
                record_name = record_set.name

                if record_name.endswith('.'):
                    record_name = record_name[:-1]

                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name) 
开发者ID:scottslowe,项目名称:learning-tools,代码行数:29,代码来源:ec2.py


注:本文中的boto.route53.Route53Connection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。