From: Vaclav Demcak Date: Tue, 13 May 2014 16:28:15 +0000 (+0200) Subject: Bug 998 - Fix for update flow process X-Git-Tag: release/helium~189 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=1259d400337d99ff4265c80c1cb2903477ce21a4;p=openflowplugin.git Bug 998 - Fix for update flow process - change FlowAddBuilder to FlowUpdateBuilder for update process Change-Id: I727ae03332bee6079b7927e98660b45e9dc537ef Signed-off-by: Vaclav Demcak --- diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java index 2d2067984d..09281355a8 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java @@ -15,6 +15,7 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.FlowConver import org.opendaylight.openflowplugin.openflow.md.core.session.TransactionKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAddedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdatedBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103.TransactionId; @@ -92,10 +93,10 @@ public abstract class OFRpcTaskFactory { ofFlowModInput.setXid(xId); if (null != getRpcNotificationProviderService()) { - FlowAddedBuilder newFlow = new FlowAddedBuilder(getInput().getUpdatedFlow()); - newFlow.setTransactionId(new TransactionId(BigInteger.valueOf(xId.intValue()))); - newFlow.setFlowRef(getInput().getFlowRef()); - getRpcNotificationProviderService().publish(newFlow.build()); + FlowUpdatedBuilder updFlow = new FlowUpdatedBuilder(getInput().getUpdatedFlow()); + updFlow.setTransactionId(new TransactionId(BigInteger.valueOf(xId.intValue()))); + updFlow.setFlowRef(getInput().getFlowRef()); + getRpcNotificationProviderService().publish(updFlow.build()); } getSession().getbulkTransactionCache().put(new TransactionKey(xId), getInput());