Skip to content

Conversation

@miguecor
Copy link
Collaborator

@miguecor miguecor commented Oct 1, 2025

Related Issue(s)

Fixes #492

Related Collection Role

  • cisco.nac_dc_vxlan.validate
  • cisco.nac_dc_vxlan.dtc.create
  • cisco.nac_dc_vxlan.dtc.deploy
  • cisco.nac_dc_vxlan.dtc.remove
  • other

Related Data Model Element

  • vxlan.fabric
  • vxlan.global
  • vxlan.topology
  • vxlan.underlay
  • vxlan.overlay
  • vxlan.overlay_extensions
  • vxlan.policy
  • vxlan.multisite
  • defaults.vxlan
  • other

Proposed Changes

  • The dhcp_servers list has been expanded to a max of 16 servers instead of 3
  • This list can be used in vxlan.overlay.networks.dhcp_servers and vxlan.mutlisite.overlay.networks.child_fabrics.dhcp_servers

Test Notes

Test was done directly to NDFC controllers. The results were successful for both VXLAN_EVPN and MSD fabrics.

Cisco NDFC Version

  • 3.1
  • 3.2
  • 4.1

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

@miguecor miguecor self-assigned this Oct 1, 2025
@miguecor miguecor requested a review from a team as a code owner October 1, 2025 18:08
@miguecor
Copy link
Collaborator Author

miguecor commented Oct 1, 2025

IMPORTANT

This PR relies on the base module PR#516:
CiscoDevNet/ansible-dcnm#516

The PR expands the capabilities of the base module to add a max of 16 DHCP servers to the VXLAN networks. If PR-516 is not approved, the proposed merges in this branch wont work.

@miguecor miguecor added enhancement New feature or request 0.5.1 Release 0.5.1 labels Oct 2, 2025
@miguecor miguecor requested review from mikewiebe and mtarking October 2, 2025 16:10
@miguecor miguecor added the ready for review PR Ready for Review label Oct 2, 2025
@juburnet juburnet added 0.6.0 Release 0.6.0 and removed 0.5.1 Release 0.5.1 labels Oct 23, 2025
Comment on lines 42 to 52
dhcp_srvr1_vrf: {{ net['dhcp_servers'][0]['vrf'] }}
dhcp_srvr2_ip: {{ net['dhcp_servers'][1]['ip_address'] }}
dhcp_srvr2_vrf: {{ net['dhcp_servers'][1]['vrf'] }}
{% elif net.dhcp_servers | length == 3 %}
{% elif net.dhcp_servers | length >= 3 %}
dhcp_srvr1_ip: {{ net['dhcp_servers'][0]['ip_address'] }}
dhcp_srvr1_vrf: {{ net['dhcp_servers'][0]['vrf'] }}
dhcp_srvr2_ip: {{ net['dhcp_servers'][1]['ip_address'] }}
dhcp_srvr2_vrf: {{ net['dhcp_servers'][1]['vrf'] }}
dhcp_srvr3_ip: {{ net['dhcp_servers'][2]['ip_address'] }}
dhcp_srvr3_vrf: {{ net['dhcp_servers'][2]['vrf'] }}
{% endif %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to remove all these in favor of just the dhcp server list?

cc @mikewiebe

Comment on lines 2 to 14
{# Build dhcpServers as a JSON dict (or empty string) #}
{%- set _dhcp_pairs = [] -%}
{%- if dm is defined and dm['dhcp_servers'] is defined and dm['dhcp_servers'] -%}
{%- for srvr in dm['dhcp_servers'] -%}
{%- if srvr['ip_address'] is defined and srvr['ip_address'] -%}
{%- set _ = _dhcp_pairs.append({
"srvrAddr": srvr['ip_address'], "srvrVrf": srvr['vrf']
}) -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- set _dhcp_obj = {'dhcpServers': _dhcp_pairs} -%}
{%- set dhcpServers = _dhcp_obj if (_dhcp_pairs|length > 0) else '' -%}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same applies to 3.2 and 4.1 template but do we want to merge the MSD VRF and Network updates #625 before merging this as it removes all three of these?

cc @mikewiebe

{# Auto-generated NDFC VXLAN EVPN MSD Child Fabric Network config data structure for fabric {{ fabric_name }} #}
{# Build dhcpServers as a JSON dict (or empty string) #}
{%- set _dhcp_pairs = [] -%}
{%- if dm is defined and dm['dhcp_servers'] is defined and dm['dhcp_servers'] -%}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dm should always be defined, no?

{# Auto-generated NDFC VXLAN EVPN MSD Child Fabric Network config data structure for fabric {{ fabric_name }} #}
{# Build dhcpServers as a JSON dict (or empty string) #}
{%- set _dhcp_pairs = [] -%}
{%- if dm is defined and dm['dhcp_servers'] is defined and dm['dhcp_servers'] -%}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dm['dhcp_servers'] is defined and dm['dhcp_servers'] is a different check than in roles/dtc/common/templates/ndfc_networks/dc_vxlan_fabric/dc_vxlan_fabric_networks.j2. Can we normalize?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.6.0 Release 0.6.0 enhancement New feature or request ready for review PR Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand Number of DHCP Relay Server Support

4 participants