Run a python sdk error

asked 2015-07-13 20:56:34 -0500

pyhaobo_ gravatar image

from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

auth_username = 'admin'
auth_password = 'admin_pass'
auth_url = 'http://200.21.40.62:5000/v2.0/'
project_name = 'admin'
region_name = ''

provider = get_driver(Provider.OPENSTACK)
conn = provider(auth_username,
auth_password,
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 i in images:
print(i)

Exception: {"error": {"message": "get_version_v2() got an unexpected keyword argument 'auth'", "code": 400, "title": "Bad Request"}}

edit retag flag offensive close merge delete