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

Revision history [back]

click to hide/show revision 1
initial version

In OSGi, every import-package must have a corresponding matching export-package from a bundle that wishes to export a service. In this case, you are trying to have your dependency directly on org.opendaylight.controller.protocolplugin.openflow.core and hence importing this package with the hope to use the IController service.

But, the protocolplugin.openflow bundle doesn't "export" this service via its "export-package". This is because, according the OpenDaylight design, all the south-bound plugins are supposed to be exposed only through the SAL layer. And hence, an application should ideally not be directly dependent on the southbound plugin. Rather, you must look for a SAL service that will satisfy your needs.

If you still want your application to talk only with Openflow plugin (in this case to parse an OpenFlow message directly), then you have other options such as writing your bundle as an OSGi fragment. But that gets into an use-case specific mode and we would need more info to get you to the right place.

In any case, the general rule of thumb is to not depend directly on the south-bound plugin as much as possible and always look for a corresponding "export-package" to make sure the dependent services are being exported.