Skip to content

Commit

Permalink
[buffers_config.j2]: Use correct cable lengths for backend devices (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
theasianpianist authored and abdosi committed Nov 14, 2020
1 parent cb32b36 commit 2aa827f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/build_templates/buffers_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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 %}
Expand Down

0 comments on commit 2aa827f

Please sign in to comment.