阅读背景:

使用libcloud时的Openstack身份验证问题

来源:互联网 
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

import libcloud.security

auth_usr   = '[email protected]'
auth_pass  = '*********'
auth_url   = 'https://ccc.sss.com:5000/v2.0'
project_name = 'POC'
region_name = ''

libcloud.security.VERIFY_SSL_CERT = False

provider = get_driver(Provider.OPENSTACK)
conn = provider(auth_usr,
                auth_pass,
                ex_force_auth_url=auth_url,
                ex_force_auth_version='2.0_password',
                ex_tenant_name=project_name,
                ex_force_service_region=region_name)

images = conn.list_images()

for image in images:
    print(image)
from libcloud.compute.types import Provider
fro



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: