Remove handleMapRegister(MapRegister, boolean) 53/37953/2
authorLorand Jakab <lojakab@cisco.com>
Thu, 21 Apr 2016 06:41:38 +0000 (09:41 +0300)
committerLorand Jakab <lojakab@cisco.com>
Thu, 21 Apr 2016 07:18:10 +0000 (10:18 +0300)
The boolean variable is no longer used in the method, and the method
itself was only used in commented out integration tests, so there is no
reason to keep it around. (It was ugly to begin with.)

Check SFC as well, it's not used there either.

Change-Id: Id3aa0d7aadfd8f354e3cf5af2ab6b980dda0939f
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
integrationtest/src/test/java/org/opendaylight/lispflowmapping/integrationtest/MappingServiceIntegrationTest.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java

index 3fae288c2c7f1568c0a939cc32c984fc8fecd8ae..b8f4f143e40fd7619a1998726a58b749cfb1848a 100644 (file)
@@ -994,7 +994,7 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         etlr.getLocatorRecord().add(record.build());
         mapRegister.setMappingRecordItem(new ArrayList<MappingRecordItem>());
         mapRegister.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlr.build()).build());
-        lms.handleMapRegister(mapRegister.build(), false);
+        lms.handleMapRegister(mapRegister.build());
 
         // Get mapping using NB interface. No IID used
         URL url = createGetMappingIPv4URL(0, eid, mask);
@@ -1036,7 +1036,7 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         etlr.getLocatorRecord().add(record.build());
         mapRegister.setMappingRecordItem(new ArrayList<MappingRecordItem>());
         mapRegister.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlr.build()).build());
-        lms.handleMapRegister(mapRegister.build(), false);
+        lms.handleMapRegister(mapRegister.build());
 
         // Delete mapping using NB interface. No IID used
         URL url = createDeleteMappingIPv4URL(0, eid, mask);
@@ -1094,7 +1094,7 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         etlr.getLocatorRecord().add(record.build());
         mapRegister.setMappingRecordItem(new ArrayList<MappingRecordItem>());
         mapRegister.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlr.build()).build());
-        lms.handleMapRegister(mapRegister.build(), false);
+        lms.handleMapRegister(mapRegister.build());
 
         // Get mapping using NB interface. No IID used
         URL url = createGetMappingSourceDestURL(address1.getIpv4Address().getAfi(),
index 8f09c34031850e050f94169fdf492cb35b2ed07c..60e03c4d8348cb2d750b409ef176b3de8a0d6b67 100644 (file)
@@ -142,7 +142,6 @@ public class LispMappingService implements IFlowMapping, BindingAwareProvider, I
         // After this invocation we assume that the thread local is filled with the reply
         if (tlsMapRequest.get() != null) {
             SendMapRequestInputBuilder smrib = new SendMapRequestInputBuilder();
-            new MapRequestBuilder(tlsMapRequest.get().getLeft());
             smrib.setMapRequest(new MapRequestBuilder(tlsMapRequest.get().getLeft()).build());
             smrib.setTransportAddress(tlsMapRequest.get().getRight());
             getLispSB().sendMapRequest(smrib.build());
@@ -163,17 +162,6 @@ public class LispMappingService implements IFlowMapping, BindingAwareProvider, I
         return tlsMapNotify.get();
     }
 
-    public Pair<MapNotify, List<TransportAddress>> handleMapRegister(MapRegister mapRegister, boolean smr) {
-        LOG.debug("DAO: Adding mapping for {}",
-                LispAddressStringifier.getString(mapRegister.getMappingRecordItem().get(0)
-                        .getMappingRecord().getEid()));
-
-        tlsMapNotify.set(null);
-        mapServer.handleMapRegister(mapRegister);
-        // After this invocation we assume that the thread local is filled with the reply
-        return tlsMapNotify.get();
-    }
-
     public void setShouldAuthenticate(boolean shouldAuthenticate) {
         this.shouldAuthenticate = shouldAuthenticate;
         this.mapResolver.setShouldAuthenticate(shouldAuthenticate);