274d320443
Add support in dhcp_relay container for dhcp_server_ipv4 feature. HLD: sonic-net/SONiC#1282
26 lines
993 B
Django/Jinja
26 lines
993 B
Django/Jinja
[group:dhcp-relay]
|
|
programs=
|
|
{%- set relay_for_ipv6 = { 'flag': False } %}
|
|
{%- set add_preceding_comma = { 'flag': False } %}
|
|
{% if dhcp_server_ipv4_enabled %}
|
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
|
dhcprelayd
|
|
{%- endif %}
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
|
{# Append DHCPv4 agents #}
|
|
{% if not dhcp_server_ipv4_enabled and VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
|
{% if add_preceding_comma.flag %},{% endif %}
|
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
|
isc-dhcpv4-relay-{{ vlan_name }}
|
|
{%- endif %}
|
|
{% 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}) %}
|
|
{%- endif %}
|
|
{% endfor %}
|
|
{# Append DHCPv6 agents #}
|
|
{% if relay_for_ipv6.flag %}
|
|
{% if add_preceding_comma.flag %},{% endif %}
|
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
|
dhcp6relay
|
|
{% endif %}
|