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

How to get the links and nodes from Md sal

asked 2016-06-19 06:50:20 -0700

knv gravatar image

I am following the link http://sdntutorials.com/how-to-look-u... but not able to understand if onSessionInitiated should be called explicitly or not . Clearly apeaking I have made a class as given in the above link in a package and able to create its instance in a different class in the same package , but now nothing is happening , no nodes or links of mininet are displayed , so I have dowbt on how onSessionInitiated works and what is providercontext class and is there a simple way to get or call the function getsalservice();

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-06-20 00:20:24 -0700

karthik330 gravatar image

Hi , First go through the Hello Sample Project Read it thoroughly ! . Then you will come to from where the applications starts and so on. hints - #createInstance() , OnSessionInitiate(), RPC Implementation ,yang etc. Coming to your question ..You dont need to cal OnSessionInitiate method explicitly. Actually application starts from createInstance method . CreateInstance .Check this Link, there they will instantiate the HelloProvider Class. So If you create any new class , you can instantiate it inside this method and start calling the function whatever you defined.

Check this link how they are getting link details from data store.In this class only see List<link> getLinksFromTopology() method otherwise you will get confused ... GetLinkDetails in that function you could see the line which i mentioned below List<link> links = topology.getLink(); this will return Link details . And for node you change it into getNode().I believe it should also work. If you still confused ...plz let me know . I will only send the relevant code'

Thanks,

-Karthik

edit flag offensive delete publish link more

Comments

Thank you karthik I am able to retrieve the links using GetLinkDetails link that you have shared .

knv ( 2016-06-20 07:03:56 -0700 )edit
Login/Signup to Answer

Stats

Asked: 2016-06-19 06:50:20 -0700

Seen: 42 times

Last updated: Jun 20 '16