�
�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 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_bysG
---
module: onyx_vxlan
version_added: "2.8"
author: "Anas Badaha (@anasb)"
short_description: Configures Vxlan
description:
- This module provides declarative management of Vxlan configuration
on Mellanox ONYX network devices.
notes:
- Tested on ONYX evpn_dev.031.
- nve protocol must be enabled.
options:
nve_id:
description:
- nve interface ID.
required: true
loopback_id:
description:
- loopback interface ID.
bgp:
description:
- configure bgp on nve interface.
type: bool
default: true
mlag_tunnel_ip:
description:
- vxlan Mlag tunnel IP
vni_vlan_list:
description:
- Each item in the list has two attributes vlan_id, vni_id.
arp_suppression:
description:
- A flag telling if to configure arp suppression.
type: bool
default: false
s�
- name: configure Vxlan
onyx_vxlan:
nve_id: 1
loopback_id: 1
bgp: yes
mlag-tunnel-ip: 100.0.0.1
vni_vlan_list:
- vlan_id: 10
vni_id: 10010
- vlan_id: 6
vni_id: 10060
arp_suppression: yes
s�
commands:
description: The list of configuration mode commands to send to the device.
returned: always
type: list
sample:
- interface nve 1
- interface nve 1 vxlan source interface loopback 1
- interface nve 1 nve controller bgp
- interface nve 1 vxlan mlag-tunnel-ip 100.0.0.1
- interface nve 1 nve vni 10010 vlan 10
- interface nve 1 nve vni 10060 vlan 6
- interface nve 1 nve neigh-suppression
- interface vlan 6
- interface vlan 10
N( t
AnsibleModule( t show_cmd( t BaseOnyxModulet OnyxVxlanModulec B` s� e Z e j d � Z e j 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 ^loopback (\d+).*s ^Interface NVE (\d+).*c C` s� t d t d t � d t d t � � } t d t d t � d t d t � d t d t d d � d t d d
� d t d d d
d d | � d t d t d d � � } t � } | j | � t d | d t � | _ d S( s initialize module
t vlan_idt typet vni_idt nve_idt loopback_idt bgpt defaultt boolt mlag_tunnel_ipt strt
vni_vlan_listt listt elementst dictt optionst arp_suppressiont
argument_spect supports_check_modeN( R t intt Truet Falset updateR t _module( t selft
vni_vlan_spect element_specR ( ( sK /usr/lib/python2.7/site-packages/ansible/modules/network/onyx/onyx_vxlan.pyt init_module^ s
c C` s/ | j j } t | � | _ | j | j � d S( N( R"