87e942343f
* [device/dell] Added dynamic sai.profile generation This commit addds new code for generating dynamic sai.profile file. The sai.profile.j2 will generate the sai.profile dynamically based on the topology. It will generate the sai.profile under /etc/sai.d/ directory in syncd. Before syncd is started this J2 file will be run from the start.sh file from /usr/bin/ directory. Since the sai.profile is dynamically generated the old sai.profile file is not required so deleted the file for S6100. It also address couple of more changes for port_config.ini support is added for speed in the file which can be used later to find the port speed. Also the buffer_default_t*.j2 file the ports should be from 0 to 64 changed. Unit tested the code on S6100 for dynamic generation of sai.profile file for both T0 and T1 and the file was created in /etc/sai.d/sai.profile Similarly tested the sonic binary on S6000 to make sure that the sai.profile is copied from the /usr/share/sonic/hwsku/sai.profile to /etc/sai.d/sai.profile. Signed-off-by: Harish Venkatraman <Harish_Venkatraman@dell.com> * [sonic-buildimage] Updating module sai-redis Updating the sonic-sairedis point. Signed-off-by: Harish Venkatraman <Harish_Venkatraman@dell.com>
14 lines
662 B
Django/Jinja
14 lines
662 B
Django/Jinja
{# Get sai.profile based on switch_role #}
|
|
{%- if DEVICE_METADATA is defined -%}
|
|
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
|
|
{%- if switch_role.lower() == 'torrouter' %}
|
|
{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G-t0.config.bcm' -%}
|
|
{%- else %}
|
|
{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G-t1.config.bcm' -%}
|
|
{%- endif %}
|
|
{%- else %}
|
|
{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G-t1.config.bcm' -%}
|
|
{%- endif %}
|
|
{# Write the contents of sai_ profile_filename to sai.profile file #}
|
|
{{ sai_profile_contents }}
|