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_snmp_contact.pyc

�
�Udac@s�idd6dgd6dd6ZdZdZdZd	d
lZd	dlmZmZd	dlmZm	Z	d	d
l
mZd�Zd�Z
d�Zd�Zedkr�e�nd
S(s1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---
module: nxos_snmp_contact
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages SNMP contact info.
description:
    - Manages SNMP contact information.
author:
    - Jason Edelman (@jedelman8)
    - Gabriele Gerbino (@GGabriele)
notes:
    - Tested against NXOSv 7.3.(0)D1(1) on VIRL
    - C(state=absent) removes the contact configuration if it is configured.
options:
    contact:
        description:
            - Contact information.
        required: true
    state:
        description:
            - Manage the state of the resource.
        required: true
        default: present
        choices: ['present','absent']
s_
# ensure snmp contact is configured
- nxos_snmp_contact:
    contact: Test
    state: present
s�
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample: ["snmp-server contact New_Test"]
i����N(tload_configtrun_commands(tnxos_argument_spect
check_args(t
AnsibleModulecCs!i|d6dd6}t||�S(Ntcommandttexttoutput(R(R
tmodule((sR/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_contact.pytexecute_show_commandJs
cCsGg}x:|D]2}t|t�r2|j|�q
|j|�q
W|S(N(t
isinstancetlisttextendtappend(t
command_liststflat_command_listR
((sR/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_contact.pytflatten_listSs
cCsWi}d}td|�d}tj||tj�}|rS|jd�|d<n|S(Ns*^\s*snmp-server\scontact\s(?P<contact>.+)$s
show run snmpitcontact(RtretsearchtMtgroup(R
Rt
contact_regextbodyt
match_contact((sR/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_contact.pytget_snmp_contact]sc		Cs�tdtdtdd�dtdddgd	d��}|jt�td
|dt�}t�}t||�itd6gd
6|d6}|jd}|jd}t	|�}g}|dkr�|r,|d|kr,|j
d�q,n?|dkr,|s|d|kr,|j
dj|��q,nt|�}|r�t|d<|j
sat||�nd|kr}|jd�n||d
<n|j|�dS(NRtrequiredttypetstrtstatetchoicestabsenttpresenttdefaultt
argument_spectsupports_check_modetchangedtcommandstwarningssno snmp-server contactssnmp-server contact {0}t	configurei(tdicttTruetupdateRR	RRtFalsetparamsRRtformatRt
check_modeRtpopt	exit_json(	R'R
R+tresultsRR"texistingR*tcmds((sR/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_contact.pytmainis6
	



	
t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRt&ansible.module_utils.network.nxos.nxosRRRRtansible.module_utils.basicR	RRRR9t__name__(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_contact.pyt<module>s


			
		(

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