[openstack-dev] [keystone] keystone client service_catalog is None

Eric K ekcs.openstack at gmail.com
Tue Dec 12 01:24:17 UTC 2017


Thank you Boris for the pointers!

On 12/9/17, 7:07 AM, "Boris Bobrov" <breton at cynicmansion.ru> wrote:

>Hi,
>
>Have a look at how openstackclient does this. Read this code:
>https://github.com/openstack/python-openstackclient/blob/master/openstackc
>lient/identity/v3/catalog.py#L43
>and then this code:
>https://github.com/openstack/osc-lib/blob/master/osc_lib/clientmanager.py#
>L239
>
>
>On 09.12.2017 04:15, Eric K wrote:
>> Hi all,
>> 
>> I'm working on some code [1] that attempts to retrieve a endpoint from
>>the
>> service_catalog, but the service_catalog comes up None. Any suggestions
>>on
>> what I need to do differently to get a working service_catalog? Thanks
>> very much!
>> 
>> Python 2.7.12 (default, Nov 20 2017, 18:23:56)
>> [GCC 5.4.0 20160609] on linux2
>>>>> from keystoneauth1 import session # Version 2.12.1
>>>>> from keystoneauth1.identity import v2
>>>>> import keystoneclient.v3.client as ksclient
>>>>> auth = v2.Password(auth_url='http://127.0.0.1/identity',
>>>>> username='admin', password='password', tenant_name='admin')
>>>>> sess = session.Session(auth=auth)
>>>>> keystone = ksclient.Client(session=sess)
>>>>> print(keystone.service_catalog)
>> None
>> 
>> 
>> 
>> [1] 
>> 
>>https://review.openstack.org/#/c/526813/1/congress/datasources/monasca_dr
>>iv
>> er.py at 94
>> 
>> 
>> 
>> 
>>_________________________________________________________________________
>>_
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: 
>>OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> 
>
>__________________________________________________________________________
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev





More information about the OpenStack-dev mailing list