??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
àUdac @ sô 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 d l m
Z
m Z d d l m Z m Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e d k rð e ƒ n d
S( s 1.1t metadata_versiont previewt statust networkt supported_bys1
---
module: eos_vrf
version_added: "2.4"
author: "Ricardo Carrillo Cruz (@rcarrillocruz)"
short_description: Manage VRFs on Arista EOS network devices
description:
- This module provides declarative management of VRFs
on Arista EOS network devices.
notes:
- Tested against EOS 4.15
options:
name:
description:
- Name of the VRF.
required: true
rd:
description:
- Route distinguisher of the VRF
interfaces:
description:
- Identifies the set of interfaces that
should be configured in the VRF. Interfaces must be routed
interfaces in order to be placed into a VRF. The name of interface
should be in expanded format and not abbreviated.
associated_interfaces:
description:
- This is a intent option and checks the operational state of the for given vrf C(name)
for associated interfaces. If the value in the C(associated_interfaces) does not match with
the operational state of vrf interfaces on device it will result in failure.
version_added: "2.5"
aggregate:
description: List of VRFs definitions
purge:
description:
- Purge VRFs not defined in the I(aggregate) parameter.
default: no
type: bool
delay:
description:
- Time in seconds to wait before checking for the operational state on remote
device. This wait is applicable for operational state arguments.
default: 10
state:
description:
- State of the VRF configuration.
default: present
choices: ['present', 'absent']
extends_documentation_fragment: eos
s
- name: Create vrf
eos_vrf:
name: test
rd: 1:200
interfaces:
- Ethernet2
state: present
- name: Delete VRFs
eos_vrf:
name: test
state: absent
- name: Create aggregate of VRFs with purge
eos_vrf:
aggregate:
- { name: test4, rd: "1:204" }
- { name: test5, rd: "1:205" }
state: present
purge: yes
- name: Delete aggregate of VRFs
eos_vrf:
aggregate:
- name: test2
- name: test3
- name: test4
- name: test5
state: absent
sß
commands:
description: The list of configuration mode commands to send to the device
returned: always
type: list
sample:
- vrf definition test
- rd 1:100
- interface Ethernet1
- vrf forwarding test
iÿÿÿÿN( t deepcopy( t
AnsibleModule( t remove_default_spec( t load_configt run_commands( t eos_argument_spect
check_argsc C s) x" | D] } | d | k r | Sq Wd S( Nt name( ( R t lstt o( ( sG /usr/lib/python2.7/site-packages/ansible/modules/network/eos/eos_vrf.pyt search_obj_in_list„ s
c C sŠ t ƒ } | \ } } | j d } | j d } x | D]} | d } | d } t | | ƒ }
| d k rˆ |
r7| j d | ƒ q7q6 | d k r6 |
s| j d | ƒ | d k rË | j d | ƒ n | d
r4x; | d
D], } | j d | ƒ | j d | d ƒ qà Wq4q7| d d k rg| d |
d k rg| j d | d ƒ | j d | d ƒ n | d
r7|
d
s¹x³ | d
D], } | j d | ƒ | j d | d ƒ q†Wq4t | d
ƒ |
d
k r4t t | d
ƒ t |
d
ƒ ƒ } x7 | D], } | j d | ƒ | j d | d ƒ qþWq4q7q6 q6 W| r†xB | D]7 }
t |
d | ƒ } | sH| j d |
d ƒ qHqHWn | S(
Nt statet purgeR t rdt absents no vrf definition %st presents vrf definition %ss rd %st
interfacess interface %ss vrf forwarding %s( t listt paramsR t appendt Nonet set( t updatest modulet commandst wantt haveR R t wR R t obj_in_havet it missing_interfacest ht obj_in_want( ( sG /usr/lib/python2.7/site-packages/ansible/modules/network/eos/eos_vrf.pyt map_obj_to_commandsŠ sN
$
$
&
c C sÎ g } t | i d d 6d d 6ƒ } | d j ƒ j ƒ d } t | ƒ } d } xx| | k rÉ| | } | st qR n t j d | j ƒ ƒ } t | ƒ d k r® | d 7} qR nt ƒ } | d | d <| d | d