Fix nxos_reload timeout and add integration tests (#49632)

* Fix timeout and add tests

* Correct module name
This commit is contained in:
Mike Wiebe 2018-12-12 10:32:27 -05:00 committed by Nathaniel Case
commit 0e4a7b0889
7 changed files with 101 additions and 6 deletions

View file

@ -58,17 +58,15 @@ rebooted:
sample: true
'''
from ansible.module_utils.network.nxos.nxos import run_commands
from ansible.module_utils.network.nxos.nxos import load_config
from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args
from ansible.module_utils.basic import AnsibleModule
def reboot(module):
cmds = [
{'command': 'terminal dont-ask', 'output': 'text'},
{'command': 'reload', 'output': 'text'}
]
run_commands(module, cmds)
cmds = 'terminal dont-ask ; reload'
opts = {'ignore_timeout': True}
load_config(module, cmds, False, opts)
def main():