mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Quick fix to nxos_command and minify imports
This commit is contained in:
committed by
Matt Clay
parent
0c4da5d3a0
commit
6857cea9e6
@@ -115,9 +115,14 @@ failed_conditions:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import shlex
|
|
||||||
import re
|
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+\])')
|
INDEX_RE = re.compile(r'(\[\d+\])')
|
||||||
|
|
||||||
def iterlines(stdout):
|
def iterlines(stdout):
|
||||||
@@ -158,7 +163,7 @@ def main():
|
|||||||
kwargs['command_type'] = 'cli_show'
|
kwargs['command_type'] = 'cli_show'
|
||||||
|
|
||||||
while retries > 0:
|
while retries > 0:
|
||||||
response = module.execute(commands, **kwargs)
|
response = module.cli(commands, **kwargs)
|
||||||
result['stdout'] = response
|
result['stdout'] = response
|
||||||
|
|
||||||
for index, cmd in enumerate(commands):
|
for index, cmd in enumerate(commands):
|
||||||
@@ -188,11 +193,5 @@ def main():
|
|||||||
return module.exit_json(**result)
|
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__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user