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_location.pyo

�
�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_bysZ
---
module: nxos_snmp_location
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages SNMP location information.
description:
    - Manages SNMP location configuration.
author:
    - Jason Edelman (@jedelman8)
    - Gabriele Gerbino (@GGabriele)
notes:
    - Tested against NXOSv 7.3.(0)D1(1) on VIRL
options:
    location:
        description:
            - Location information.
        required: true
    state:
        description:
            - Manage the state of the resource.
        required: false
        default: present
        choices: ['present','absent']
s�
# ensure snmp location is configured
- nxos_snmp_location:
    location: Test
    state: present

# ensure snmp location is not configured
- nxos_snmp_location:
    location: Test
    state: absent
s�
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample: ["snmp-server location New_Test"]
i����N(tload_configtrun_commands(tnxos_argument_spect
check_args(t
AnsibleModulecCs!i|d6dd6}t||�S(Ntcommandttexttoutput(R(R
tmodule((sS/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_location.pytexecute_show_commandNs
cCsGg}x:|D]2}t|t�r2|j|�q
|j|�q
W|S(N(t
isinstancetlisttextendtappend(t
command_liststflat_command_listR
((sS/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_location.pytflatten_listWs
cCsWi}d}td|�d}tj||tj�}|rS|jd�|d<n|S(Ns.^\s*snmp-server\s+location\s+(?P<location>.+)$s
show run snmpitlocation(RtretsearchtMtgroup(R
Rtlocation_regextbodytmatch_location((sS/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_location.pytget_snmp_locationasc		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 locationssnmp-server location {0}t	configurei(tdicttTruetupdateRR	RRtFalsetparamsRRtformatRt
check_modeRtpopt	exit_json(	R'R
R+tresultsRR"texistingR*tcmds((sS/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_snmp_location.pytmainms6
	


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


			
		(

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