Skip to content

Commit

Permalink
Fix StartPort name in test case
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
  • Loading branch information
qiluo-msft committed Apr 12, 2018
1 parent 8e0e2d6 commit 3ebedde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ def parse_png(png, hname):
bandwidth = bandwidth_node.text if bandwidth_node is not None else None

if enddevice == hname:
if bandwidth:
port_speeds[endport] = bandwidth
if port_alias_map.has_key(endport):
endport = port_alias_map[endport]
neighbors[endport] = {'name': startdevice, 'port': startport}
else:
if bandwidth:
port_speeds[startport] = bandwidth
port_speeds[endport] = bandwidth
else:
if port_alias_map.has_key(startport):
startport = port_alias_map[startport]
neighbors[startport] = {'name': enddevice, 'port': endport}
if bandwidth:
port_speeds[startport] = bandwidth

if child.tag == str(QName(ns, "Devices")):
for device in child.findall(str(QName(ns, "Device"))):
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-config-engine/tests/simple-sample-graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<EndPort>et1</EndPort>
<FlowControl>true</FlowControl>
<StartDevice>switch-t0</StartDevice>
<StartPort>Ethernet8</StartPort>
<StartPort>fortyGigE0/8</StartPort>
<Validate>true</Validate>
</DeviceLinkBase>
</DeviceInterfaceLinks>
Expand Down

0 comments on commit 3ebedde

Please sign in to comment.