Add hook to allow customizing link cable lengths

Signed-off-by: Wenda Ni <wenni@microsoft.com>
This commit is contained in:
Wenda Ni 2019-03-05 22:06:00 +00:00
parent 66f5202b9f
commit 784bf77a92

View File

@ -29,12 +29,16 @@ def
{# Port configuration to cable length look-up table #} {# Port configuration to cable length look-up table #}
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} {# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
{# Roles described in the minigraph #} {# Roles described in the minigraph #}
{%- set ports2cable = { {%- if defs.ports2cable is defined %}
{%- set ports2cable = defs.ports2cable %}
{%- else %}
{%- set ports2cable = {
'torrouter_server' : '5m', 'torrouter_server' : '5m',
'leafrouter_torrouter' : '40m', 'leafrouter_torrouter' : '40m',
'spinerouter_leafrouter' : '300m' 'spinerouter_leafrouter' : '300m'
} }
-%} -%}
{%- endif %}
{%- macro cable_length(port_name) %} {%- macro cable_length(port_name) %}
{%- set cable_len = [] %} {%- set cable_len = [] %}