[ONOS-7993] fix little bugs about finding line-side port's SIP.

Change-Id: I392bdd5f23172cc53534374a3f867cba0b8f66bc
This commit is contained in:
Boyuan Yan 2019-06-13 17:04:49 -07:00
parent 8f9f6adbbb
commit 82ffc857f5

View File

@ -90,6 +90,7 @@ def is_transponder_node(node):
# #
# Parse src and dst sip-uuids of specific link from topo. # Parse src and dst sip-uuids of specific link from topo.
# The ports should be line side but not client side.
# #
def parse_src_dst(topo, link_index=-1): def parse_src_dst(topo, link_index=-1):
if link_index == -1: if link_index == -1:
@ -118,7 +119,8 @@ def parse_src_dst(topo, link_index=-1):
if cep[0]["parent-node-edge-point"]["node-uuid"] != node["uuid"] and is_transponder_node(node): if cep[0]["parent-node-edge-point"]["node-uuid"] != node["uuid"] and is_transponder_node(node):
# If this node is not the node that includes src_onep, and not a OLS node # If this node is not the node that includes src_onep, and not a OLS node
for onep in node["owned-node-edge-point"]: for onep in node["owned-node-edge-point"]:
if parse_value(onep["name"])["odtn-connection-id"] == conn_id: if parse_value(onep["name"])["odtn-connection-id"] == conn_id\
and parse_value(onep["name"])["odtn-port-type"] == "line":
dst_onep = onep dst_onep = onep
break break
if dst_onep is not None: if dst_onep is not None: