�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l Z d d l m
Z
d d
l m Z d d l m Z d � Z d e f d � � YZ d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys
---
module: onyx_igmp_vlan
version_added: '2.8'
author: Anas Badaha (@anasbadaha)
short_description: Configures IGMP Vlan parameters
description:
- This module provides declarative management of IGMP vlan configuration on Mellanox ONYX network devices.
notes:
- Tested on ONYX 3.7.0932-01
options:
vlan_id:
description:
- VLAN ID, vlan should exist.
required: true
state:
description:
- IGMP state.
choices: ['enabled', 'disabled']
default: enabled
mrouter:
description:
- Configure ip igmp snooping mrouter port on vlan
suboptions:
state:
description:
- Enable IGMP snooping mrouter on vlan interface.
choices: ['enabled', 'disabled']
default: enabled
name:
description:
- Configure mrouter interface
required: true
querier:
description:
- Configure the IGMP querier parameters
suboptions:
state:
description:
- Enable IGMP snooping querier on vlan in the switch.
choices: ['enabled', 'disabled']
default: enabled
interval:
description:
- Update time interval between querier queries, range 60-600
address:
description:
- Update IP address for the querier
static_groups:
description:
- List of IGMP static groups.
suboptions:
multicast_ip_address:
description:
- Configure static IP multicast group, range 224.0.1.0-239.255.255.25.
required: true
name:
description:
- interface name to configure static groups on it.
sources:
description:
- List of IP sources to be configured
version:
description:
- IGMP snooping operation version on this vlan
choices: ['V2','V3']
sx
- name: configure igmp vlan
onyx_igmp_vlan:
state: enabled
vlan_id: 10
version:
V2
querier:
state: enabled
interval: 70
address: 10.11.121.13
mrouter:
state: disabled
name: Eth1/2
static_groups:
- multicast_ip_address: 224.5.5.8
name: Eth1/1
sources:
- 1.1.1.1
- 1.1.1.2
s�
commands:
description: The list of configuration mode commands to send to the device.
returned: always
type: list
sample:
- vlan 10 ip igmp snooping
- vlan 10 ip igmp snooping static-group 224.5.5.5 interface ethernet 1/1
N( t
AnsibleModule( t show_cmd( t BaseOnyxModulec C` s t j d t j | � � d S( Ns !Ii ( t structt unpackt sockett inet_aton( t addr( ( sO /usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_igmp_vlan.pyt
_ip_to_intx s t OnyxIgmpVlanModulec B` s" e Z e d � Z e d � Z d � Z d � Z d � Z d d � Z d � Z
d � Z e d � � Z
d � Z e d
� � Z d � Z d � Z d
� Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z! RS( s 224.0.1.0s 239.255.255.255c C` sj t d t d t � d t d d d g d d � � } t d t d d d g d d � d t d d
� d t � � } t d t d t � d t d t � d
t d d � � } t d t d d
d t � d t d d d g d d � d t d d d | � d t d d d d d | � d t d d d | � d t d d d g � � } t � } | j | � t d | d t � | _ d S( s initialize module
t namet requiredt statet choicest enabledt disabledt defaultt intervalt typet intt addresst multicast_ip_addresst sourcest listt vlan_idt queriert dictt optionst
static_groupst elementst mroutert versiont V2t V3t
argument_spect supports_check_modeN( R"