Skip to content
Snippets Groups Projects
  • Thomas Woerner's avatar
    55ec25a7
    ipauser: Use date string, not datetime object for expiration dates · 55ec25a7
    Thomas Woerner authored
    So far a datetime object was created for the expiration dates
    krbpasswordexpiration and krbprincipalexpiration. This resulted in also
    sending these objects to the API. With this change, the dates are
    converted into strings using the LDAP_GENERALIZED_TIME_FORMAT defined in
    ipalib.constants. This way only strings are used with the IPA API.
    
    A new function has been added to ansible_freeipa_module:
    
    - date_string: Convert datetime to gernalized time format string
    
    This fuction is used on the result of user_show to convert the
    expiration dates to the gernalized time format string.
    
    The existing function date_format in ansible_freeipa_module has been
    renamed to convert_date and fixed in the way that it also uses
    date_string to return a gernalized time format string and not a
    datetime object. This function was only used in the ipauser module so
    far.
    55ec25a7
    History
    ipauser: Use date string, not datetime object for expiration dates
    Thomas Woerner authored
    So far a datetime object was created for the expiration dates
    krbpasswordexpiration and krbprincipalexpiration. This resulted in also
    sending these objects to the API. With this change, the dates are
    converted into strings using the LDAP_GENERALIZED_TIME_FORMAT defined in
    ipalib.constants. This way only strings are used with the IPA API.
    
    A new function has been added to ansible_freeipa_module:
    
    - date_string: Convert datetime to gernalized time format string
    
    This fuction is used on the result of user_show to convert the
    expiration dates to the gernalized time format string.
    
    The existing function date_format in ansible_freeipa_module has been
    renamed to convert_date and fixed in the way that it also uses
    date_string to return a gernalized time format string and not a
    datetime object. This function was only used in the ipauser module so
    far.