From bd9c28aad0cc1952dde1fedc4f170dd805462600 Mon Sep 17 00:00:00 2001 From: bingwang Date: Thu, 28 Apr 2022 14:11:00 +0000 Subject: [PATCH] Fix j2 template Signed-off-by: bingwang --- files/build_templates/buffers_config.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index a8f8192c98d3..ee96ac179c13 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -130,11 +130,11 @@ def {%- set port_names_list_extra_queues = [] %} {%- for port in PORT_ACTIVE %} - {% if (defs.generate_queue_buffers_with_extra_lossless_queues is defined or defs.generate_queue_buffers_with_extra_lossless_queues_with_inactive_ports is defined) and + {%- if (defs.generate_queue_buffers_with_extra_lossless_queues is defined or defs.generate_queue_buffers_with_extra_lossless_queues_with_inactive_ports is defined) and (('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'ToRRouter') or ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'LeafRouter')) %} {%- if port_names_list_extra_queues.append(port) %}{%- endif %} - {% endif %} + {%- endif %} {%- endfor %} {%- set port_names_extra_queues = port_names_list_extra_queues | join(',') %}