�
�Udac @ s� i d d 6d g d 6d d 6Z d Z d Z d Z d d
l Z d d l m Z m Z d d l m Z m Z d d
l
m Z d d l m
Z
i d d 6d d 6Z d � Z d � Z d � Z d � Z e d k r� e � n d
S( s 1.1t metadata_versiont previewt statust networkt 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_configt load_config( t nxos_argument_spect
check_args( t
AnsibleModule( t CustomNetworkConfigs
ip pim bfdt bfds ip pim ssm ranget ssm_rangec C s� i } t t | � � } x� | D]� } d | k r� t j d | t j � } | r� | j d � j d d � } | j � | | <q� q d | k r d | k r d | | <q q W| S( NR s2 ssm range (?P<value>(?:[\s\d.\/]+|none|default))?$t values 232.0.0.0/8t R s
ip pim bfdt enable( t strR t ret searcht Mt groupt replacet split( t modulet argst existingt configt argt mR
( ( sI /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pyt get_existing\ s
c C sO i } xB | j � D]4 \ } } | j | � } | d k r | | | <q q W| S( N( t itemst gett None( t key_mapt tablet new_dictt keyR
t new_key( ( sI /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_pim.pyt
apply_key_mapo s c
C s� t � } t t | � } x� | j � D]� \ } } d } | d k r� | d k rX d } q� | d k rm d } q� | r� d j | � } q� n1 | d k r� | d k r� d
n d } | | } n | r% | j | � q% q% W| r� | j | d g �n d S( NR s ip pim ssm ranget defaults no ip pim ssm range nonet nones ip pim ssm range nones ip pim ssm range {0}s
ip pim bfdt disables no t parents( t listR&