-
Notifications
You must be signed in to change notification settings - Fork 25
Add dhcp servers list #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Merge develop to add_dhcp_servers_list
Merge latest develop with add_dhcp_servers_list
IMPORTANTThis PR relies on the base module PR#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. |
| 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 %} |
There was a problem hiding this comment.
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
| {# 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 '' -%} |
There was a problem hiding this comment.
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
Merge branch 'develop' inot add_dhcp_servers_list
| {# 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'] -%} |
There was a problem hiding this comment.
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'] -%} |
There was a problem hiding this comment.
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?
Merge branch 'develp' into 'add_dhcp_servers_list'
Related Issue(s)
Fixes #492
Related Collection Role
Related Data Model Element
Proposed Changes
Test Notes
Test was done directly to NDFC controllers. The results were successful for both VXLAN_EVPN and MSD fabrics.
Cisco NDFC Version
Checklist