Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions dockers/docker-orchagent/ports.json.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{% if PORT %}
{% for port in PORT %}
{% if PORT[port].has_key('speed') %}
{
"PORT_TABLE:{{ port }}": {
"speed": "{{ PORT[port]['speed'] }}",
Expand All @@ -10,7 +9,6 @@
"OP": "SET"
}{% if not loop.last %},{% endif %}

{% endif %}
{% endfor %}
{% endif %}
]
3 changes: 3 additions & 0 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,13 @@ def parse_xml(filename, platform=None, port_config_file=None):
results['VLAN_INTERFACE'] = vlan_intfs
results['PORTCHANNEL_INTERFACE'] = pc_intfs

# TODO: the speed (if exits) in port_config.ini shall align with the speed in minigraph
for port_name in port_speeds:
ports.setdefault(port_name, {})['speed'] = port_speeds[port_name]
for port_name in port_descriptions:
ports.setdefault(port_name, {})['description'] = port_descriptions[port_name]
# if the speed is not defined, the port shall be removed from the ports list
ports = { key: value for key, value in ports.iteritems() if 'speed' in value.keys() }

results['PORT'] = ports
results['PORTCHANNEL'] = pcs
Expand Down