Skip to content

Commit

Permalink
In genertating qos.json, include -y /etc/sonic/sonic_version.yml to (s…
Browse files Browse the repository at this point in the history
…onic-net#315)

obtain the asic_type info

Signed-off-by: Wenda Ni <[email protected]>
  • Loading branch information
wendani authored and lguohan committed Sep 13, 2018
1 parent 3ed68a3 commit 53c0007
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,9 @@ def reload():
run_command(command, display_cmd=True)

qos_template_file = os.path.join('/usr/share/sonic/device/', platform, hwsku, 'qos.json.j2')
sonic_version_file = os.path.join('/etc/sonic/', 'sonic_version.yml')
if os.path.isfile(qos_template_file):
command = "{} -m -t {} >/tmp/qos.json".format(SONIC_CFGGEN_PATH, qos_template_file)
command = "{} -m -t {} -y {} >/tmp/qos.json".format(SONIC_CFGGEN_PATH, qos_template_file, sonic_version_file)
run_command(command, display_cmd=True)

# Apply the configurations only when both buffer and qos configuration files are presented
Expand Down

0 comments on commit 53c0007

Please sign in to comment.