Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

get topology result using opendaylight api/mininet api

asked 2016-05-19 00:17:50 -0800

luis999 gravatar image

updated 2016-05-19 18:05:19 -0800

hi,

i have create a custom topology in mininet and have install opendaylight(lithium). on my opendaylight, i have install 'old-dlux-all' and 'odl-l2switch-switch-ui'. i have to establish a flow between A and E

image description


i am trying to create a webpage that able do network fail recovery, i am able to create flow using webpage. when i down one of the connection(A - B) in the mininet.

i try to use " http://192.168.7.146:8181/restconf/op... " to view topology. i check the link and i notice there is change in destination node, i don't understand the change mean.


Before adding flow image description


Afteradding flow image description

my question is

1)is there a api on opendaylight or minient that able to view which connection is up?

2)is there a api on opendaylight or minient that able to test connection ?

many thanks in advance. :)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-05-19 02:24:35 -0800

karthik330 gravatar image

updated 2016-05-19 23:25:12 -0800

Hi , To see the current topology details you can see the link which you mentioned already. It will give you the Node and Link details(Topology details).If you down/up any link connections ,It will be updated here also .

Updated :

  1. I am not sure about existing api. You could do one thing. Go through L2->Loopremover->topologyLinkDatachangeHandler.java .There they will detect the link down/up event.So you have data which you need.Just expose your own api inside l2->loopremover , and use it!

You can also capture the link down/up data from topology details .Understand the data inside the topology(link id, source , sourceTP, destination, destinationTp ,etc).My suggestion is dont use A,B,C name for switch .make it openflow:1 ,openflow:2 So that you will understand the topology details easily.

Note: ODL we are using undirected Graph.

Just ex:

openflow:1--(port 2)--------------------------(Link)-----------------(port 1)--openflow:2

Since it is undirected graph this link name(Link ID) could be either openflow:1:2 or openflow:2:1 .This Link ID is what you are looking. when you down the link(A-B) ,this link (link ID) will be deleted from the topology details.

  1. For testing connecton , try ping between the devices.Since you pushed your flow, and doing link down it won't be reachable as expected.
edit flag offensive delete publish link more

Comments

hi, i notice there is change in destination node but i don't understand the change mean.i have update my post with more detail.

luis999 ( 2016-05-19 18:07:30 -0800 )edit

plz have a luk into my updated answer

karthik330 ( 2016-05-19 23:25:56 -0800 )edit

first solution: I cant find topologyLinkDatachangeHandler.java and how to setup environment to code opendaylight? i try to use eclipse but can't access to JAR file(encrypted). can i access l2switch feature without enable l2switch feature because my current opendaylight did't have l2switch enabled ?

luis999 ( 2016-05-22 16:19:36 -0800 )edit

https://github.com/opendaylight/l2switch/blob/stable/beryllium/loopremover/implementation/src/main/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandler.java

karthik330 ( 2016-05-23 00:05:43 -0800 )edit

For environment : Im using InteliJ IDE,simply i clone the code from Github and import it in my IDE which is so easy. In this IDE you could see(decrypt) jar file but cant edit. You need to install l2switch feature to acheive l2switch's functionalities

karthik330 ( 2016-05-23 00:10:22 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-05-19 00:17:50 -0800

Seen: 182 times

Last updated: May 19 '16