mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Fix nxos_reload timeout and add integration tests (#49632)
* Fix timeout and add tests * Correct module name
This commit is contained in:
parent
b47cde9d4c
commit
0e4a7b0889
7 changed files with 101 additions and 6 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue