[Openstack] libcloud auth issue
Ryan McLean
pvtryan100 at gmail.com
Tue Dec 15 17:02:31 UTC 2015
I'm using vmware integrated openstack and I am trying to connect using
python.
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security
def main():
auth_usr = 'ryan at example.com'
auth_pass = 'mypass'
auth_url = 'https://vio-cloud.example.com:5000/v2.0'
project_name = 'POC'
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)
images = conn.list_images()
for image in images:
print(image)
main()
however I keep getting the error:
libcloud.common.exceptions.BaseHTTPError: {"error": {"message":
"get_version_v2() got an unexpected keyword argument 'auth'", "code": 400,
"title": "Bad Request"}}
Does anyone know why?
if I strip the /v2.0 or add /tokens to the end of the python code then I
get no endpoint found as an error.
using curl in windows:
curl -X POST -i -k -H "Content-Type: application/json" -d "{\"auth\": {
\"passwordCredentials\": { \"password\": \"mypass\", \"username\": \"
ryan at example.com\" }, \"tenantName\": \"POC\" } }"
https://vio-cloud.example.com:5000/v2.0/tokens
works fine.
any help would be appreciated
Regards,
Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20151215/d24864af/attachment.html>
More information about the Openstack
mailing list