Skip to content

Commit 9028550

Browse files
NStetskovych-zztiantianlv
authored andcommitted
[minigraph]: Do not fail for minigraphs which do not have neighbors listed in <Devices> section (sonic-net#2522)
Signed-off-by: Nadiya.Stetskovych <[email protected]>
1 parent 26b678f commit 9028550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

files/build_templates/buffers_config.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def
4444
{%- set cable_len = [] %}
4545
{%- for local_port in DEVICE_NEIGHBOR %}
4646
{%- if local_port == port_name %}
47-
{%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
47+
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
4848
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
4949
{%- set neighbor_role = neighbor.type %}
5050
{%- set roles1 = switch_role + '_' + neighbor_role %}

0 commit comments

Comments
 (0)