Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

glanceclient.exc.HTTPUnauthorized: 401 Unauthorized

Hi All, I am able to get the list of images using CLI and horizon but when I directly connect to glance client then I am getting above exception (This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.) But my credentials are correct here is my code

import glanceclient.v2.client as glclient glance = glclient.Client(version='2',endpoint='http://XX.XX.XX.XX:9292', username='admin', password='XXXX', project_id='admin', auth_url='http://XX.XX.XX.XX:5000/v2.0',project_name='admin',tenant_id='admin',tenant_name='admin',user_domain_name='Default',project_domain_name='Default',region_name='dev_newton') images = glance.images.list()