Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/nxos/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pyc

�
�Udac@s�idd6dgd6dd6ZdZdZdZd	d
lZd	d
lZd	d
lZd	dlmZm	Z	m
Z
d	dlmZmZd	d
l
mZd�Zdd�Zd�Zd�Zd�Zedkr�e�nd
S(s1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys
---
module: nxos_smu
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Perform SMUs on Cisco NX-OS devices.
description:
    - Perform software maintenance upgrades (SMUs) on Cisco NX-OS devices.
author: Gabriele Gerbino (@GGabriele)
notes:
    - Tested against NXOSv 7.3.(0)D1(1) on VIRL
    - The module can only activate and commit a package,
      not remove or deactivate it.
    - Use C(transport=nxapi) to avoid connection timeout
options:
    pkg:
        description:
            - Name of the remote package.
        required: true
    file_system:
        description:
            - The remote file system of the device. If omitted,
              devices that support a file_system parameter will use
              their default values.
sR
- nxos_smu:
    pkg: "nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm"
s�
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample: ["install add bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm",
             "install activate bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm force",
             "install commit bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm"]
i����N(t
get_configtload_configtrun_commands(tnxos_argument_spect
check_args(t
AnsibleModulecCs$i|d6dd6g}t||�S(Ntcommandttexttoutput(R(Rtmoduletcmds((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pytexecute_show_commandKs
s
bootflash:cCs9dj||�}t||�}d|dkr5tStS(Nsdir {0}/{1}sNo such filei(tformatRtFalsetTrue(Rtdsttfile_systemRtbody((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pytremote_file_existsTs
cCs2x+|D]#}t||g�tjd�qWdS(Ni(Rttimetsleep(RtcommandsR((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pytapply_patch\s
c
Csg}|jd�}dj|dd!�}d}t||�}d}t||�}||dkr�||dkr�|jdj||��n||dkr�|jdj||��nd}t||�}	||	dkr�|jd	j||��n|S(
Nt.ii����sshow install inactivesshow install activesinstall add {0}{1}sinstall activate {0}{1} forcesshow install committedsinstall commit {0}{1}(tsplittjoinRtappendR(
RtpkgRRtsplitted_pkgt	fixed_pkgRt
inactive_bodytactive_bodytinstall_body((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pytget_commandsbs" c	Cs=tdtdt�dtdtdd��}|jt�td|dt�}t�}t||�itd6gd	6|d
6}|jd}|jd}t	||d|�}|s�|j
dd�nt|||�}|r,t|d<|jst
||�nd
|kr|jd�n||d	<n|j|�dS(NR trequiredRtdefaults
bootflash:t
argument_spectsupports_check_modetchangedRtwarningstmsgs1The requested package doesn't exist on the devicet	configurei(tdictRRtupdateRR
tlistR	tparamsRt	fail_jsonR&t
check_modeRtpopt	exit_json(R)RR,tresultsR Rt
remote_existsR((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pytmain{s0
		


	

	
t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtcollectionstreRt&ansible.module_utils.network.nxos.nxosRRRRR	tansible.module_utils.basicR
RRRR&R9t__name__(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_smu.pyt<module>s$



					$

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]