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]

OK So I found a way to do this in Carbon MDSAL. Here's what I did:

In my DataTreeChangeListner<flowcapablenode>

       public class WakeupOnFlowCapableNode implements DataTreeChangeListener<FlowCapableNode> {
           ......
           @Override
      public void onDataTreeChanged(Collection<DataTreeModification<FlowCapableNode>> modifications) {

               .......

    for (DataTreeModification<FlowCapableNode> modification : modifications) {


               if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {

                           InstanceIdentifier<FlowCapableNode> ii = modification.getRootPath().getRootIdentifier();

            String nodeUri = ii.firstKeyOf(Node.class).getId().getValue();

                            // Now put the nodeUri into a map 
                            idMap.put(nodeUri, ii)

                       ........

In my PacketIn listener I have

                   @Override
public void onPacketReceived(PacketReceived notification) {
    LOG.info("onPacketReceived");
    NodeConnectorId nodeConnectorId = notification.getMatch().getInPort();
    // Get the node connector URI for the inbound packet.
    String nodeConnectorUri = nodeConnectorId.getValue();

The latter returns something like

             "openflow:1:1"

I can strip off the last :1 and use the prefix to lookup the map entry in the DataTreeChangedListner.

Now I need to understand openflow URIs. What does openflow:1:1 mean?