python-keystoneclient API: set user password expiration

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

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''}, 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

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

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-05-14 03:41:12 -0600

Seen: 165 times

Last updated: May 20 '19