Ask Your Question

Revision history [back]

python-keystoneclient API: set user password expiration

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?