def __init__(self, **kwargs):
    for k in REVOKE_KEYS:
        v = kwargs.get(k)
        setattr(self, k, v)
    if (self.domain_id and self.expires_at):
        self.domain_scope_id = self.domain_id
        self.domain_id = None
    else:
        self.domain_scope_id = None
    if (self.expires_at is not None):
        self.expires_at = self.expires_at.replace(microsecond=0)
    if (self.revoked_at is None):
        self.revoked_at = timeutils.utcnow()
    if (self.issued_before is None):
        self.issued_before = self.revoked_at
def __init__(self, **kwargs):
    for k in REVOKE_KEYS:
        v = kwargs.get(k)
        setattr(self, k, v)
    if (self.domain_id and self.expires_at):
        self.domain_scope_id = self.domain_id
        self.domain_id = None
    else:
        self.domain_scope_id = None
    if (self.expires_at is not None):
        self.expires_at = self.expires_at.replace(microsecond=0)
    if (self.revoked_at is None):
        self.revoked_at = timeutils.utcnow()
    if (self.issued_before is None):
        self.issued_before = self.revoked_at