← Back to team overview

openstack team mailing list archive

401 Not Authorized from glance - How to fix ?

 

Hi,

I'm working on python program that needs to get images detail from glance.
I was using "get_admin_context" earlier to do all the work in nova side,
but this doesn't seem to work when I query glance.
I get "401 Not Authorized" error.

I think I need to get auth_token from keystone, and use it when creating
RequestContext object - then glance query might work. (Is this assumption
correct, in the first place)  But I do not know how to do this
programatically, I looked at "nova image-list" command, but I didn't get
clear picture on how this should be done.

Can you point to any existing code that authenticates with keystone and
then uses the auth-token to talk to glance ?

Thanks,
-Mandar

Follow ups