create-glance-images-aws.py 文件源码

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

项目:omni 作者: openstack 项目源码 文件源码
def __init__(self):
        os_auth_url = os.getenv('OS_AUTH_URL')
        os_auth_url = os_auth_url.replace('v2.0', 'v3')
        if not os_auth_url.endswith('v3'):
            os_auth_url += '/v3'

        os_username = os.getenv('OS_USERNAME')
        os_password = os.getenv('OS_PASSWORD')
        os_tenant_name = os.getenv('OS_TENANT_NAME')

        self.glance_endpoint = os_auth_url.replace('keystone/v3', 'glance')
        sys.stdout.write('Using glance endpoint: ' + self.glance_endpoint)

        v3_auth = v3.Password(auth_url=os_auth_url, username=os_username,
                              password=os_password,
                              project_name=os_tenant_name,
                              project_domain_name='default',
                              user_domain_name='default')
        self.sess = session.Session(auth=v3_auth, verify=False)  # verify=True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号