-
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
Open
miguecor
wants to merge
9
commits into
netascode:develop
Choose a base branch
from
miguecor:add_dhcp_servers_list
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ea7187f
Expand dhcp_servers to 16
6452c1f
Merge branch 'develop' into add_dhcp_servers_list
c1961f2
Fix issue 492 - Add dhcp_servers list
49ceaaa
Merge branch 'develop' into add_dhcp_servers_list
e574d0f
Merge branch 'develop' into add_dhcp_servers_list
496e73b
Remove dependency on dhcp_srvrX_ip and dhcp_srvrX_vrf
ed1155e
Merge branch 'develop' into add_dhcp_servers_list
db5528f
Normalized jinja template logic for dhcp_servers definition
7469920
Merge branch 'develop' into add_dhcp_servers_list
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,17 @@ | ||
| {# 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'] -%} | ||
|
||
| {%- 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 '' -%} | ||
| { | ||
| "fabric": "{{ fabric_name }}", | ||
| "networkName": "{{ network_name }}", | ||
|
|
@@ -24,12 +37,7 @@ | |
| "secondaryGW3": ndfc.secondaryGW3, | ||
| "secondaryGW4": ndfc.secondaryGW4, | ||
| "loopbackId": dm.dhcp_loopback_id | default(ndfc.loopbackId), | ||
| "dhcpServerAddr1": dm['dhcp_servers'][0]['ip_address'] if dm['dhcp_servers'][0]['ip_address'] is defined else "", | ||
| "vrfDhcp": dm['dhcp_servers'][0]['vrf'] if dm['dhcp_servers'][0]['ip_address'] is defined else ndfc.vrfDhcp, | ||
| "dhcpServerAddr2": dm['dhcp_servers'][1]['ip_address'] if dm['dhcp_servers'][1]['ip_address'] is defined else ndfc.dhcpServerAddr2, | ||
| "vrfDhcp2": dm['dhcp_servers'][1]['vrf'] if dm['dhcp_servers'][1]['ip_address'] is defined else "", | ||
| "dhcpServerAddr3": dm['dhcp_servers'][2]['ip_address'] if dm['dhcp_servers'][2]['ip_address'] is defined else ndfc.dhcpServerAddr3, | ||
| "vrfDhcp3": dm['dhcp_servers'][2]['vrf'] if dm['dhcp_servers'][2]['vrf'] is defined else "", | ||
| "dhcpServers": dhcpServers, | ||
| "ENABLE_NETFLOW": dm.netflow_enable if dm.netflow_enable is defined else ndfc.ENABLE_NETFLOW, | ||
| "SVI_NETFLOW_MONITOR": ndfc.SVI_NETFLOW_MONITOR, | ||
| "VLAN_NETFLOW_MONITOR": dm.vlan_netflow_monitor if (dm.netflow_enable is defined and dm.netflow_enable) else ndfc.VLAN_NETFLOW_MONITOR, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
dmshould always be defined, no?