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

�
�Udac@s�idd6dgd6dd6ZdZdZdZd	d
lZd	dlmZmZd	dlmZm	Z	d	d
l
mZd	dlm
Z
idd6dd6Zd�Zd�Zd�Zd�Zedkr�e�nd
S(s1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---
module: nxos_pim
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages configuration of a PIM instance.
description:
    - Manages configuration of a Protocol Independent Multicast (PIM) instance.
author: Gabriele Gerbino (@GGabriele)
options:
  bfd:
    description:
      - Enables BFD on all PIM interfaces.
      - "Dependency: 'feature bfd'"
    version_added: "2.9"
    type: str
    choices: ['enable', 'disable']

  ssm_range:
    description:
      - Configure group ranges for Source Specific Multicast (SSM).
        Valid values are multicast addresses or the keyword C(none)
        or keyword C(default). C(none) removes all SSM group ranges.
        C(default) will set ssm_range to the default multicast address.
        If you set multicast address, please ensure that it is not the
        same as the C(default), otherwise use the C(default) option.
    required: true
s�
- name: Configure ssm_range, enable bfd
  nxos_pim:
    bfd: enable
    ssm_range: "224.0.0.0/8"

- name: Set to default
  nxos_pim:
    ssm_range: default

- name: Remove all ssm group ranges
  nxos_pim:
    ssm_range: none
s�
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample:
      - ip pim bfd
      - ip pim ssm range 224.0.0.0/8
i����N(t
get_configtload_config(tnxos_argument_spect
check_args(t
AnsibleModule(tCustomNetworkConfigs
ip pim bfdtbfdsip pim ssm ranget	ssm_rangecCs�i}tt|��}x�|D]�}d|kr�tjd|tj�}|r�|jd�jdd�}|j�||<q�qd|krd|krd||<qqW|S(	NRs2ssm range (?P<value>(?:[\s\d.\/]+|none|default))?$tvalues232.0.0.0/8tRs
ip pim bfdtenable(tstrRtretsearchtMtgrouptreplacetsplit(tmoduletargstexistingtconfigtargtmR
((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pytget_existing\s
cCsOi}xB|j�D]4\}}|j|�}|dk	r|||<qqW|S(N(titemstgettNone(tkey_mapttabletnew_dicttkeyR
tnew_key((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pyt
apply_key_maposc
Cs�t�}tt|�}x�|j�D]�\}}d}|dkr�|dkrXd}q�|dkrmd}q�|r�dj|�}q�n1|dkr�|d	kr�d
nd}	|	|}n|r%|j|�q%q%W|r�|j|dg�ndS(NRsip pim ssm rangetdefaultsno ip pim ssm range nonetnonesip pim ssm range nonesip pim ssm range {0}s
ip pim bfdtdisablesno tparents(tlistR&tPARAM_TO_COMMAND_KEYMAPRtformattappendtadd(
RRtproposedt	candidatetcommandstproposed_commandsR$R
tcommandtno_cmd((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pytget_commandsxs$			
cstdtdtdddddg�dtdtdd	d
g��}|jt�td|dt�}t�}t||�itd
6gd6|d6}|j}gt	j
�D]}||dk	r�|^q��d�kr8xY|dD]J}tj
d|�rPnt|jd��dkr�|jdd�q�q�Wnt|��}t�fd�|j�D��}i}	xB|j�D]4\}
}|
dkrZ|r�|dd
kr�|j|
�rWd
|	|
<qWq�ttg|D]}t|�^q���}
ttg|j|
g�D]}t|�^q
��}|
|kr�djd�|
D��|	|
<q�q||
dkr�||jdd�kr�||	|
<q�q|||j|
�kr|||	|
<q|q|Wtdd�}t|||	|�|r|j�}||d<t|d
<t||�n|j|�dS(NRtrequiredttypeRtchoicesRR)RR+R't
argument_spectsupports_check_modetchangedR2twarningssnone|defaultt.itmsgs^Valid ssm_range values are multicast addresses or the keyword 'none' or the keyword 'default'.c3s-|]#\}}|�kr||fVqdS(N((t.0tktv(R(sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pys	<genexpr>�sit css|]}t|�VqdS(N(R(R@ts((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pys	<genexpr>�stindenti(tdicttFalsetupdateRR	tTrueR+RtparamsR,tkeysR RRtlenRt	fail_jsonRRRtsortedtsetRtjoinR
R6t
items_textRt	exit_json(R:RR=tresultRJRAtitemRt
proposed_argsR0R$R
tiRBtexR1((RsI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pytmain�sT!
		
	/"+7#

t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRt&ansible.module_utils.network.nxos.nxosRRRRtansible.module_utils.basicR	t*ansible.module_utils.network.common.configR
R,RR&R6RXt__name__(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pyt<module>s&




					<

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