Ask Your Question
0

Mitaka glance api with multi-region

asked 2016-07-18 20:06:15 -0600

tking gravatar image

If answered elsewhere, please punt me over to it.

I'm not seeing a method in the Mitaka API to specify a region when getting a session for the glance client.

We are guessing that we need to make an extra call after the session is established to get_endpoint, pass the session, the 'image' service type, and the region_name. Once get_endpoint returns the endpoint, that would be passed to the glance Client() call.

Is this correct, or is there a better way?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-20 17:41:41 -0600

tking gravatar image

updated 2016-07-20 17:42:07 -0600

Fixed!

from keystoneauth1 import adapter

After establishing the auth:

    sess = session.Session(auth=auth)
    adapt = adapter.Adapter(session=sess,service_type='image',region_name=self.region_name)
    endp = adapt.get_endpoint()
    glance = Client('2', endpoint=endp, session=sess)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-07-18 20:06:15 -0600

Seen: 121 times

Last updated: Jul 20 '16