Ask Your Question
2

python openstacksdk, how to authorite?

asked 2016-08-08 14:29:44 -0500

schlitzered gravatar image

updated 2016-09-12 04:06:22 -0500

darragh-oreilly gravatar image

hey, i trying to connect via the openstacksdk python lib, following this guide: http://developer.openstack.org/sdks/p...

here is my code:

from openstack import connection

if __name__ == '__main__':

    auth_args = {
        'auth_url': 'http://controller.infra.example.com:35357/v3',
        'project_name': 'admin',
        'username': 'admin',
        'password': 'PASSWORD',
    }
    conn = connection.Connection(**auth_args)
    conn.authorize()

but i only get this exception:

openstack.exceptions.HttpException: HttpException: Expecting to find domain in project - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.

the command line client is working fine, with the very same credentials.

this is a installation based on this documentation: http://docs.openstack.org/mitaka/inst...

what am i doing wrong?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2016-08-08 15:24:36 -0500

schlitzered gravatar image

i guess i have found a solution myself, it works with:

 auth_args = {
    'auth_url': 'http://controller.infra.example.com:35357/v3',
    'project_name': 'admin',
    'user_domain_name': 'default',
    'project_domain_name': 'default',
    'username': 'admin',
    'password': 'XeG3saiKhewai9Ahid6Aajo8',
}

but can anyone explain why? is the documentation simply wrong? i also have to add both "project_domain_name" and "user_domain_name" this looks somehow redundant. can anyone please explain why it is that way?

edit flag offensive delete link more

Comments

Thanks. I was having the same issue. Your answer helped me solve mine :)

bdastur gravatar imagebdastur ( 2016-08-23 09:33:19 -0500 )edit
darragh-oreilly gravatar imagedarragh-oreilly ( 2016-09-12 04:09:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-08-08 14:29:09 -0500

Seen: 3,135 times

Last updated: Sep 12 '16