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

�
�Udac@s�idd6dgd6dd6ZdZdZdZd	d
lZd	dlmZmZd	dlmZm	Z	d	d
l
mZd	dlm
Z
d�Zd�Zd�Zd�Zd�Zd�Zedkr�e�nd
S(s1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---
module: nxos_pim_rp_address
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages configuration of an PIM static RP address instance.
description:
  - Manages configuration of an Protocol Independent Multicast (PIM) static
    rendezvous point (RP) address instance.
author: Gabriele Gerbino (@GGabriele)
notes:
  - Tested against NXOSv 7.3.(0)D1(1) on VIRL
  - C(state=absent) is currently not supported on all platforms.
options:
  rp_address:
    description:
      - Configures a Protocol Independent Multicast (PIM) static
        rendezvous point (RP) address. Valid values are
        unicast addresses.
    required: true
  group_list:
    description:
      - Group range for static RP. Valid values are multicast addresses.
  prefix_list:
    description:
      - Prefix list policy for static RP. Valid values are prefix-list
        policy names.
  route_map:
    description:
      - Route map policy for static RP. Valid values are route-map
        policy names.
  bidir:
    description:
      - Group range is treated in PIM bidirectional mode.
    type: bool
  state:
    description:
      - Specify desired state of the resource.
    required: true
    default: present
    choices: ['present','absent','default']
sG
- nxos_pim_rp_address:
    rp_address: "10.1.1.20"
    state: present
s�
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample: ["router bgp 65535", "vrf test", "router-id 192.0.2.1"]
i����N(t
get_configtload_config(tnxos_argument_spect
check_args(t
AnsibleModule(tCustomNetworkConfigc
CsXi}tt|��}|jd}d}x&tj||tj�D]}|j�}|d|krlqDn|r�d|kr�qDn(|r�d|kr�d|kr�qDq�n|jd�p�d|k|d<t|�dkrD|d}	|dd	kr|	|d
<qP|ddkr!|	|d<qP|ddkrP|	dkrM|	|d
<qMqPqDqDW|S(Nt
rp_addresss ip pim rp-address (?P<value>.*)$is
group-lists224.0.0.0/4tbidiriis	route-mapt	route_mapsprefix-listtprefix_listt
group_list(	tstrRtparamstretfindalltMtsplittgettlen(
tmoduletargstgltexistingtconfigtaddresstpim_address_retlinetvaluestvalue((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pytget_existingYs0
	


cCs�|jd}dj|�}|jdrQ|jd�rQ|d|jd7}n|jdr�|jd�s�|d|jd7}q�n|jdr�|jd�s�|d|jd7}q�nt||�}|r�|j|d	g�ndS(
NRsip pim rp-address {0}Rs group-list Rs
 prefix-list R
s route-map tparents(RtformatRt
build_commandtadd(RRtproposedt	candidateRtcommandtcommands((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pyt
state_presentxs


cCszxTdddgD]C}|j|�r|dj|jdd�|j|��7}qqW|jd�rs|d7}n|gS(	NRRR
s {0} {1}t_t-Rs bidir(RR$treplace(t
param_dictR)tparam((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pyR%�s	)
cCs�|jd}g}dj|�}|jd|jd�krPt||�}n|jdsi|g}n|r�|j|dg�ndS(NRsno ip pim rp-address {0}RR#(RR$RR%R&(RRR(RR*R)((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pytstate_absent�s

cCs�i}x�|j�D]\}}|dkrt|�j�dkrLt}n!t|�j�dkrmt}n|j|�|kr�|||<q�qqW|S(NRttruetfalse(titemsRtlowertTruetFalseR(tpargsRR'tkeyR!((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pytget_proposed�s		cs�tdtdtdd�dtdtdd�dtdtdd�dtdtdd�dtdtdd	�d
tddd
gdddt��}|jt�td|dddgddgddggdt�}t�}t||�itd6gd6|d6}|jd
}dddddg�t�fd�|jj	�D��}|jdrt
|�t�}t||�}n!t
|�t�}t||�}tdd�}|dkr�|s�|r�t
||||�n%|d
kr|rt|||�n|r�|j�}||d<t|d<t||t�}	|	r�x�|	D]x}
|
rHt|
t�rp|
d}n|
}d|kr�|d
kr�|jd}dj|�}
t||
�q�q�qHqHWq�n|j|�dS(NRtrequiredttypeRRRR
Rtbooltstatetchoicestpresenttabsenttdefaultt
argument_spectmutually_exclusivetsupports_check_modetchangedR*twarningsc3s9|]/\}}|dk	r|�kr||fVqdS(N(tNone(t.0tktv(R(sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pys	<genexpr>�s	tindentitclierrorsNo policy was configuredsno ip pim rp-address {0}(tdictR6R7tupdateRR	tlistRRR4R"R:R
R+R1t
items_textRt
isinstanceR$t	exit_json(RCRRGtresultR>t
proposed_argsRR'R(tmsgstitemterr_strtaddrtnew_cmd((RsT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pytmain�sd$
				

	%





 t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRt&ansible.module_utils.network.nxos.nxosRRRRtansible.module_utils.basicR	t*ansible.module_utils.network.common.configR
R"R+R%R1R:R[t__name__(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim_rp_address.pyt<module>s$


,			
			E

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