Working with OVS
[vpnservice.git] / nexthopmgr / nexthopmgr-impl / src / main / java / org / opendaylight / vpnservice / nexthopmgr / NexthopManager.java
index 052ed98f4e3998d82ad45f8325a82f1a2f4c8d1e..c0a99838a00997d7e5171bde6cf1e46dbb5d33ca 100644 (file)
@@ -195,11 +195,11 @@ public class NexthopManager implements L3nexthopService, AutoCloseable {
         }
     }
 
-    public void createRemoteNextHop(String ifName, String ofPortId, String ipAddress) {
+    public void createRemoteNextHop(String ifName, String ipAddress) {
         String nhKey = new String("nexthop." + ifName + ipAddress);
         int groupId = createNextHopPointer(nhKey);
 
-        BigInteger dpnId = getDpnId(ofPortId);
+        BigInteger dpnId = interfaceManager.getDpnForInterface(ifName);
         TunnelNexthop nexthop = getTunnelNexthop(dpnId, ipAddress);
         if (nexthop == null) {
             List<BucketInfo> listBucketInfo = new ArrayList<BucketInfo>();
@@ -210,7 +210,7 @@ public class NexthopManager implements L3nexthopService, AutoCloseable {
             GroupEntity groupEntity = MDSALUtil.buildGroupEntity(
                 dpnId, groupId, ipAddress, GroupTypes.GroupIndirect, listBucketInfo);
             mdsalManager.installGroup(groupEntity);
-            makeRemoteFlow(dpnId, ifName, NwConstants.ADD_FLOW);
+            //makeRemoteFlow(dpnId, ifName, NwConstants.ADD_FLOW);
 
             //update MD-SAL DS
             addTunnelNexthopToDS(dpnId, ipAddress, groupId);
@@ -399,7 +399,7 @@ public class NexthopManager implements L3nexthopService, AutoCloseable {
                     dpnId, nh.getEgressPointer(), ipAddress, GroupTypes.GroupIndirect, null);
             // remove Group ...
             mdsalManager.removeGroup(groupEntity);
-            makeRemoteFlow(dpnId, ifName, NwConstants.DEL_FLOW);
+            //makeRemoteFlow(dpnId, ifName, NwConstants.DEL_FLOW);
             //update MD-SAL DS
             removeTunnelNexthopFromDS(dpnId, ipAddress);
         } else {
@@ -434,7 +434,7 @@ public class NexthopManager implements L3nexthopService, AutoCloseable {
         
     }
 
-    private <T extends DataObject> Optional<T> read(LogicalDatastoreType datastoreType,
+    <T extends DataObject> Optional<T> read(LogicalDatastoreType datastoreType,
             InstanceIdentifier<T> path) {
 
         ReadOnlyTransaction tx = broker.newReadOnlyTransaction();