Add support for IPv6 redistribute route-map when creating a vrf #492
+37
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the dcnm_vrf module doesn't support the non-default Route Map to be specified for IPv6 redistribution.
The module uses the same API endpoint as the GUI so it seems that the support can quite easily be introduced.
I introduced a new parameter and named it v6_redist_direct_rmap to control the name of IPv6 route map used for redistribution.
In case the name is not specified, a default value would still be used.
The requirement to support v6 route-map in vxlan-as-code came from one of the Customers under:
netascode/ansible-dc-vxlan#540
Yet in order to introduce the functionality, the dcnm_vrf module should be extended first.
If required, please let me know and I'll update the name used for the parameter
I used the following task to test the creation (state: merged) and removal (state: deleted) of the vrf.
Tried with both non-default RM name, as well as without specifying the name - to confirm that the default works ok:
hosts: MSD_CALO
any_errors_fatal: true
gather_facts: no
collections:
tasks:
cisco.dcnm.dcnm_vrf:
fabric: "MSD_CALO"
state: merged
config:
vrf_id: 9008011
vrf_template: Default_VRF_Universal
vrf_extension_template: Default_VRF_Extension_Universal
vlan_id: 2001
redist_direct_rmap: MKILAR_V4_MAP
v6_redist_direct_rmap: MKILAR_V6_MAP
vrf_id: 9008012
vrf_template: Default_VRF_Universal
vrf_extension_template: Default_VRF_Extension_Universal
vlan_id: 2002