mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
added timestamps to nxos_command module (#50261)
* added timestamps to nxos_command module nxos_command module now returns timestamps field, which shows command execution time * fixed unit test failure for /lib/ansible/module_utils/basic * cosmetic changes to align with PEP 8
This commit is contained in:
parent
fdb91a5c02
commit
e150943314
5 changed files with 45 additions and 20 deletions
|
@ -188,8 +188,7 @@ def main():
|
|||
match = module.params['match']
|
||||
|
||||
while retries > 0:
|
||||
responses = run_commands(module, commands)
|
||||
|
||||
responses, timestamps = run_commands(module, commands, return_timestamps=True)
|
||||
for item in list(conditionals):
|
||||
try:
|
||||
if item(responses):
|
||||
|
@ -214,6 +213,7 @@ def main():
|
|||
result.update({
|
||||
'stdout': responses,
|
||||
'stdout_lines': list(to_lines(responses)),
|
||||
'timestamps': timestamps
|
||||
})
|
||||
|
||||
module.exit_json(**result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue