diff --git a/dockers/docker-orchagent/ports.json.j2 b/dockers/docker-orchagent/ports.json.j2 index 48be831025..3b32250915 100644 --- a/dockers/docker-orchagent/ports.json.j2 +++ b/dockers/docker-orchagent/ports.json.j2 @@ -1,13 +1,14 @@ [ {% if PORT %} +{% set ns = {'firstPrinted': False} %} {% for port in PORT %} {% if PORT[port].has_key('speed') %} - { + {% if ns.firstPrinted %},{% endif %}{ "PORT_TABLE:{{ port }}": { "speed": "{{ PORT[port]['speed'] }}" }, "OP": "SET" - }{% if not loop.last %},{% endif %} + }{% if ns.update({'firstPrinted': True}) %} {% endif %} {% endif %} {% endfor %}