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


How to Write own REST API

asked 2015-02-03 05:59:10 -0700

anonymous user


Hello, I want to access packet count hitting controller. I am able to retrieve same by writing a module in opendaylight controller. Now I want to access packet count using REST calls. I don't know how to expose these services to SAL. Basically, how should I proceed with writing own REST API? Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-06-25 19:32:03 -0700

jeffcavalcante gravatar image

In MD-SAL, you create a YANG model with the data you want to expose and it will be available for REST calls, then set up your features plugin to install the feature through karaf.

Check this example on how to generate a simple set of modules, including a model and a provider:

Hope I've helped.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-02-03 05:59:10 -0700

Seen: 103 times

Last updated: Jun 25 '15