python openstacksdk, how to authorite?

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

schlitzered gravatar image

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

darragh-oreilly gravatar image

hey, i trying to connect via the openstacksdk python lib, following this guide:

here is my code:

from openstack import connection

if __name__ == '__main__':

    auth_args = {
        'auth_url': '',
        'project_name': 'admin',
        'username': 'admin',
        'password': 'PASSWORD',
    conn = connection.Connection(**auth_args)

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:

what am i doing wrong?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

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

schlitzered gravatar image

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

 auth_args = {
    'auth_url': '',
    '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


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

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


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

Seen: 3,680 times

Last updated: Sep 12 '16