From ae69fdf312be87be7cd8d86be8f4990930855990 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Thu, 12 Nov 2020 09:03:59 -0800 Subject: [PATCH] [buffers_config.j2]: Use correct cable lengths for backend devices (#5905) * Remove 'backend' from device type strings so that backend devices ('BackEndToRRouter' and 'BackEndLeafRouter') are given the same cable lengths as regular device types. Signed-off-by: Lawrence Lee --- files/build_templates/buffers_config.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index f5dbb9784f..c741c6ea36 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -57,6 +57,8 @@ def {%- set roles2 = neighbor_role + '_' + switch_role %} {%- set roles1 = roles1 | lower %} {%- set roles2 = roles2 | lower %} + {%- set roles1 = roles1.replace('backend', '') %} + {%- set roles2 = roles2.replace('backend', '') %} {%- endif %} {%- if roles1 in ports2cable %} {%- if cable_len.append(ports2cable[roles1]) %}{% endif %} @@ -74,6 +76,7 @@ def {%- if local_port[1] == port_name %} {%- set roles3 = switch_role + '_' + 'server' %} {%- set roles3 = roles3 | lower %} + {%- set roles3 = roles3.replace('backend', '') %} {%- if roles3 in ports2cable %} {%- if cable_len.append(ports2cable[roles3]) %}{% endif %} {%- endif %}