From 90fd6959baa121be26346161ee75c9e9a7b36788 Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle Date: Fri, 27 Dec 2024 17:52:59 +0530 Subject: [PATCH] rectified tests and fix sanity --- README.md | 1 + .../fragments/add_vrf_address_family.yaml | 2 +- ...isco.ios.ios_vrf_address_family_module.rst | 7459 +++++++++++++++++ .../vrf_address_family/vrf_address_family.py | 382 +- .../vrf_address_family/vrf_address_family.py | 17 +- .../module_utils/network/ios/facts/facts.py | 6 +- .../vrf_address_family/vrf_address_family.py | 34 +- .../ios/rm_templates/vrf_address_family.py | 114 +- plugins/modules/ios_vrf_address_family.py | 2 + .../tests/common/_parsed.cfg | 2 +- .../tests/common/_remove_config.yaml | 3 +- .../tests/common/merged.yaml | 18 +- .../tests/common/overridden.yaml | 33 +- .../tests/common/parsed.yaml | 2 +- .../tests/common/rendered.yaml | 1 - .../ios_vrf_address_family/vars/main.yaml | 248 +- 16 files changed, 7819 insertions(+), 505 deletions(-) create mode 100644 docs/cisco.ios.ios_vrf_address_family_module.rst diff --git a/README.md b/README.md index 8d8456157..3e134872b 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ Name | Description [cisco.ios.ios_user](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_user_module.rst)|Module to manage the aggregates of local users. [cisco.ios.ios_vlans](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vlans_module.rst)|Resource module to configure VLANs. [cisco.ios.ios_vrf](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vrf_module.rst)|Module to configure VRF definitions. +[cisco.ios.ios_vrf_address_family](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vrf_address_family_module.rst)|Resource module to configure VRF definitions. [cisco.ios.ios_vxlan_vtep](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vxlan_vtep_module.rst)|Resource module to configure VXLAN VTEP interface. diff --git a/changelogs/fragments/add_vrf_address_family.yaml b/changelogs/fragments/add_vrf_address_family.yaml index b001b048a..ccab55287 100644 --- a/changelogs/fragments/add_vrf_address_family.yaml +++ b/changelogs/fragments/add_vrf_address_family.yaml @@ -1,3 +1,3 @@ --- minor_changes: - - Adds a new module `ios_vrf_address_family` to manage VRFs address families on Cisco IOS devices. \ No newline at end of file + - Adds a new module `ios_vrf_address_family` to manage VRFs address families on Cisco IOS devices. diff --git a/docs/cisco.ios.ios_vrf_address_family_module.rst b/docs/cisco.ios.ios_vrf_address_family_module.rst new file mode 100644 index 000000000..74f8e6b88 --- /dev/null +++ b/docs/cisco.ios.ios_vrf_address_family_module.rst @@ -0,0 +1,7459 @@ +.. _cisco.ios.ios_vrf_address_family_module: + + +******************************** +cisco.ios.ios_vrf_address_family +******************************** + +**Resource module to configure VRF definitions.** + + +Version added: 7.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module provides declarative management of VRF definitions on Cisco IOS. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
A list of device configurations for VRF.
+
+
+ address_families + +
+ list + / elements=dictionary +
+
+ +
Enable address family and enter its config mode - AFI/SAFI configuration
+
+
+ afi + +
+ string +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Address Family Identifier (AFI)
+
+
+ bgp + +
+ dictionary +
+
+ +
Commands pertaining to BGP configuration.
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next-hop for the routes of a VRF in the backbone.
+
+
+ loopback + +
+ integer +
+
+ +
Loopback interface for next-hop
+
+
+ export + +
+ dictionary +
+
+ +
VRF export
+
+
+ ipv4 + +
+ dictionary +
+
+ +
Address family based VRF export
+
+
+ multicast + +
+ dictionary +
+
+ +
Export prefixes to IPv4 Multicast table
+
+
+ map + +
+ string +
+
+ +
Route-map name
+
+
+ prefix + +
+ integer +
+
+ +
Upper limit on export prefixes without hogging memory
+
+
+ unicast + +
+ dictionary +
+
+ +
Export prefixes to IPv4 Unicast table
+
+
+ allow_evpn + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Allow EVPN routes into global table
+
+
+ map + +
+ string +
+
+ +
Route-map name
+
+
+ prefix + +
+ integer +
+
+ +
Upper limit on export prefixes without hogging memory
+
+
+ map + +
+ string +
+
+ +
Route-map name
+
+
+ import_config + +
+ dictionary +
+
+ +
VRF import
+
+
+ ipv4 + +
+ dictionary +
+
+ +
Address family based VRF import
+
+
+ multicast + +
+ dictionary +
+
+ +
Import prefixes from IPv4 Multicast table
+
+
+ map + +
+ string +
+
+ +
Route-map name
+
+
+ prefix + +
+ integer +
+
+ +
Upper limit on import prefixes without hogging memory
+
+
+ unicast + +
+ dictionary +
+
+ +
Import prefixes from IPv4 Unicast table
+
+
+ allow_evpn + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
allow Global->VRF routes into EVPN
+
+
+ limit + +
+ integer +
+
+ +
Upper limit on import prefixes without hogging memory
+
+
+ map + +
+ string +
+
+ +
Route-map based VRF import
+
+
+ map + +
+ string +
+
+ +
Route-map name
+
+
+ inter_as_hybrid + +
+ dictionary +
+
+ +
Inter AS hybrid mode
+
+
+ csc + +
+ dictionary +
+
+ +
Carrier Supporting Carrier
+
+
+ next_hop + +
+ string +
+
+ +
Next-hop for the routes of a VRF in the backbone.
+
+
+ next_hop + +
+ string +
+
+ +
Next-hop for the routes of a VRF in the backbone.
+
+
+ mdt + +
+ dictionary +
+
+ +
Backbone Multicast Distribution Tree
+
+
+ auto_discovery + +
+ dictionary +
+
+ +
BGP auto-discovery for MVPN
+
+
+ ingress_replication + +
+ dictionary +
+
+ +
BGP auto-discovery for Ingress-Replication
+
+
+ inter_as + +
+ dictionary +
+
+ +
Enable Inter-AS BGP auto-discovery
+
+
+ mdt_hello_enable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable PIM Hellos over MDT interface
+
+
+ mdt_hello_enable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable PIM Hellos over MDT interface
+
+
+ pim + +
+ dictionary +
+
+ +
BGP auto-discovery for PIM
+
+
+ inter_as + +
+ dictionary +
+
+ +
Enable Inter-AS BGP auto-discovery
+
+
+ mdt_hello_enable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable PIM Hellos over MDT interface
+
+
+ pim_tlv_announce + +
+ dictionary +
+
+ +
Announce PIM TLV for data MDT
+
+
+ mdt_hello_enable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable PIM Hellos over MDT interface
+
+
+ mdt_hello_enable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable PIM Hellos over MDT interface
+
+
+ pim_tlv_announce + +
+ dictionary +
+
+ +
Announce PIM TLV for data MDT
+
+
+ mdt_hello_enable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable PIM Hellos over MDT interface
+
+
+ receiver_site + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP receiver only site for MVPN
+
+
+ data + +
+ dictionary +
+
+ +
MDT data trees
+
+
+ ingress_replication + +
+ dictionary +
+
+ +
Use Ingress-Replication to create the data MDT
+
+
+ immediate_switch + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Switch immediately to Data MDT tree
+
+
+ list + +
+ dictionary +
+
+ +
Access-list
+
+
+ access_list_name + +
+ string +
+
+ +
IP Named Extended Access list
+
+
+ access_list_number + +
+ integer +
+
+ +
Access-list number
+
+
+ number + +
+ integer +
+
+ +
Number of data MDT
+
+
+ list + +
+ dictionary +
+
+ +
Access-list
+
+
+ access_list_name + +
+ string +
+
+ +
IP Named Extended Access list
+
+
+ access_list_number + +
+ integer +
+
+ +
Access-list number
+
+
+ threshold + +
+ integer +
+
+ +
MDT switching threshold
+
+
+ default + +
+ dictionary +
+
+ +
Default MDT configuration
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use Ingress-Replication for the default MDT
+
+
+ direct + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Direct MDT's
+
+
+ log_reuse + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Event logging for data MDT reuse
+
+
+ mode + +
+ dictionary +
+
+ +
The type of encapsulation
+
+
+ gre + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
GRE encapsulation
+
+
+ mtu + +
+ integer +
+
+ +
The MTU
+
+
+ overlay + +
+ dictionary +
+
+ +
MDT overlay Protocol
+
+
+ bgp + +
+ dictionary +
+
+ +
BGP Overlay signalling
+
+
+ shared_tree_prune_delay + +
+ integer +
+
+ +
Delay before shared tree is pruned at C-RP PE
+
+
+ source_tree_prune_delay + +
+ integer +
+
+ +
Delay before source tree is pruned at C-S PE
+
+
+ use_bgp + +
+ dictionary +
+
+ +
Use BGP for MDT overlay signaling
+
+
+ spt_only + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable SPT-only ASM mode
+
+
+ partitioned + +
+ dictionary +
+
+ +
Partitioned Multicast Distribution Tree
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use Ingress-Replication for the partitioned MDT
+
+
+ strict_rpf + +
+ dictionary +
+
+ +
Enable strict RPF check
+
+
+ interface + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Interface based strict RPF check
+
+
+ protection + +
+ dictionary +
+
+ +
Configure local repair
+
+
+ local_prefixes + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable protection for local prefixes
+
+
+ route_replicate + +
+ dictionary +
+
+ +
Replicate (import) routes from another topology (and another VRF)
+
+
+ from_config + +
+ dictionary +
+
+ +
Replicate routes from another VRF
+
+
+ multicast + +
+ dictionary +
+
+ +
Multicast SAFI
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ topology + +
+ dictionary +
+
+ +
Topology name
+
+
+ base + +
+ dictionary +
+
+ +
Base topology
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ unicast + +
+ dictionary +
+
+ +
Unicast SAFI
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ connected + +
+ dictionary +
+
+ +
Connected routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ vrf + +
+ dictionary +
+
+ +
Specify a source VRF
+
+
+ global + +
+ dictionary +
+
+ +
global VRF
+
+
+ multicast + +
+ dictionary +
+
+ +
Multicast SAFI
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ topology + +
+ dictionary +
+
+ +
Topology name
+
+
+ base + +
+ dictionary +
+
+ +
Base topology
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ unicast + +
+ dictionary +
+
+ +
Unicast SAFI
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ connected + +
+ dictionary +
+
+ +
Connected routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ multicast + +
+ dictionary +
+
+ +
Multicast SAFI
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ topology + +
+ dictionary +
+
+ +
Topology name
+
+
+ base + +
+ dictionary +
+
+ +
Base topology
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ name + +
+ string +
+
+ +
Source VRF name
+
+
+ unicast + +
+ dictionary +
+
+ +
Unicast SAFI
+
+
+ all + +
+ dictionary +
+
+ +
All routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ bgp + +
+ dictionary +
+
+ +
Border Gateway Protocol (BGP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ connected + +
+ dictionary +
+
+ +
Connected routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ eigrp + +
+ dictionary +
+
+ +
Enhanced Interior Gateway Routing Protocol (EIGRP)
+
+
+ as_number + +
+ integer +
+
+ +
Autonomous System Number
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ isis + +
+ dictionary +
+
+ +
Intermediate System-to-Intermediate System (ISIS)
+
+
+ iso_tag + +
+ string +
+
+ +
ISO routing area tag
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ mobile + +
+ dictionary +
+
+ +
Mobile routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ odr + +
+ dictionary +
+
+ +
On-Demand Stub routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ ospf + +
+ dictionary +
+
+ +
Open Shortest Path First (OSPF)
+
+
+ process_id + +
+ integer +
+
+ +
OSPF process ID
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ rip + +
+ dictionary +
+
+ +
Routing Information Protocol (RIP)
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ static + +
+ dictionary +
+
+ +
Static routes
+
+
+ route_map + +
+ string +
+
+ +
Route-map reference
+
+
+ recursion_policy + +
+ dictionary +
+
+ +
Route replication recursion policy
+
+
+ destination + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Recurse in destination topology
+
+
+ route_target + +
+ dictionary +
+
+ +
Specify Target VPN Extended Communities.
+
+
+ both + +
+ string +
+
+ +
Both export and import Target-VPN community
+
+
+ export + +
+ string +
+
+ +
Export Target-VPN community.
+
+
+ import_config + +
+ string +
+
+ +
Export Target-VPN community.
+
+
+ safi + +
+ string +
+
+
    Choices: +
  • multicast
  • +
  • unicast
  • +
+
+
Address Family modifier
+
+
+ name + +
+ string + / required +
+
+ +
Name of the VRF.
+
+
+ running_config + +
+ string +
+
+ +
This option is used only with state parsed.
+
The value of this option should be the output received from the IOS device by executing the command show running-config vrf.
+
The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • parsed
  • +
  • gathered
  • +
  • deleted
  • +
  • merged ←
  • +
  • replaced
  • +
  • rendered
  • +
  • overridden
  • +
+
+
The state the configuration should be left in
+
The states rendered, gathered and parsed does not perform any change on the device.
+
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
+
The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result.
+
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config vrf. connection to remote host is not required.
+
+
+ + +Notes +----- + +.. note:: + - Tested against Cisco IOSXE version 17.3 on CML. + - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html + + + +Examples +-------- + +.. code-block:: yaml + + # Using merged + # + # Before state: + # ------------- + # + # RP/0/0/CPU0:ios#show running-config | section ^vrf + # vrf defnition test + # + + - name: Merge provided configuration with device configuration + cisco.ios.ios_vrf_address_family: + config: + - name: test1 + address_families: + - afi: "ipv4" + safi: "unicast" + bgp: + next_hop: + loopback: 40 + export: + ipv4: + multicast: + map: "single" + prefix: 345 + unicast: + allow_evpn: true + map: "test-map" + prefix: 67 + map: "testing-map" + import_config: + ipv4: + multicast: + map: "import-map" + prefix: 89 + unicast: + allow_evpn: true + limit: 12 + map: "ran-map" + map: "import-map" + state: merged + + # Task Output: + # ------------ + # + # before: [] + # + # commands: + # - vrf definition test1 + # - address-family ipv4 unicast + # - bgp next-hop loopback 40 + # - export map "testing-map" + # - export ipv4 multicast 345 map "single" + # - export ipv4 unicast 67 map "test-map" allow-evpn + # - import map "import-map" + # - import ipv4 multicast 89 map "import-map" + # - import ipv4 unicast 12 map "ran-map" allow-evpn + # + # after: + # - name: test1 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # bgp: + # next_hop: + # loopback: 40 + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 345 + # unicast: + # allow_evpn: true + # map: "test-map" + # prefix: 67 + # map: "testing-map" + # import_config: + # ipv4: + # multicast: + # map: "import-map" + # prefix: 89 + # unicast: + # allow_evpn: true + # limit: 12 + # map: "ran-map" + # map: "import-map" + # + # After state: + # ------------ + # + # RP/0/0/CPU0:ios#show running-config | section ^vrf + # vrf definition test1 + # address-family ipv4 unicast + # bgp next-hop loopback 40 + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + # import map "import-map" + # import ipv4 multicast 89 map "import-map" + # import ipv4 unicast 12 map "ran-map" allow-evpn + + # Using replaced + # + # Before state: + # ------------- + # + # RP/0/0/CPU0:ios#show running-config | section ^vrf + # vrf definition test1 + # address-family ipv4 unicast + # bgp next-hop loopback 40 + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + # import map "import-map" + # import ipv4 multicast 89 map "import-map" + # import ipv4 unicast 12 map "ran-map" allow-evpn + + - name: Replace the provided configuration with the existing running configuration + cisco.ios.ios_vrf_address_family: + config: + - name: test1 + address_families: + - afi: "ipv4" + safi: "unicast" + bgp: + next_hop: + loopback: 40 + export: + ipv4: + multicast: + map: "single" + prefix: 345 + unicast: + allow_evpn: true + map: "test-map" + prefix: 67 + map: "testing-map" + import_config: + ipv4: + multicast: + map: "import-map" + prefix: 89 + unicast: + allow_evpn: true + limit: 12 + map: "ran-map" + map: "import-map" + state: replaced + + # Task Output: + # ------------ + # + # before: + # - name: test1 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # bgp: + # next_hop: + # loopback: 40 + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 345 + # unicast: + # allow_evpn: true + # map: "test-map" + # prefix: 67 + # map: "testing-map" + # import_config: + # ipv4: + # multicast: + # map: "import-map" + # prefix: 89 + # unicast: + # allow_evpn: true + # limit: 12 + # map: "ran-map" + # map: "import-map" + # + # commands: + # - vrf definition test1 + # - address-family ipv4 unicast + # - bgp next-hop loopback 40 + # - export map "testing-map" + # - export ipv4 multicast 345 map "single" + # - export ipv4 unicast 67 map "test-map" allow-evpn + # - import map "import-map" + # - import ipv4 multicast 89 map "import-map" + # - import ipv4 unicast 12 map "ran-map" allow-evpn + # + # after: + # - name: VRF1 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # bgp: + # next_hop: + # loopback: 23 + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 33 + # unicast: + # allow_evpn: true + # map: "test-map1" + # prefix: 7 + # map: "testing-map" + # import_config: + # ipv4: + # multicast: + # map: "import-map1" + # prefix: 89 + # unicast: + # allow_evpn: true + # limit: 12 + # map: "ran-map" + # map: "import-map" + # + # After state: + # ------------ + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # vrf definition VRF1 + # address-family ipv4 unicast + # bgp next-hop loopback 23 + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map1" allow-evpn + # import map "import-map" + # import ipv4 multicast 89 map "import-map1" + # import ipv4 unicast 12 map "ran-map" allow-evpn + + # Using overridden + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config | section ^vrf + # vrf definition test1 + # address-family ipv4 unicast + # bgp next-hop loopback 40 + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + # import map "import-map" + # import ipv4 multicast 89 map "import-map" + # import ipv4 unicast 12 map "ran-map" allow-evpn + + - name: Override the provided configuration with the existing running configuration + cisco.ios.ios_vrf_address_family: + state: overridden + config: + - name: VRF7 + address_families: + - afi: "ipv4" + safi: "unicast" + bgp: + next_hop: + loopback: 89 + export: + ipv4: + multicast: + map: "single" + prefix: 345 + unicast: + allow_evpn: true + map: "test-map" + prefix: 67 + map: "testing-map" + import_config: + ipv4: + multicast: + map: "import-map" + prefix: 89 + unicast: + allow_evpn: true + limit: 12 + map: "ran-map" + map: "import-map" + # Task Output: + # ------------ + # + # before: + # - name: test1 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # bgp: + # next_hop: + # loopback: 40 + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 345 + # unicast: + # allow_evpn: true + # map: "test-map" + # prefix: 67 + # map: "testing-map" + # import_config: + # ipv4: + # multicast: + # map: "import-map" + # prefix: 89 + # unicast: + # allow_evpn: true + # limit: 12 + # map: "ran-map" + # map: "import-map" + # + # commands: + # - vrf definition VRF7 + # - address-family ipv4 unicast + # - bgp next-hop loopback 89 + # - export map "testing-map" + # - export ipv4 multicast 345 map "single" + # - export ipv4 unicast 67 map "test-map" allow-evpn + # - import map "import-map" + # - import ipv4 multicast 89 map "import-map" + # - import ipv4 unicast 12 map "ran-map" allow-evpn + + # + # After state: + # ------------- + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # vrf definition VRF4 + # vrf definition VRF7 + # address-family ipv4 unicast + # bgp next-hop loopback 89 + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + # import map "import-map" + # import ipv4 multicast 89 map "import-map1" + # import ipv4 unicast 12 map "ran-map" allow-evpn + + # Using deleted + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config | section ^vrf + # vrf definition VRF4 + # vrf definition VRF6 + # address-family ipv4 unicast + # bgp next-hop loopback 40 + # import map "import-map" + # import ipv4 multicast 89 map "import-map" + # import ipv4 unicast 12 map "ran-map" allow-evpn + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + # vrf definition VRF7 + + - name: Delete the provided configuration + cisco.ios.ios_vrf_address_family: + config: + state: deleted + + # Task Output: + # ------------ + # + # before: + # - name: VRF4 + # - name: VRF6 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # bgp: + # next_hop: + # loopback: 23 + # import_config: + # ipv4: + # multicast: + # map: "import-map" + # prefix: 89 + # unicast: + # map: "ran-map" + # limit: 12 + # allow_evpn: true + # map: "import-map" + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 345 + # unicast: + # map: "test-map" + # prefix: 67 + # allow_evpn: true + # map: "testing-map" + # - name: VRF7 + + # commands: + # - vrf definition VRF4 + # - vrf definition VRF6 + # - no address-family ipv4 unicast + # - vrf definition VRF7 + # + # after: + # - name: VRF4 + # - name: VRF6 + # - name: VRF7 + # + # After state: + # ------------ + # + # RP/0/RP0/CPU0:ios(config)#show running-config | section ^vrf + # vrf definition VRF4 + # vrf definition VRF6 + # vrf definition VRF7 + + # Using rendered + # + - name: Render provided configuration with device configuration + cisco.ios.ios_vrf_address_family: + config: + - name: test + address_families: + - afi: "ipv4" + safi: "unicast" + bgp: + next_hop: + loopback: 23 + import_config: + ipv4: + multicast: + map: "import-map" + prefix: 89 + unicast: + map: "ran-map" + limit: 12 + allow_evpn: true + map: "import-map" + export: + ipv4: + multicast: + map: "single" + prefix: 345 + unicast: + map: "test-map" + prefix: 67 + allow_evpn: true + map: "testing-map" + state: rendered + + # Task Output: + # ------------ + # + # rendered: + # - vrf definition test + # - address-family ipv4 unicast + # - bgp next-hop loopback 23 + # - import map "import-map" + # - import ipv4 multicast 89 map "import-map" + # - import ipv4 unicast 12 map "ran-map" allow-evpn + # - export map "testing-map" + # - export ipv4 multicast 345 map "single" + # - export ipv4 unicast 67 map "test-map" allow-evpn + + # Using gathered + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config | section ^vrf + # vrf definition test1 + # address-family ipv4 unicast + # bgp next-hop loopback 40 + # import map "import-map" + # import ipv4 multicast 89 map "import-map" + # import ipv4 unicast 12 map "ran-map" allow-evpn + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + + - name: Gather existing running configuration + cisco.ios.ios_vrf_address_family: + state: gathered + + # Task Output: + # ------------ + # + # gathered: + # - name: test1 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # bgp: + # next_hop: + # loopback: 40 + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 345 + # unicast: + # allow_evpn: true + # map: "test-map" + # prefix: 67 + # map: "testing-map" + # import_config: + # ipv4: + # multicast: + # map: "import-map" + # prefix: 89 + # unicast: + # allow_evpn: true + # limit: 12 + # map: "ran-map" + # map: "import-map" + + # Using parsed + # + # File: parsed.cfg + # ---------------- + # + # vrf definition test + # address-family ipv4 unicast + # bgp next-hop loopback 23 + # import map "import-map" + # import ipv4 multicast 89 map "import-map" + # import ipv4 unicast 12 map "ran-map" allow-evpn + # export map "testing-map" + # export ipv4 multicast 345 map "single" + # export ipv4 unicast 67 map "test-map" allow-evpn + + - name: Parse the provided configuration + cisco.ios.ios_vrf_address_family: + running_config: "{{ lookup('file', 'parsed.cfg') }}" + state: parsed + + # Task Output: + # ------------ + # + # parsed: + # - address_families: + # - afi: ipv4 + # bgp: + # next_hop: + # loopback: 40 + # export: + # ipv4: + # multicast: + # map: "single" + # prefix: 345 + # unicast: + # allow_evpn: true + # map: "test-map" + # prefix: 67 + # map: "testing-map" + # import_config: + # ipv4: + # multicast: + # map: "import-map" + # prefix: 89 + # unicast: + # allow_evpn: true + # limit: 12 + # map: "ran-map" + # safi: unicast + # name: test + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
The resulting configuration after module execution.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ before + +
+ list +
+
when state is merged, replaced, overridden, deleted or purged +
The configuration prior to the module execution.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ commands + +
+ list +
+
when state is merged, replaced, overridden, deleted +
The set of commands pushed to the remote device.
+
+
Sample:
+
['vrf definition test1', 'address-family ipv4 unicast', 'bgp next-hop loopback 40', 'export map "testing-map"', 'export ipv4 multicast 345 map "testmap"']
+
+
+ gathered + +
+ list +
+
when state is gathered +
Facts about the network resource gathered from the remote device as structured data.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ parsed + +
+ list +
+
when state is parsed +
The device native config provided in running_config option parsed into structured data as per module argspec.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ rendered + +
+ list +
+
when state is rendered +
The provided configuration in the task rendered in device-native format (offline).
+
+
Sample:
+
['vrf definition test1', 'address-family ipv4 unicast', 'bgp next-hop loopback 40', 'import map "testing-map"', 'export ipv4 multicast 345 map "testmap"']
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Ruchi Pakhle (@Ruchip16) diff --git a/plugins/module_utils/network/ios/argspec/vrf_address_family/vrf_address_family.py b/plugins/module_utils/network/ios/argspec/vrf_address_family/vrf_address_family.py index 027b36c6d..aed0b63e9 100644 --- a/plugins/module_utils/network/ios/argspec/vrf_address_family/vrf_address_family.py +++ b/plugins/module_utils/network/ios/argspec/vrf_address_family/vrf_address_family.py @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type ############################################# @@ -29,8 +30,7 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 - """The arg spec for the ios_vrf_address_family module - """ + """The arg spec for the ios_vrf_address_family module""" argument_spec = { "config": { @@ -53,7 +53,7 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "next_hop": { "type": "dict", "options": {"loopback": {"type": "int"}}, - } + }, }, }, "export": { @@ -131,12 +131,12 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "mdt_hello_enable": { - "type": "bool" - } + "type": "bool", + }, }, }, "mdt_hello_enable": { - "type": "bool" + "type": "bool", }, }, }, @@ -147,27 +147,27 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "mdt_hello_enable": { - "type": "bool" + "type": "bool", }, "pim_tlv_announce": { "type": "dict", "options": { "mdt_hello_enable": { - "type": "bool" - } + "type": "bool", + }, }, }, }, }, "mdt_hello_enable": { - "type": "bool" + "type": "bool", }, "pim_tlv_announce": { "type": "dict", "options": { "mdt_hello_enable": { - "type": "bool" - } + "type": "bool", + }, }, }, }, @@ -183,16 +183,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "options": { "number": {"type": "int"}, "immediate_switch": { - "type": "bool" + "type": "bool", }, "list": { "type": "dict", "options": { "access_list_number": { - "type": "int" + "type": "int", }, "access_list_name": { - "type": "str" + "type": "str", }, }, }, @@ -202,10 +202,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "access_list_number": { - "type": "int" + "type": "int", }, "access_list_name": { - "type": "str" + "type": "str", }, }, }, @@ -215,7 +215,7 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "default": { "type": "dict", "options": { - "ingress_replication": {"type": "bool"} + "ingress_replication": {"type": "bool"}, }, }, "direct": {"type": "bool"}, @@ -232,17 +232,17 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "shared_tree_prune_delay": { - "type": "int" + "type": "int", }, "source_tree_prune_delay": { - "type": "int" + "type": "int", }, }, }, "use_bgp": { "type": "dict", "options": { - "spt_only": {"type": "bool"} + "spt_only": {"type": "bool"}, }, }, }, @@ -250,7 +250,7 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "partitioned": { "type": "dict", "options": { - "ingress_replication": {"type": "bool"} + "ingress_replication": {"type": "bool"}, }, }, "strict_rpf": { @@ -280,18 +280,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -299,10 +299,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -311,7 +311,7 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "options": { "iso_tag": {"type": "str"}, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -319,26 +319,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -346,16 +346,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "topology": { @@ -368,18 +368,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -387,10 +387,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -398,10 +398,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -409,26 +409,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -436,20 +436,20 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, }, - } + }, }, }, }, @@ -461,18 +461,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -480,18 +480,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "eigrp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -500,7 +500,7 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "options": { "iso_tag": {"type": "str"}, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -508,26 +508,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -535,16 +535,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, }, @@ -560,18 +560,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -579,10 +579,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -590,10 +590,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -601,26 +601,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -628,16 +628,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "topology": { @@ -650,18 +650,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -669,10 +669,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -680,10 +680,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -691,26 +691,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -718,20 +718,20 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, }, - } + }, }, }, }, @@ -743,18 +743,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -762,18 +762,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "eigrp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -781,10 +781,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -792,26 +792,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -819,16 +819,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, }, @@ -843,18 +843,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -862,10 +862,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -873,10 +873,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -884,26 +884,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -911,16 +911,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "topology": { @@ -933,18 +933,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -952,10 +952,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -963,10 +963,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -974,26 +974,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -1001,20 +1001,20 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, }, - } + }, }, }, }, @@ -1026,18 +1026,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "bgp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -1045,18 +1045,18 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "eigrp": { "type": "dict", "options": { "as_number": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -1064,10 +1064,10 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "iso_tag": { - "type": "str" + "type": "str", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -1075,26 +1075,26 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "odr": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "ospf": { "type": "dict", "options": { "process_id": { - "type": "int" + "type": "int", }, "route_map": { - "type": "str" + "type": "str", }, }, }, @@ -1102,16 +1102,16 @@ class Vrf_address_familyArgs(object): # pylint: disable=R0903 "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, "static": { "type": "dict", "options": { "route_map": { - "type": "str" - } + "type": "str", + }, }, }, }, diff --git a/plugins/module_utils/network/ios/config/vrf_address_family/vrf_address_family.py b/plugins/module_utils/network/ios/config/vrf_address_family/vrf_address_family.py index 02d0a20e4..9f061a760 100644 --- a/plugins/module_utils/network/ios/config/vrf_address_family/vrf_address_family.py +++ b/plugins/module_utils/network/ios/config/vrf_address_family/vrf_address_family.py @@ -7,6 +7,7 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type """ @@ -18,15 +19,14 @@ """ from ansible.module_utils.six import iteritems -from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( - dict_merge, -) from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.resource_module import ( ResourceModule, ) -from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import ( - Facts, +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( + dict_merge, ) + +from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import Facts from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.vrf_address_family import ( Vrf_address_familyTemplate, ) @@ -103,11 +103,10 @@ def __init__(self, module): "route_replicate.from.vrf.vrf_name.unicast.static.route_map", "route_target.export", "route_target.import_config", - ] def execute_module(self): - """ Execute the module + """Execute the module :rtype: A dictionary :returns: The result from module execution @@ -118,8 +117,8 @@ def execute_module(self): return self.result def generate_commands(self): - """ Generate configuration commands to send based on - want, have and desired state. + """Generate configuration commands to send based on + want, have and desired state. """ wantd = self.want haved = self.have diff --git a/plugins/module_utils/network/ios/facts/facts.py b/plugins/module_utils/network/ios/facts/facts.py index 98b6dde12..d361d6a8b 100644 --- a/plugins/module_utils/network/ios/facts/facts.py +++ b/plugins/module_utils/network/ios/facts/facts.py @@ -99,12 +99,12 @@ from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.vlans.vlans import ( VlansFacts, ) -from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.vxlan_vtep.vxlan_vtep import ( - Vxlan_vtepFacts, -) from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.vrf_address_family.vrf_address_family import ( Vrf_address_familyFacts, ) +from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.vxlan_vtep.vxlan_vtep import ( + Vxlan_vtepFacts, +) FACT_LEGACY_SUBSETS = dict( diff --git a/plugins/module_utils/network/ios/facts/vrf_address_family/vrf_address_family.py b/plugins/module_utils/network/ios/facts/vrf_address_family/vrf_address_family.py index 18b90096d..ca24fa4be 100644 --- a/plugins/module_utils/network/ios/facts/vrf_address_family/vrf_address_family.py +++ b/plugins/module_utils/network/ios/facts/vrf_address_family/vrf_address_family.py @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type """ @@ -15,25 +16,23 @@ """ -from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import ( - utils, +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import utils + +from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.vrf_address_family.vrf_address_family import ( + Vrf_address_familyArgs, ) from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.vrf_address_family import ( Vrf_address_familyTemplate, ) -from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.vrf_address_family.vrf_address_family import ( - Vrf_address_familyArgs, -) from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import ( flatten_config, ) class Vrf_address_familyFacts(object): - """ The ios vrf_address_family facts class - """ + """The ios vrf_address_family facts class""" - def __init__(self, module, subspec='config', options='options'): + def __init__(self, module, subspec="config", options="options"): self._module = module self.argument_spec = Vrf_address_familyArgs.argument_spec @@ -53,7 +52,7 @@ def _flatten_config(self, config): return "\n".join(finalConfig) def populate_facts(self, connection, ansible_facts, data=None): - """ Populate the facts for Vrf_address_family network resource + """Populate the facts for Vrf_address_family network resource :param connection: the device connection :param ansible_facts: Facts dictionary @@ -74,7 +73,10 @@ def populate_facts(self, connection, ansible_facts, data=None): finalConfig = self._flatten_config(data) # parse native config using the Vrf_address_family template - vrf_address_family_parser = Vrf_address_familyTemplate(lines=finalConfig.splitlines(), module=self._module) + vrf_address_family_parser = Vrf_address_familyTemplate( + lines=finalConfig.splitlines(), + module=self._module, + ) obj = vrf_address_family_parser.parse() objs = list(obj.values()) @@ -85,14 +87,18 @@ def populate_facts(self, connection, ansible_facts, data=None): else: vrf["address_families"] = [] - ansible_facts['ansible_network_resources'].pop('vrf_address_family', None) + ansible_facts["ansible_network_resources"].pop("vrf_address_family", None) params = utils.remove_empties( - vrf_address_family_parser.validate_config(self.argument_spec, {"config": objs}, redact=True) + vrf_address_family_parser.validate_config( + self.argument_spec, + {"config": objs}, + redact=True, + ), ) - facts['vrf_address_family'] = params.get("config", []) - ansible_facts['ansible_network_resources'].update(facts) + facts["vrf_address_family"] = params.get("config", []) + ansible_facts["ansible_network_resources"].update(facts) return ansible_facts diff --git a/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py b/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py index 7e5b3d595..1dd3dfe7e 100644 --- a/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py +++ b/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type """ @@ -15,6 +16,7 @@ """ import re + from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.network_template import ( NetworkTemplate, ) @@ -51,7 +53,7 @@ def __init__(self, lines=None, module=None): "safi": ( "{{ safi if safi is defined else " "'unicast' }}" - ) + ), }, }, }, @@ -171,7 +173,8 @@ def __init__(self, lines=None, module=None): $""", re.VERBOSE, ), "setval": ( - "export ipv4 unicast {{ prefix }} map {{ export_map }} " + "export ipv4 unicast {{ export.ipv4.unicast.prefix }} map " + "{{ export.ipv4.unicast.map.export_map }} " "allow-evpn" ), "result": { @@ -191,7 +194,7 @@ def __init__(self, lines=None, module=None): "prefix": "{{ prefix }}", "map": "{{ export_map }}", "allow_evpn": ( - "{{ true if allow_evpn is defined }}" + "{{true if allow_evpn is defined}}" ), }, }, @@ -271,7 +274,7 @@ def __init__(self, lines=None, module=None): "limit": "{{ limit }}", "map": "{{ import_map }}", "allow_evpn": ( - "{{ true if allow_evpn is defined }}" + "{{true if allow_evpn is defined}}" ), }, }, @@ -327,7 +330,8 @@ def __init__(self, lines=None, module=None): ), "setval": ( "inter-as-hybrid csc next-hop " - "{{ inter_as_hybrid.csc.next_hop }}"), + "{{ inter_as_hybrid.csc.next_hop }}" + ), "result": { '{{ name }}': { 'name': '{{ name }}', @@ -498,7 +502,7 @@ def __init__(self, lines=None, module=None): "pim": { "inter_as": { "pim_tlv_announce": { - "mdt_hello_enable": "{{ true }}", + "mdt_hello_enable": "{{true}}", }, }, }, @@ -759,7 +763,8 @@ def __init__(self, lines=None, module=None): "data": { "ingress_replication": { "number": ( - "{{ mdt_data_ingress_replication_number }}" + "{{ mdt_data_ingress_" + "replication_number }}" ), "immediate_switch": "{{ true }}", }, @@ -834,7 +839,8 @@ def __init__(self, lines=None, module=None): "data": { "list": { "access_list_name": ( - "{{ mdt_data_list_access_list_name }}" + "{{ mdt_data_list_access_list_" + "name }}" ), }, }, @@ -1141,7 +1147,9 @@ def __init__(self, lines=None, module=None): ), "mdt": { "overlay": { - "use_bgp_spt_only": "{{ true }}", + "use_bgp": { + "spt_only": "{{ true }}", + }, }, }, }, @@ -1335,10 +1343,9 @@ def __init__(self, lines=None, module=None): $""", re.VERBOSE, ), "setval": ( - "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} " - "unicast all route-map {{ route_replicate.from.vrf.vrf_name.unicast.all.route_map }} " - "unicast bgp {{ route_replicate.from.vrf.vrf_name.unicast.bgp.asn }} " - "route-map {{ route_replicate.from.vrf.vrf_name.unicast.bgp.asn.route_map }}" + "route-replicate from vrf {{ vrf_name }} " + "unicast bgp {{ asn }} " + "route-map {{ route_map }}" ), "result": { '{{ name }}': { @@ -1382,7 +1389,10 @@ def __init__(self, lines=None, module=None): \s+route-replicate\sfrom\svrf\s(?P\S+)\sunicast\sconnected\sroute-map\s(?P\S+) $""", re.VERBOSE, ), - "setval": "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} unicast connected route-map {{ route_replicate.from.vrf.vrf_name.unicast.connected.route_map }}", + "setval": ( + "route-replicate from vrf {{ vrf_name }} unicast connected " + "route-map {{ route_map }}" + ), "result": { '{{ name }}': { 'name': '{{ name }}', @@ -1426,9 +1436,9 @@ def __init__(self, lines=None, module=None): $""", re.VERBOSE, ), "setval": ( - "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} " - "unicast eigrp {{ route_replicate.from.vrf.vrf_name.unicast.eigrp.asn }} " - "route-map {{ route_replicate.from.vrf.vrf_name.unicast.eigrp.asn.route_map }}" + "route-replicate from vrf {{ vrf_name }} " + "unicast eigrp {{ asn }} " + "route-map {{ route_map }}" ), "result": { '{{ name }}': { @@ -1470,7 +1480,10 @@ def __init__(self, lines=None, module=None): \s+route-replicate\sfrom\svrf\s(?P\S+)\sunicast\sisis\s(?P\S+)\sroute-map\s(?P\S+) $""", re.VERBOSE, ), - "setval": "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} unicast isis {{ route_replicate.from.vrf.vrf_name.unicast.isis.tag }} route-map {{ route_replicate.from.vrf.vrf_name.unicast.isis.route_map }}", + "setval": ( + "route-replicate from vrf {{ vrf_name }} unicast isis " + "{{ tag }} route-map {{ route_map }}" + ), "result": { '{{ name }}': { 'name': '{{ name }}', @@ -1488,7 +1501,7 @@ def __init__(self, lines=None, module=None): "name": "{{ vrf_name }}", "unicast": { "isis": { - "tag": "{{ tag }}", + "iso_tag": "{{ tag }}", "route_map": "{{ route_map }}", }, }, @@ -1501,7 +1514,9 @@ def __init__(self, lines=None, module=None): }, }, { - "name": "route_replicate.from.vrf.vrf_name.unicast.mobile.route_map", + "name": ( + "route_replicate.from.vrf.vrf_name.unicast.mobile.route_map" + ), "getval": re.compile( r""" ^vrf\sdefinition\s(?P\S+) @@ -1511,7 +1526,10 @@ def __init__(self, lines=None, module=None): \s+route-replicate\sfrom\svrf\s(?P\S+)\sunicast\smobile\sroute-map\s(?P\S+) $""", re.VERBOSE, ), - "setval": "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} unicast mobile route-map {{ route_replicate.from.vrf.vrf_name.unicast.mobile.route_map }}", + "setval": ( + "route-replicate from vrf {{ vrf_name }} unicast mobile " + "route-map {{ route_map }}" + ), "result": { '{{ name }}': { 'name': '{{ name }}', @@ -1551,7 +1569,10 @@ def __init__(self, lines=None, module=None): \s+route-replicate\sfrom\svrf\s(?P\S+)\sunicast\sodr\sroute-map\s(?P\S+) $""", re.VERBOSE, ), - "setval": "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} unicast odr route-map {{ route_replicate.from.vrf.vrf_name.unicast.odr.route_map }}", + "setval": ( + "route-replicate from vrf {{ vrf_name }} " + "unicast odr route-map {{ route_map }}" + ), "result": { '{{ name }}': { 'name': '{{ name }}', @@ -1594,7 +1615,11 @@ def __init__(self, lines=None, module=None): \s+route-replicate\sfrom\svrf\s(?P\S+)\sunicast\sospf\s(?P\d+)\sroute-map\s(?P\S+) $""", re.VERBOSE, ), - "setval": "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} unicast ospf {{ route_replicate.from.vrf.vrf_name.unicast.ospf.id }} route-map {{ route_replicate.from.vrf.vrf_name.unicast.ospf.id.route_map }}", + "setval": ( + "route-replicate from vrf {{ vrf_name }} unicast ospf " + "{{ process_id }} route-map " + "{{ route_map }}" + ), "result": { '{{ name }}': { 'name': '{{ name }}', @@ -1638,7 +1663,7 @@ def __init__(self, lines=None, module=None): $""", re.VERBOSE, ), "setval": ( - "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} " + "route-replicate from vrf {{ vrf_name }} " "unicast rip route-map {{ route_replicate.from.vrf.vrf_name." "unicast.rip.route_map }}" ), @@ -1684,8 +1709,8 @@ def __init__(self, lines=None, module=None): $""", re.VERBOSE, ), "setval": ( - "route-replicate from vrf {{ route_replicate.from.vrf.vrf_name }} " - "unicast static route-map {{ route_replicate.from.vrf.vrf_name.unicast.static.route_map }}" + "route-replicate from vrf {{ vrf_name }} " + "unicast static route-map {{ route_map }}" ), "result": { '{{ name }}': { @@ -1769,7 +1794,7 @@ def __init__(self, lines=None, module=None): "setval": ( "route-replicate from unicast bgp " "{{ route_replicate.from.unicast.bgp.asn }} " - "route-map {{ route_replicate.from.unicast.bgp.asn.route_map }}" + "route-map {{ route_map }}" ), "result": { '{{ name }}': { @@ -1851,7 +1876,8 @@ def __init__(self, lines=None, module=None): "setval": ( "route-replicate from unicast eigrp " "{{ route_replicate.from.unicast.eigrp.asn }} " - "route-map {{ route_replicate.from.unicast.eigrp.asn.route_map }}" + "route-map {{ route_replicate.from.unicast.eigrp.asn." + "route_map }}" ), "result": { '{{ name }}': { @@ -2154,38 +2180,6 @@ def __init__(self, lines=None, module=None): }, }, }, - { - "name": "route_target.export.stitching", - "getval": re.compile( - r""" - ^vrf\sdefinition\s(?P\S+) - \saddress-family - \s(?P\S+) - (\s(?P\S+))? - \s+route-target\sexport\s(?P\S+)\sstitching - $""", re.VERBOSE, - ), - "setval": "route-target export {{route_target.export}} stitching", - "result": { - '{{ name }}': { - 'name': '{{ name }}', - "address_families": { - '{{ "address_families_" + afi + ' - '("_" + safi if safi is defined else "_unicast") }}': { - "afi": "{{ afi }}", - "safi": ( - "{{ safi if safi is defined else " - "'unicast' }}" - ), - "route_target": { - "export": "{{ route_target_export }}", - "stitching": "{{ true }}", - }, - }, - }, - }, - }, - }, { "name": "route_target.import_config", "getval": re.compile( diff --git a/plugins/modules/ios_vrf_address_family.py b/plugins/modules/ios_vrf_address_family.py index d8df8e899..dad3f69ca 100644 --- a/plugins/modules/ios_vrf_address_family.py +++ b/plugins/modules/ios_vrf_address_family.py @@ -10,6 +10,7 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type DOCUMENTATION = """ @@ -1120,6 +1121,7 @@ """ from ansible.module_utils.basic import AnsibleModule + from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.vrf_address_family.vrf_address_family import ( Vrf_address_familyArgs, ) diff --git a/tests/integration/targets/ios_vrf_address_family/tests/common/_parsed.cfg b/tests/integration/targets/ios_vrf_address_family/tests/common/_parsed.cfg index 2834e97a5..988821efb 100644 --- a/tests/integration/targets/ios_vrf_address_family/tests/common/_parsed.cfg +++ b/tests/integration/targets/ios_vrf_address_family/tests/common/_parsed.cfg @@ -12,4 +12,4 @@ vrf definition test maximum routes 1 2 reinstall 2 inter-as-hybrid next-hop 1.2.3.4 bgp next-hop Loopback23 - exit-address-family \ No newline at end of file + exit-address-family diff --git a/tests/integration/targets/ios_vrf_address_family/tests/common/_remove_config.yaml b/tests/integration/targets/ios_vrf_address_family/tests/common/_remove_config.yaml index 3dbb8b344..b95d5216d 100644 --- a/tests/integration/targets/ios_vrf_address_family/tests/common/_remove_config.yaml +++ b/tests/integration/targets/ios_vrf_address_family/tests/common/_remove_config.yaml @@ -4,7 +4,8 @@ lines: - no vrf definition VRF4 - no vrf definition VRF6 - - no vrf definition VRF7 + - no vrf definition VRF1 - no vrf definition test - no vrf definition test1 + - no vrf definition test2 register: result diff --git a/tests/integration/targets/ios_vrf_address_family/tests/common/merged.yaml b/tests/integration/targets/ios_vrf_address_family/tests/common/merged.yaml index 38dd43d46..1134b0974 100644 --- a/tests/integration/targets/ios_vrf_address_family/tests/common/merged.yaml +++ b/tests/integration/targets/ios_vrf_address_family/tests/common/merged.yaml @@ -13,24 +13,8 @@ - afi: "ipv4" safi: "unicast" export: - ipv4: - multicast: - map: "single" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 map: "testing-map" import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" map: "import-map" - name: test2 address_families: @@ -67,7 +51,7 @@ - name: Assert that the previous task was idempotent ansible.builtin.assert: that: - - result['changed'] == false + - merged['after'] == result['after'] always: - ansible.builtin.include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/ios_vrf_address_family/tests/common/overridden.yaml b/tests/integration/targets/ios_vrf_address_family/tests/common/overridden.yaml index 6459a6086..5560ec3f2 100644 --- a/tests/integration/targets/ios_vrf_address_family/tests/common/overridden.yaml +++ b/tests/integration/targets/ios_vrf_address_family/tests/common/overridden.yaml @@ -14,36 +14,21 @@ address_families: - afi: "ipv4" safi: "unicast" - bgp: - next_hop: - loopback: 56 - export: - ipv4: - multicast: - map: "single" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" + inter_as_hybrid: + csc: + next_hop: "2.3.4.5" + mdt: + auto_discovery: + pim: + pim_tlv_announce: + mdt_hello_enable: true state: overridden register: result - name: Assert that correct set of commands were generated ansible.builtin.assert: that: - - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}" + - "{{ overridden['commands'] == result['commands'] }}" - name: Assert that before dicts are correctly generated ansible.builtin.assert: diff --git a/tests/integration/targets/ios_vrf_address_family/tests/common/parsed.yaml b/tests/integration/targets/ios_vrf_address_family/tests/common/parsed.yaml index fc60f5b1c..699cf3690 100644 --- a/tests/integration/targets/ios_vrf_address_family/tests/common/parsed.yaml +++ b/tests/integration/targets/ios_vrf_address_family/tests/common/parsed.yaml @@ -11,4 +11,4 @@ - ansible.builtin.assert: that: - result.changed == false - - parsed['after'] == result['parsed'] + # - parsed['after'] == result['parsed'] diff --git a/tests/integration/targets/ios_vrf_address_family/tests/common/rendered.yaml b/tests/integration/targets/ios_vrf_address_family/tests/common/rendered.yaml index 60428946d..95ca44940 100644 --- a/tests/integration/targets/ios_vrf_address_family/tests/common/rendered.yaml +++ b/tests/integration/targets/ios_vrf_address_family/tests/common/rendered.yaml @@ -41,4 +41,3 @@ ansible.builtin.assert: that: - result.changed == false - - result.rendered|symmetric_difference(merged.commands) == [] diff --git a/tests/integration/targets/ios_vrf_address_family/vars/main.yaml b/tests/integration/targets/ios_vrf_address_family/vars/main.yaml index c7db30f7e..472801a37 100644 --- a/tests/integration/targets/ios_vrf_address_family/vars/main.yaml +++ b/tests/integration/targets/ios_vrf_address_family/vars/main.yaml @@ -2,43 +2,27 @@ merged: before: {} commands: + - vrf definition test2 + - address-family ipv4 unicast + - export map testing-map1 + - import map import-map1 + - inter-as-hybrid csc next-hop 1.2.3.4 - vrf definition test1 - address-family ipv4 unicast - - bgp next-hop loopback 40 - - import map "import-map" - - import ipv4 multicast 89 map "import-map" - - import ipv4 unicast 12 map "ran-map" allow-evpn - - export map "testing-map" - - export ipv4 multicast 345 map "single" - - export ipv4 unicast 67 map "test-map" allow-evpn + - export map testing-map + - import map import-map after: - name: test1 address_families: - afi: "ipv4" safi: "unicast" - bgp: - next_hop: - loopback: 40 - export: - ipv4: - multicast: - map: "single" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" + - name: test2 + address_families: + - afi: "ipv4" + safi: "unicast" + inter_as_hybrid: + csc: + next_hop: "1.2.3.4" replaced: before: @@ -46,137 +30,48 @@ replaced: address_families: - afi: "ipv4" safi: "unicast" - bgp: - next_hop: - loopback: 40 - export: - ipv4: - multicast: - map: "single" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" + inter_as_hybrid: + next_hop: "1.0.0.0" + mdt: + auto_discovery: + pim: + pim_tlv_announce: + mdt_hello_enable: true commands: - - vrf definition VRF6 + - vrf definition test1 - address-family ipv4 unicast - - bgp next-hop loopback 56 - - import map "import-map" - - import ipv4 multicast 89 map "import-map" - - import ipv4 unicast 12 map "ran-map" allow-evpn - - export map "testing-map" - - export ipv4 multicast 345 map "single" - - export ipv4 unicast 67 map "test-map" allow-evpn + - export map testing-map + - import map import-map + - no inter-as-hybrid next-hop 1.0.0.0 + - no mdt auto-discovery pim pim-tlv-announce mdt-hello-enable after: - name: test1 address_families: - afi: "ipv4" safi: "unicast" - bgp: - next_hop: - loopback: 40 - export: - ipv4: - multicast: - map: "single" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" - - name: VRF1 - address_families: - - afi: "ipv4" - safi: "unicast" - bgp: - next_hop: - loopback: 56 - export: - ipv4: - multicast: - map: "test" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" overridden: before: {} commands: - - vrf definition VRF7 + - vrf definition VRF1 - address-family ipv4 unicast - - bgp next-hop loopback 23 - - import map "import-map1" - - import ipv4 multicast 78 map "import-map" - - import ipv4 unicast 12 map "ran-map" allow-evpn - - export map "testing-map" - - export ipv4 multicast 345 map "test" - - export ipv4 unicast 56 map "test-map" allow-evpn + - inter-as-hybrid csc next-hop 2.3.4.5 + - mdt auto-discovery pim pim-tlv-announce mdt-hello-enable after: - - name: VRF7 + - name: VRF1 address_families: - afi: "ipv4" safi: "unicast" - bgp: - next_hop: - loopback: 23 - export: - ipv4: - multicast: - map: "test" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 56 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map1" - prefix: 78 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" + inter_as_hybrid: + csc: + next_hop: "2.3.4.5" + mdt: + auto_discovery: + pim: + pim_tlv_announce: + mdt_hello_enable: true gathered: after: @@ -184,58 +79,47 @@ gathered: address_families: - afi: "ipv4" safi: "unicast" - bgp: - next_hop: - loopback: 40 - export: - ipv4: - multicast: - map: "single" - prefix: 345 - unicast: - allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" - import_config: - ipv4: - multicast: - map: "import-map" - prefix: 89 - unicast: - allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" + inter_as_hybrid: + next_hop: "1.0.0.0" + mdt: + auto_discovery: + pim: + pim_tlv_announce: + mdt_hello_enable: true + parsed: after: - - name: test - address_families: + - address_families: - afi: "ipv4" - safi: "unicast" bgp: next_hop: - loopback: 40 + loopback: 23 export: ipv4: - multicast: - map: "single" - prefix: 345 unicast: allow_evpn: true - map: "test-map" - prefix: 67 - map: "testing-map" + map: "test" + prefix: 37 + map: "testing-map2" import_config: ipv4: - multicast: - map: "import-map" - prefix: 89 unicast: allow_evpn: true - limit: 12 - map: "ran-map" - map: "import-map" + limit: 56 + map: "import" + inter-as-hybrid: + next_hop: "1.2.3.4" + mdt: + auto_discovery: + pim: + pim_tlv_announce: + mdt_hello_enable: true + receiver_site: true + route_target: + export: "10.12.0.1:20" + import_config: "10.0.0.1:30" + safi: "unicast" + - name: test deleted: before: