1deab57056
Because of the current link to python-glanceclient 0.9.0 documentation exits a display issue, this patch links it to the newer documentation. Change-Id: Ie14852e3426433564b85176cb65e64b87d2af539 Closes-Bug: #1565118
934 B
934 B
Authenticate against an Image service endpoint
To authenticate against an Image service endpoint, instantiate a glanceclient.v2.client.Client object:
from os import environ as env
import glanceclient.v2.client as glclient
import keystoneclient.v2_0.client as ksclient
= ksclient.Client(auth_url=env['OS_AUTH_URL'],
keystone =env['OS_USERNAME'],
username=env['OS_PASSWORD'],
password=env['OS_TENANT_NAME'],
tenant_name=env['OS_REGION_NAME'])
region_name= keystone.service_catalog.url_for(service_type='image')
glance_endpoint = glclient.Client(glance_endpoint, token=keystone.auth_token) glance