Opendaylight plugin send packet from given switch and given port

asked 2015-05-27 06:03:47 -0700

cpetroaca gravatar image


I am running a plugin in the Opendaylight controller’s Karaf OSGI environment. I need to be able to send packets from a given switch and a given port. I need to give this command programmatically from my plugin.

I looked at the code in the openflowplugin project, more specifically in the lldp-speaker project. I think I understand what is needed for this up to a point. I see that there is a PacketProcessingService which is registered as an RPC Service and this is implemented by ModelDrivenSwitchImpl and that ultimately uses a ConnectionAdapter for a given switch to send the packets. But it’s not clear how I can access that ConnectionAdapter from my plugin environment, from onSessionIntialized(ConsumerContext session).

I also tried to install the odl-openflowplugin-all bundles into Karaf with the hope that the PacketProcessingService would be installed as an Rpc Service and I could get it with session.getRpcService(PacketProcessingService.class) but when I try to use the reference and call transmitPacket() I get a "IllegalStateException: No default provider is available" meaning I assume that no implementation of the service exists.

What am I missing?

Thanks, Cristian

edit retag flag offensive close merge delete