[dhcp_relay] Optimize j2 file in dhcp_relay container (#17506)

This commit is contained in:
Yaqiang Zhu 2023-12-15 18:47:40 -05:00 committed by GitHub
parent 69ad1ed41a
commit 728df4e89d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,7 @@
[group:dhcp-relay]
programs=dhcprelayd,
programs=dhcprelayd
{%- set relay_for_ipv6 = { 'flag': False } %}
{%- set add_preceding_comma = { 'flag': False } %}
{% if dhcp_server_ipv4_enabled %}
{%- endif %}
{%- set add_preceding_comma = { 'flag': True } %}
{% for vlan_name in VLAN_INTERFACE %}
{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %}
{% set _dummy = relay_for_ipv6.update({'flag': True}) %}