[SNMP4SDN-11] The result of calling rpc get-edge-list defined in topology.yang is false Created: 26/Oct/15  Updated: 19/Oct/17  Resolved: 23/Feb/16

Status: Resolved
Project: snmp4sdn
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Nanfei Chen Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4526

 Description   

Three switches on which the sub type of PortID is Interface Name are used in my experiment, and the connection between them is as follows:

s1(GE1/0/1)-----(GE1/0/1)s2(GE1/0/2)-----(GE1/0/1)s3

GE1/0/1 is short of GigabitEthernet1/0/1, and GE1/0/2 is short of GigabitEthernet1/0/2.

Currently snmp4sdn can not support PortID sub type of Interface Name. Please see SNMP4SDN-10 to get more details about this.

Firstly, I fix the SNMP4SDN-10 to make snmp4sdn to support PortID sub type of Interface Name by modifing the java file of SNMPHandler.

Secondly, I use command snmp4sdn:readdb to read the device information of s1 and s2, but the device information of s3 is not read. So the device type of s3 in snmp4sdn is PR, not SNMP.

Thirdly, I use command snmp4sdn:topodiscoverswitches to discovery the two switches, and to discovery the topology at the same time.

Lastly, I use rpc get-node-list defined in yang file of topology to get the two switches, and the result is true. The information printed in karaf is as follows:

rpc get-node-list is called, node list:
SNMP|7555994878208
SNMP|7578479100416

7555994878208 is s1, and 7578479100416 is s2. Then I use rpc get-node-connector-list to get all ports and the result is also true. The information printed in karaf is as follows:

rpc get-node-connector-list is called, node connector list:
SNMP|2@SNMP|7555994878208
SNMP|3@SNMP|7555994878208
SNMP|3@SNMP|7578479100416
SNMP|4@SNMP|7578479100416
SNMP|2@SNMP|7578479100416

But When I use rpc get-edge-list to get all edges, the result is false. The information printed in karaf is as follows:

(SNMP|2@SNMP|7555994878208->SNMP|3@SNMP|7578479100416)
(SNMP|3@SNMP|7578479100416->SNMP|2@SNMP|7555994878208)
(SNMP|2@SNMP|7578479100416->SNMP|2@SNMP|7555994878208)

As we know from above, the device type of s3 is PR, not SNMP. So there are two edges from SNMP@SNMP to SNMP@SNMP, and there is still an edge from PR@PR to SNMP@SNMP. Therefore the result of rpc get-edge-list is false.



 Comments   
Comment by Christine Hsieh [ 15/Feb/16 ]

Sorry I missed this bug.

As mentioned in previous comments:

(SNMP|2@SNMP|7555994878208->SNMP|3@SNMP|7578479100416)
(SNMP|3@SNMP|7578479100416->SNMP|2@SNMP|7555994878208)
(SNMP|2@SNMP|7578479100416->SNMP|2@SNMP|7555994878208)
... there are two edges from SNMP@SNMP to SNMP@SNMP, and there is still an edge from PR@PR to SNMP@SNMP...

The result looks three SNMP->SNMP edges, no PR->SNMP edge?
Thanks.

Comment by Nanfei Chen [ 15/Feb/16 ]

Yes, there was not a PR@PR to SNMP@SNMP edge.

I found there was some problems in the method resolvePortPairsAndAddEdges in class DiscoveryService when debugging.

By the way, I have submitted a change for this bug: Change 32929.
https://git.opendaylight.org/gerrit/#/c/32929/

Comment by Christine Hsieh [ 16/Feb/16 ]

See the gerrit patch 32929.
A comment at bottom, https://git.opendaylight.org/gerrit/#/c/32929/.
Thank you.

Comment by Nanfei Chen [ 19/Feb/16 ]

Please see the comment at bottom, https://git.opendaylight.org/gerrit/#/c/32929/.

Thank you.

Comment by Nanfei Chen [ 19/Feb/16 ]

I have amended the change.

https://git.opendaylight.org/gerrit/#/c/32929/

Comment by Christine Hsieh [ 23/Feb/16 ]

Thanks for the patch, merged now.

Generated at Wed Feb 07 20:39:18 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.