
    Vh		                     f    d dl mZmZmZ eZdZdZdZd dl	m
Z
 d dlmZ d Zd Zed	k(  r e        y
y
)    )absolute_importdivisionprint_functionaJ  
module: nxos_reboot
extends_documentation_fragment:
- cisco.nxos.nxos
short_description: Reboot a network device.
description:
- Reboot a network device.
version_added: 1.0.0
author:
- Jason Edelman (@jedelman8)
- Gabriele Gerbino (@GGabriele)
notes:
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- Tested against Cisco MDS NX-OS 9.2(1)
- The module will fail due to timeout issues, but the reboot will be performed anyway.
options:
  confirm:
    description:
    - Safeguard boolean. Set to true if you're sure you want to reboot.
    required: false
    default: false
    type: bool
z-
- cisco.nxos.nxos_reboot:
    confirm: true
z
rebooted:
    description: Whether the device was instructed to reboot.
    returned: success
    type: bool
    sample: true
)AnsibleModuleload_configc                 ,    d}ddi}t        | |d|       y )Nzterminal dont-ask ; reloadignore_timeoutTFr   )modulecmdsoptss      j/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_reboot.pyrebootr   B   s    'Dd#DeT*    c                      t        t        dd            } t        | d      }t               }t        d|      }|j                  d   r|j                  st        |       d|d	<    |j                  d
i | y )NFbool)defaulttype)confirmT)argument_specsupports_check_mode)changedwarningsr   r    )dictr   listparams
check_moder   	exit_json)r   r   r   resultss       r   mainr!   H   sk    e&!ABMDQFvH584G}}Y  6N!	Fwr   __main__N)
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESRETURNansible.module_utils.basicr   Eansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxosr   r   r!   __name__r   r   r   <module>r+      sP   $ A @ 0

 5 ]+   zF r   