ELAN FT Support for BE
[vpnservice.git] / mdsalutil / mdsalutil-api / src / main / java / org / opendaylight / vpnservice / mdsalutil / interfaces / IMdsalApiManager.java
index 697946facb517f01bd88531f6901daa673655198..3535c435e9c0297c2fde7e5fe7006efecfc88739 100644 (file)
@@ -1,14 +1,36 @@
+/*
+ * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.vpnservice.mdsalutil.interfaces;
 
+import java.math.BigInteger;
 import java.util.List;
+
+import com.google.common.util.concurrent.CheckedFuture;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.vpnservice.mdsalutil.ActionInfo;
 import org.opendaylight.vpnservice.mdsalutil.FlowEntity;
 import org.opendaylight.vpnservice.mdsalutil.GroupEntity;
+import org.opendaylight.vpnservice.mdsalutil.*;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 
 public interface IMdsalApiManager {
 
     public void installFlow(FlowEntity flowEntity);
 
+    public CheckedFuture<Void,TransactionCommitFailedException> installFlow(BigInteger dpId, Flow flowEntity);
+
+    public CheckedFuture<Void,TransactionCommitFailedException> removeFlow(BigInteger dpId, Flow flowEntity);
+
+    public CheckedFuture<Void,TransactionCommitFailedException> removeFlow(BigInteger dpId, FlowEntity flowEntity);
+
+    public CheckedFuture<Void,TransactionCommitFailedException> installFlow(BigInteger dpId, FlowEntity flowEntity);
+
     public void removeFlow(FlowEntity flowEntity);
 
     public void installGroup(GroupEntity groupEntity);
@@ -17,12 +39,35 @@ public interface IMdsalApiManager {
 
     public void removeGroup(GroupEntity groupEntity);
 
-    public void sendPacketOut(long lDpnId, int groupId, byte[] payload);
+    public void sendPacketOut(BigInteger dpnId, int groupId, byte[] payload);
+
+    public void sendPacketOutWithActions(BigInteger dpnId, long groupId, byte[] payload, List<ActionInfo> actionInfos);
+
+    public void sendARPPacketOutWithActions(BigInteger dpnId, byte[] payload, List<ActionInfo> action_info);
 
-    public void sendPacketOutWithActions(long lDpnId, long groupId, byte[] payload, List<ActionInfo> actionInfos);
+    /**
+     * API to remove the flow on Data Plane Node synchronously. It internally waits for
+     * Flow Change Notification to confirm flow delete request is being sent with-in delayTime.
+     *
+     * @param flowEntity
+     * @param delayTime
+     */
+    public void syncRemoveFlow(FlowEntity flowEntity, long delayTime);
 
-    public void sendARPPacketOutWithActions(long dpid, byte[] payload, List<ActionInfo> action_info);
-    
-    public void printTest() ;
+    /**
+     * API to install the Group on Data Plane Node synchronously. It internally waits for
+     * Group Change Notification to confirm group mod request is being sent with-in delayTime
+     *
+     * @param groupEntity
+     * @param delayTime
+     */
+    public void syncInstallGroup(GroupEntity groupEntity, long delayTime);
 
- }
+    /**
+     * API to remove the Group on Data Plane Node synchronously. It internally waits for
+     * Group Change Notification to confirm group delete request is being sent.
+     *
+     * @param groupEntity
+     */
+    public void syncRemoveGroup(GroupEntity groupEntity);
+}