�
�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 d
l m Z d � Z
e d k r� e
� n d S( s 1.1t metadata_versiont previewt statust networkt supported_bysF
---
module: nxos_vrf_af
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages VRF AF.
description:
- Manages VRF AF
author: Gabriele Gerbino (@GGabriele)
notes:
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- Default, where supported, restores params default value.
options:
vrf:
description:
- Name of the VRF.
required: true
afi:
description:
- Address-Family Identifier (AFI).
required: true
choices: ['ipv4', 'ipv6']
route_target_both_auto_evpn:
description:
- Enable/Disable the EVPN route-target 'auto' setting for both
import and export target communities.
type: bool
state:
description:
- Determines whether the config should be present or
not on the device.
default: present
choices: ['present','absent']
sd
- nxos_vrf_af:
vrf: ntc
afi: ipv4
route_target_both_auto_evpn: True
state: present
s�
commands:
description: commands sent to the device
returned: always
type: list
sample: ["vrf context ntc", "address-family ipv4 unicast"]
i����( t
get_configt load_config( t nxos_argument_spect
check_args( t
AnsibleModule( t
NetworkConfigc
C s� t d t d t � d t d t d d d g � d t d t d d � d
t d d d g d
d � � } | j t � t d | d t � } t � } t | | � i t d 6| d 6} t | � } t d d d | � } d | j
d d | j
d g } y | j | � } Wn t k
rd } n Xt � } | r\| j
d
d k r\| j d | j
d � n� | j
d
d k rO| rd | k } | j
d d k rLt | j
d � }
|
r�| r�| j d | j
d � | j d � q| r|
r| j d | j
d � | j d � qqLqO| j d | j
d � | j
d rO| j d � qOn | r�| j d d | j
d � | j s�t | | � n t | d <n | | d <| j | � d S( Nt vrft requiredt afit choicest ipv4t ipv6t route_target_both_auto_evpnt typet boolt statet presentt absentt defaultt
argument_spect supports_check_modet changedt warningst indenti t contentss vrf context %ss address-family %s unicasts no address-family %s unicasts route-target both auto evpns no route-target both auto evpni t commands( t dictt Truet Falset updateR R t listR R R
t paramst get_block_configt
ValueErrort Nonet appendR t insertt
check_modeR t exit_json( R t moduleR t resultt config_textt configt patht currentR t havet want( ( sL /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_vrf_af.pyt mainO sT
t __main__N( t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt&