�
�Udac @ s� i d d 6d g d 6d d 6Z d Z d Z d Z d d
l m Z m Z d d l m Z m Z d d l m
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_igmp
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages IGMP global configuration.
description:
- Manages IGMP global configuration configuration settings.
author:
- Jason Edelman (@jedelman8)
- Gabriele Gerbino (@GGabriele)
notes:
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- When C(state=default), all supported params will be reset to a
default state.
- If restart is set to true with other params set, the restart will happen
last, i.e. after the configuration takes place.
options:
flush_routes:
description:
- Removes routes when the IGMP process is restarted. By default,
routes are not flushed.
type: bool
enforce_rtr_alert:
description:
- Enables or disables the enforce router alert option check for
IGMPv2 and IGMPv3 packets.
type: bool
restart:
description:
- Restarts the igmp process (using an exec config command).
type: bool
state:
description:
- Manages desired state of the resource.
default: present
choices: ['present', 'default']
s'
- name: Default igmp global params (all params except restart)
nxos_igmp:
state: default
- name: Ensure the following igmp global config exists on the device
nxos_igmp:
flush_routes: true
enforce_rtr_alert: true
- name: Restart the igmp process
nxos_igmp:
restart: true
s�
updates:
description: commands sent to the device
returned: always
type: list
sample: ["ip igmp flush-routes"]
i����( t load_configt run_commands( t nxos_argument_spect
check_args( t
AnsibleModulec C sC t | i d d 6d d 6� } i d | d k d 6d | d k d 6S(
Ns show running-configt commandt textt outputs ip igmp flush-routesi t flush_routess ip igmp enforce-router-alertt enforce_rtr_alert( R ( t moduleR ( ( sJ /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_igmp.pyt get_currentY s c C s i | j d d 6| j d d 6S( NR
R ( t params( R ( ( sJ /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_igmp.pyt get_desireda s c
C s> t d t d d � d t d d � d t d d d t � d t d d d g d d � � } | j t � t d
| d t � } t � } t | | � t | � } t | � } | j
d } | j
d } t � } | d k r
| d r� | j d � n | d r�| j d
� q�n� | d k r�i d d 6d d 6} x� d d g D]t } | | rw| | rw| j d j | j
| � � � q:| | r:| | r:| j d j | j
| � � � q:q:Wn i t d 6| d 6| d 6}
| r�| j s�t | | � n t |
d <n | j
d r-i d d 6d d 6} t | | � n | j |
� d S( NR
t typet boolR t restartt defaultt statet choicest presentt
argument_spect supports_check_modes no ip igmp flush-routess no ip igmp enforce-router-alerts flush-routess enforce-router-alerts ip igmp {0}s no ip igmp {0}t changedt updatest warningss restart igmpR
R R ( t dictt Falset updateR R t Truet listR R R R t appendt formatt gett
check_modeR R t exit_json( R R R t currentt desiredR R t commandst ldictt argt resultt cmd( ( sJ /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_igmp.pyt mainh sH
")
t __main__N( t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt&