from keystoneclient.v2_0 import client
from keystoneclient import session
from keystoneclient.auth.identity import v2 as v2_auth
c1 = client.Client(auth_url='http://127.0.0.1:5000/v2.0',username='admin',password='admin',tenant_name='admin',)
print c1.service_catalog
auth = v2_auth.Password(auth_url='http://127.0.0.1:5000/v2.0',username='admin',password='admin',tenant_name='admin',)
s = session.Session(auth=auth, verify=False)
c2 = client.Client(session=s)
#print c2.users.list() # succeed
print c2.tenant_name # print None!
print c2.service_catalog # raise attr exception,
# even though httpclient has defined this property
"""
the output is:
<keystoneclient.service_catalog.ServiceCatalogV2 object at 0x7f77cb6e92d0>
None
Traceback (most recent call last):
File "/tmp/test.py", line 16, in <module>
print c.service_catalog
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 898, in __getattr__
raise AttributeError(_("Unknown Attribute: %s") % name)
AttributeError: Unknown Attribute: service_catalog
the service_catalog property has gone, I have no idea why and how this happen
"""
removing assignee due to inactivity