Ask Your Question
0

python-keystoneclient API: set user password expiration

asked 2019-05-14 03:41:12 -0500

jackmmmmm gravatar image

I notice the API UserManager.get returns following data structure:

[<User domain_id=default, enabled=True, id=2413b2f667d2471a9ed39cbf213ad03d, links={u'self': u'http://172.28.46.126:35357/v3/users/2413b2f667d2471a9ed39cbf213ad03d'}, name=admin, options={}, password_expires_at=None>]

I would like to set the field password_expires_at but couldn't find out how to format the date. I have tried:

UserManager.update(userid, password_expires_at='2020-01-01T15:09:45.000000')

It didn't work out. Any advise?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-05-20 05:43:56 -0500

Mohit gravatar image

Can you Try by updating the time formating toYYYY-MM-DDTHH:mm:ssZ So it can be 2020-01-01T15:09:45Z

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: 2019-05-14 03:41:12 -0500

Seen: 16 times

Last updated: May 20