How MD-SAL Identifies Southbound Plugin For Flow Provisioning

When I started writing a southbound plugin for one of the netconf device that I am working on, one of my very first question was how will MD-SAL know that it has to route the request received from flow provisioning app to my plugin. I obviously dug a little further and here is what I figured out.

If we look at the OpenDaylight controller architecture given below, we can figure out that service abstraction layer or MD-SAL is talking to southbound plugins of different types. Now if from Management GUI, I create a request to provision a flow, service abstraction layer has the capability to identify to which southbound plugin it has to route this flow provisioning request. Now the question is how? Let’s read further.

opendaylight controller architecture

First, we need to understand different RPC Service Types, that MD-SAL supports. For a southbound plugin, we use Routed Service.

Second, we need to understand that SalFlowService is a RpcService that provides APIs to add, delete and update flows.

Third, BindingAwareBroker provides an interface RoutedRpcRegistration that provides API to register particular instance identifier to be processed by a given RpcService.

Now, when I write my southbound plugin,

  • I have to extend SalFlowService to provide an implementation of addFlow, removeFlow and updateFlow. Let’s say “NetconfPluginProvider” is my bundle activator which also extends SalFlowService.
  • I have to register NetconfPluginProvider as an RpcService as below:

  • Note that we have used addRoutedRpcImplementation method here.
  • For flow service, MD-SAL identifies the southbound plugin using node. So my southbound plugin need to tell RoutedRpcRegistration for flow service , that hey fella, you have to come to me whenever you receives a flow provisioning request on this particular node. To do this, I first have to create an instance identifier with my node id as below:

  •  
  • Then I register this instance identifier with the RoutedRpcRegistration for flow service as below:

  •  
  • So whenever I connect to a new device using my southbound plugin, I create an instance identifier and register it with flow registration.
  • Now, whenever MD-SAL gets a flow provisioning request on “node_001″, it routes it to my southbound plugin.

For further reference, browse AbstractModelDrivenSwitch.java’s register method in openflow plugin project. Or leave a comment here, I will be glad to answer :)

Comments

  1. Prasana says

    Hello,
    Can you please be more elaborate on the above steps. For example, I want to use Netconf plugin to configure flows on a NE which has Netconf server running.

    Thanks for your time.

    Regards,
    Prasana

  2. vikram says

    Hi

    I am new to open daylight, and want to understand what exactly a plugin is

    is RpcService a plugin?

    is SAL service(ex: NotificationServiceProvider) a plugin?

    wanted to develop a protocol plugin to talk to device, say using CLI, what are the programmatic steps to follow

  3. Kavita says

    Hello

    I am also new to the ODL and am trying to develop a OSGi app. in this app, I am planning to send a packet-out message to the switch. Do you have any example for this?

    Thanks

    Kavita

Leave a Reply

Your email address will not be published. Required fields are marked *