Bug 998 - Fix for update flow process
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / OFRpcTaskFactory.java
index 2d2067984d8d82b69d12d0236632f919a3b8a99a..09281355a8070489f6ad1893a87927e44a4e46ee 100644 (file)
@@ -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());