mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Quick fix to nxos_command and minify imports
This commit is contained in:
parent
0c4da5d3a0
commit
6857cea9e6
1 changed files with 8 additions and 9 deletions
|
@ -115,9 +115,14 @@ failed_conditions:
|
|||
"""
|
||||
|
||||
import time
|
||||
import shlex
|
||||
import re
|
||||
|
||||
from ansible.module_utils.basic import get_exception
|
||||
from ansible.module_utils.netcmd import Conditional
|
||||
from ansible.module_utils.network import get_module
|
||||
from ansible.module_utils.nxos import *
|
||||
|
||||
|
||||
INDEX_RE = re.compile(r'(\[\d+\])')
|
||||
|
||||
def iterlines(stdout):
|
||||
|
@ -158,7 +163,7 @@ def main():
|
|||
kwargs['command_type'] = 'cli_show'
|
||||
|
||||
while retries > 0:
|
||||
response = module.execute(commands, **kwargs)
|
||||
response = module.cli(commands, **kwargs)
|
||||
result['stdout'] = response
|
||||
|
||||
for index, cmd in enumerate(commands):
|
||||
|
@ -188,11 +193,5 @@ def main():
|
|||
return module.exit_json(**result)
|
||||
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
from ansible.module_utils.shell import *
|
||||
from ansible.module_utils.netcfg import *
|
||||
from ansible.module_utils.nxos import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
main()
|
||||
|
|
Loading…
Add table
Reference in a new issue