�
�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 m Z d d
l
m Z d d l m Z d d l m 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_magp
version_added: "2.5"
author: "Samer Deeb (@samerd)"
short_description: Manage MAGP protocol on Mellanox ONYX network devices
description:
- This module provides declarative management of MAGP protocol on vlan
interface of Mellanox ONYX network devices.
notes:
- Tested on ONYX 3.6.4000
options:
magp_id:
description:
- "MAGP instance number 1-255"
required: true
interface:
description:
- VLAN Interface name.
required: true
state:
description:
- MAGP state.
default: present
choices: ['present', 'absent', 'enabled', 'disabled']
router_ip:
description:
- MAGP router IP address.
router_mac:
description:
- MAGP router MAC address.
s�
- name: run add vlan interface with magp
onyx_magp:
magp_id: 103
router_ip: 192.168.8.2
router_mac: AA:1B:2C:3D:4E:5F
interface: Vlan 1002
s�
commands:
description: The list of configuration mode commands to send to the device.
returned: always
type: list
sample:
- interface vlan 234 magp 103
- exit
- interface vlan 234 magp 103 ip virtual-router address 1.2.3.4
N( t
AnsibleModule( t iteritems( t BaseOnyxModule( t show_cmdt OnyxMagpModulec B` s� e Z e j d � Z e d � � Z d � Z d � Z d � Z e d � � Z
d � Z d � Z d � Z
d � Z d
� Z d � Z d � Z RS(
s ^Vlan (\d+)$c C` s^ t d t d d d t � d t d d d d d d
d g � d t d t � d
t � d t � � S( Nt magp_idt typet intt requiredt statet defaultt presentt choicest absentt enabledt disabledt interfacet router_ipt
router_mac( t dictt True( t cls( ( sJ /usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_magp.pyt _get_element_specM s c C` s>