sonic-buildimage/dockers/docker-dhcp-relay/isc-dhcp-relay.j2
Joe LeVeque b8c11bccf2 [DHCP Relay]: Listen on all front panel, VLAN and PortChannel interfaces with IPv4 addresses (#645)
* DHCP relay now listens on all front panel, VLAN and PortChannel interfaces with IPv4 addresses
* Add sample isc-dhcp-relay output file
2017-05-30 18:29:18 -07:00

30 lines
954 B
Django/Jinja

SERVERS="{{ dhcp_servers | join(' ') }}"
INTERFACES="
{%- set add_preceding_space = { 'flag': False } %}
{%- for interface in minigraph_interfaces %}
{%- if interface['addr'] | ipv4 %}
{%- if add_preceding_space.flag %} {% endif %}
{{ interface['attachto'] }}
{%- set _dummy = add_preceding_space.update({'flag': True}) %}
{%- endif %}
{%- endfor %}
{%- for vlan_interface in minigraph_vlan_interfaces %}
{%- if vlan_interface['addr'] | ipv4 %}
{%- if add_preceding_space.flag %} {% endif %}
{{ vlan_interface['attachto'] }}
{%- set _dummy = add_preceding_space.update({'flag': True}) %}
{%- endif %}
{%- endfor %}
{%- for pc_interface in minigraph_portchannel_interfaces %}
{%- if pc_interface['addr'] | ipv4 %}
{%- if add_preceding_space.flag %} {% endif %}
{{ pc_interface['attachto'] }}
{%- set _dummy = add_preceding_space.update({'flag': True}) %}
{%- endif %}
{%- endfor %}"
# '-a' option provides option 82 circuit id information
OPTIONS="-a"