2018-05-07 13:02:30 -05:00
|
|
|
{# Get sai.profile based on switch_role #}
|
|
|
|
{%- if DEVICE_METADATA is defined -%}
|
|
|
|
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
|
|
|
|
{%- if switch_role.lower() == 'torrouter' %}
|
2018-06-28 18:50:14 -05:00
|
|
|
{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th-a7060-cx32s-32x40G-t0.config.bcm' -%}
|
2018-05-07 13:02:30 -05:00
|
|
|
{%- else %}
|
2018-06-28 18:50:14 -05:00
|
|
|
{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th-a7060-cx32s-32x40G-t1.config.bcm' -%}
|
2018-05-07 13:02:30 -05:00
|
|
|
{%- endif %}
|
|
|
|
{%- else %}
|
2018-06-28 18:50:14 -05:00
|
|
|
{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th-a7060-cx32s-32x40G-t1.config.bcm' -%}
|
2018-05-07 13:02:30 -05:00
|
|
|
{%- endif %}
|
|
|
|
{# Write the contents of sai_ profile_filename to sai.profile file #}
|
|
|
|
{{ sai_profile_contents }}
|