ec2.py 文件源码

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

项目:pentagon 作者: reactiveops 项目源码 文件源码
def connect(self, region):
        ''' create connection to api server'''
        if self.eucalyptus:
            conn = boto.connect_euca(host=self.eucalyptus_host)
            conn.APIVersion = '2010-08-31'
        else:
            conn = ec2.connect_to_region(region)
        # connect_to_region will fail "silently" by returning None if the region name is wrong or not supported
        if conn is None:
            self.fail_with_error("region name: %s likely not supported, or AWS is down.  connection to region failed." % region)
        return conn
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号