From fd9b4a86501ddeb0c5abf462b4f0091c60d9dfac Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 9 Jul 2019 10:55:33 -0400 Subject: [PATCH] Add support for expiration data, when available --- confluent_server/confluent/messages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index 78582f6a..924196be 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -1253,14 +1253,15 @@ class AsyncSession(ConfluentMessage): self.kvpairs = {'asyncid': id} class User(ConfluentMessage): - def __init__(self, uid, username, privilege_level, name=None): + def __init__(self, uid, username, privilege_level, name=None, expiration=None): self.desc = 'foo' self.stripped = False self.notnode = name is None kvpairs = {'username': {'value': username}, 'password': {'value': '', 'type': 'password'}, 'privilege_level': {'value': privilege_level}, - 'enabled': {'value': ''} + 'enabled': {'value': ''}, + 'expiration': {'value': expiration}, } if self.notnode: self.kvpairs = kvpairs