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   = '[email protected]'
    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\": \"
[email protected]\" }, \"tenantName\": \"POC\" } }"
https://vio-cloud.example.com:5000/v2.0/tokens

works fine.

any help would be appreciated

Regards,

Ryan
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to