Comment 20 for bug 1604479

Revision history for this message
Anilkumar Thovi (thovi) wrote :

using V3 API we cannot access user email?

users = keystone.users.list()
for row in users:
        print row.email

Getting below error :
/*******************************************/
 File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 496, in __getattr__
    raise AttributeError(k)
AttributeError: email

/*******************************************/
becuase in the user details, email field does not exist:
<User domain_id=e07a8e155862444eb9e966121fd161ce, enabled=True, id=8cda896fe33e4ed58e39b97157d38280, links={u'self': u'http::5000/v3/users/8cda896fe33e4ed58e39b97157d38280'}, name=, password_expires_at=None>

if deafult project exist then only we can access email field?
<User default_project_id=8cb63b3a72894e18ad18b1c56b4dc3e9, domain_id=e07a8e155862444eb9e966121fd161ce,
<email address hidden>, enabled=True, id=9ba608bc868d4333be1d06a8db3e8cbc,
links={u'self': u'http://xyz:5000/v3/users/9ba608bc868d4333be1d06a8db3e8cbc'}, name=anil, password_expires_at=None>

So how to access user email field when default_project_id does not exist?