72e947621c
The current DEVICE_NEIGHBOR format doesn't support multiple different ports connecting with same neighbor. Thus the lldpd.conf file is not generated correctly, causing missing information for LAG members. This fix reverts the data structure in the previous version of minigraph parser - using local port as the key and remote port/device as the value of the map. Sample format is: DEVICE_NEIGHBOR['Ethernet124'] = { 'name': 'ARISTA04T1', 'port': 'Ethernet1/1' } The corresponding unit test in test_cfggen is updated. Add one more unit test for lldpd.conf.j2 verification. Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
4 lines
239 B
Django/Jinja
4 lines
239 B
Django/Jinja
{% 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 %}
|