Skip to content

Commit

Permalink
chore: auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 16, 2024
1 parent 41aaccc commit be2fdfe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/modules/nxos_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,19 @@ def update_objects(want, have):
updates.append((entry, item))
return updates


def get_configured_usernames(module):
config_output = run_commands(module, [{"command": "show running-config | section ^username", "output": "text"}])
config_output = run_commands(
module, [{"command": "show running-config | section ^username", "output": "text"}]
)
usernames = set()
for line in config_output[0].splitlines():
if line.startswith("username "):
username = line.split()[1]
usernames.add(username)
return usernames


def main():
"""main entry point for module execution"""
element_spec = dict(
Expand Down

0 comments on commit be2fdfe

Please sign in to comment.