Skip to content

Commit 0b13c45

Browse files
wendaniyxieca
authored andcommitted
Add hook to allow customizing link cable lengths
Signed-off-by: Wenda Ni <[email protected]>
1 parent deab95c commit 0b13c45

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

files/build_templates/buffers_config.j2

+10-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ def
2929
{# Port configuration to cable length look-up table #}
3030
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
3131
{# Roles described in the minigraph #}
32-
{%- set ports2cable = {
33-
'torrouter_server' : '5m',
34-
'leafrouter_torrouter' : '40m',
35-
'spinerouter_leafrouter' : '300m'
36-
}
37-
-%}
32+
{%- if defs.ports2cable is defined %}
33+
{%- set ports2cable = defs.ports2cable %}
34+
{%- else %}
35+
{%- set ports2cable = {
36+
'torrouter_server' : '5m',
37+
'leafrouter_torrouter' : '40m',
38+
'spinerouter_leafrouter' : '300m'
39+
}
40+
-%}
41+
{%- endif %}
3842

3943
{%- macro cable_length(port_name) %}
4044
{%- set cable_len = [] %}

0 commit comments

Comments
 (0)