957e6c0b6d
Current lldp.conf.j2 template demands the presence of MGMT_INTERFACE attribute in configDB, and by extension, also in config_db.json file. However, MGMT_INTERFACE configuration attribute is optional, so lldp shouldn't bail out if this one isn't provided in configuration. For this reason, no lldp.conf file is ever created in lldp's container, and lldpd defaults to advertise the mac-address of the connected interface, instead of the interface name. The fix is to simply relax this jinja2 statement to verify if MGMT_INTERFACE attribute is present.
7 lines
355 B
Django/Jinja
7 lines
355 B
Django/Jinja
{% if MGMT_INTERFACE %}
|
|
configure ports eth0 lldp portidsubtype local {{ MGMT_INTERFACE.keys()[0][0] }}
|
|
{% endif %}
|
|
{% for local_port in DEVICE_NEIGHBOR %}
|
|
configure ports {{ local_port }} lldp portidsubtype local {{ PORT[local_port]['alias'] }} description {{ DEVICE_NEIGHBOR[local_port]['name'] }}:{{ DEVICE_NEIGHBOR[local_port]['port'] }}
|
|
{% endfor %}
|