How can I know the openstacksdk connection is success or failture?

asked 2017-09-07 02:35:16 -0600

liaodalin19903 gravatar image

From openstacksdk source :https://github.com/openstack/python-openstacksdk, I can create a connect of connection:

 conn = connect.create_connection(settings.AUTH_URL, '', 'openstack', username, password)

But how can I know whether the conn is success? such as if I give a wrong password. or project name.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-09-07 03:12:27 -0600

liaodalin19903 gravatar image

Thanks for seanhandley, I can try to use the conn, so I can find whether there is issue.

Such as:

for server in conn.compute.servers():

    print server
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-09-07 02:35:16 -0600

Seen: 96 times

Last updated: Sep 07 '17