sonic-buildimage/dockers/docker-dhcp-relay/port-name-alias-map.txt.j2
Tamer Ahmed 3a10e9c6fa
[dhcp-relay] Reduce Calls to SONiC Cfggen (#5175)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to one call during startup when starting dhcp-relay
service.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-08-17 15:47:14 -07:00

6 lines
300 B
Django/Jinja

{# Generate port name-alias map for isc-dhcp-relay to parse. Each line contains one #}
{# name-alias pair of the form "<name> <alias>" #}
{% for port, config in PORT.items() %}
{{- port }} {% if "alias" in config %}{{ config["alias"] }}{% else %}{{ port }}{% endif %} {{- "\n" -}}
{% endfor -%}