mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
aci_aaa_user: Manage AAA users on ACI fabrics (#35543)
* aci_aaa_user: Manage AAA users on ACI fabrics * Fix module documentation * Ensure we allow to not set accountStatus and expires * Added aaa_password_lifetime and aaa_password_update_required support * Improvements to integration tests in light of issue 35544 * Fix ACI ISO 8601 formatted string * Add HAS_DATEUTIL
This commit is contained in:
@@ -186,6 +186,14 @@ class ACIModule(object):
|
||||
elif self.params['password'] is not None:
|
||||
self.module.warn('When doing ACI signatured-based authentication, a password is not required')
|
||||
|
||||
def iso8601_format(self, dt):
|
||||
''' Return an ACI-compatible ISO8601 formatted time: 2123-12-12T00:00:00.000+00:00 '''
|
||||
try:
|
||||
return dt.isoformat(timespec='milliseconds')
|
||||
except:
|
||||
tz = dt.strftime('%z')
|
||||
return '%s.%03d%s:%s' % (dt.strftime('%Y-%m-%dT%H:%M:%S'), dt.microsecond / 1000, tz[:3], tz[3:])
|
||||
|
||||
def define_protocol(self):
|
||||
''' Set protocol based on use_ssl parameter '''
|
||||
|
||||
@@ -315,7 +323,6 @@ class ACIModule(object):
|
||||
def query(self, path):
|
||||
''' Perform a query with no payload '''
|
||||
|
||||
# Ensure method is set
|
||||
self.result['path'] = path
|
||||
|
||||
if 'port' in self.params and self.params['port'] is not None:
|
||||
|
||||
Reference in New Issue
Block a user