Bug 7048 - Update to OF port does not change 220 flow
[genius.git] / interfacemanager / interfacemanager-impl / src / main / java / org / opendaylight / genius / interfacemanager / IfmUtil.java
index 5168aeedc1bdf3182968e76db68df570c49064ca..31584dae6c10052c2eb11424cc41e71953ae0954 100755 (executable)
@@ -216,9 +216,9 @@ public class IfmUtil {
         return result;
     }
 
-    public static List<Action> getEgressActionsForInterface(String interfaceName, Long tunnelKey,
+    public static List<Action> getEgressActionsForInterface(String interfaceName, Long tunnelKey, Integer actionKey,
                                                             DataBroker dataBroker, Boolean isDefaultEgress) {
-        List<ActionInfo> listActionInfo = getEgressActionInfosForInterface(interfaceName, tunnelKey, 0, dataBroker, isDefaultEgress);
+        List<ActionInfo> listActionInfo = getEgressActionInfosForInterface(interfaceName, tunnelKey, actionKey==null?0:actionKey, dataBroker, isDefaultEgress);
         List<Action> actionsList = new ArrayList<>();
         for (ActionInfo actionInfo : listActionInfo) {
             actionsList.add(actionInfo.buildAction());
@@ -231,7 +231,7 @@ public class IfmUtil {
         List<Instruction> instructions = new ArrayList<>();
         List<Action> actionList = MDSALUtil.buildActions(getEgressActionInfosForInterface(
                 interfaceName, tunnelKey, 0, dataBroker, isDefaultEgress));
-        instructions.add(MDSALUtil.buildWriteActionsInstruction(actionList));
+        instructions.add(MDSALUtil.buildApplyActionsInstruction(actionList));
         return  instructions;
     }
 
@@ -487,10 +487,10 @@ public class IfmUtil {
     }
 
     public static void unbindService(DataBroker dataBroker, String interfaceName, InstanceIdentifier<BoundServices>
-            boundServicesInstanceIdentifier, Class<? extends ServiceModeBase> serviceMode){
+            boundServicesInstanceIdentifier, String parentInterface){
         LOG.info("Unbinding Service from : {}", interfaceName);
         DataStoreJobCoordinator dataStoreJobCoordinator = DataStoreJobCoordinator.getInstance();
-        dataStoreJobCoordinator.enqueueJob(interfaceName,
+        dataStoreJobCoordinator.enqueueJob(parentInterface,
                 () -> {
                     WriteTransaction t = dataBroker.newWriteOnlyTransaction();
                     t.delete(LogicalDatastoreType.CONFIGURATION, boundServicesInstanceIdentifier);