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


Flow pushed using config REST API is not reflected via operational REST API

asked 2016-04-26 10:38:48 -0700

ratchagan gravatar image

I pushed a flow using the following REST call, http://localhost:8181/restconf/config...

But the flow is not getting updated in the operational REST call http://localhost:8181/restconf/operat...

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-05-04 11:12:20 -0700

ratchagan gravatar image

Issue Resolved:

When checking the odl controller log,the following error was thrown

2016-04-28 02:41:19,839 | WARN | ult-dispatcher-3 | FlowForwarder | 203 - org.opendaylight.openflowplugin.applications.forwardingrules-manager - 0.1.0.Lithium |* TableID in URI tableId=null and in palyload tableId=0 is not same.*

In the opendaylight controller code

private static boolean tableIdValidationPrecondition (final TableKey tableKey, final Flow flow) { Preconditions.checkNotNull(tableKey, "TableKey can not be null or empty!"); Preconditions.checkNotNull(flow, "Flow can not be null or empty!"); * if (! tableKey.getId().equals(flow.getTableId()))* { LOG.warn("TableID in URI tableId={} and in palyload tableId={} is not same.", flow.getTableId(), tableKey.getId()); return false; } return true; }

Found out, the flow id and the table id had to be same for the flow to be pushed to the switch.

The correct REST call for pushing a flow, is as below


with the required match fields

edit flag offensive delete publish link more


I used the same REST call that you posted, but I received an error saying that the relevant data model content does not exist. This error has persisted with every config Rest api call, as well as most of the operational Rest api calls. I am using mininet with an ODL remote controller, 3 swtch&3host

Zetheroth ( 2017-05-30 11:57:31 -0700 )edit

The mininet command that I use is: "sudo mn --topo linear,3 --mac --controller=remote,ip= --switch ovs,protocols=OpenFlow13"

Zetheroth ( 2017-05-30 11:57:56 -0700 )edit

answered 2016-04-27 00:35:25 -0700

azhark gravatar image

Possible reasons could be:

Switch is not reachable by controller.

Switch does not support the flow-type being pushed

Switch was not reachable when controller tried to push the flow and now there is a mismatch.

-- Remove the flow from the controller and try again.

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

Question Tools

1 follower


Asked: 2016-04-26 10:38:48 -0700

Seen: 525 times

Last updated: May 04 '16