d0f16c0d79
Treat devices that are ToRRouters (ToRRouters and BackEndToRRouters) the same when rendering templates Except for BackEndToRRouters belonging to a storage cluster, since these devices have extra sub-interfaces created Treat devices that are LeafRouters (LeafRouters and BackEndLeafRouters) the same when rendering templates Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
15 lines
734 B
Django/Jinja
15 lines
734 B
Django/Jinja
{# Get sai.profile based on switch_role #}
|
|
{%- if DEVICE_METADATA is defined -%}
|
|
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
|
|
{%- if 'torrouter' in switch_role.lower() %}
|
|
{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-z9264f-64x40G-t0.config.bcm' -%}
|
|
{%- else %}
|
|
{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-z9264f-64x40G-t1.config.bcm' -%}
|
|
{%- endif %}
|
|
{%- else %}
|
|
{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-z9264f-64x40G-t1.config.bcm' -%}
|
|
{%- endif %}
|
|
{# Write the contents of sai_ profile_filename to sai.profile file #}
|
|
{{ sai_profile_contents }}
|
|
SAI_NUM_ECMP_MEMBERS=64
|