[minigraph]: Do not fail for minigraphs which do not have neighbors listed in <Devices> section (#2522)
Signed-off-by: Nadiya.Stetskovych <nstetskovych@barefootnetworks.com>
This commit is contained in:
parent
1cc6afc9a9
commit
bb5a171ffc
@ -40,7 +40,7 @@ def
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
|
Loading…
Reference in New Issue
Block a user