Merge "Reenable Neutron using YANG models"
authorLori Jakab <lorand.jakab@gmail.com>
Thu, 21 Jul 2016 14:22:54 +0000 (14:22 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 21 Jul 2016 14:22:54 +0000 (14:22 +0000)
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/lisp-proto/src/main/yang/odl-lisp-proto.yang
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundHandler.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/cache/MapRegisterCache.java

index 199a44c6f8b454ea69915ec7b9f59ec23c718d1d..e2014a0f08cd2ea2997bcf767723ef76b86a8a48 100644 (file)
@@ -189,7 +189,7 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle
             smrib.setTransportAddress(mapRequestNotification.getTransportAddress());
             getLispSB().sendMapReply(smrib.build());
         } else {
-            LOG.warn("got null map reply");
+            LOG.debug("handleMapRequest: Got null MapReply");
         }
     }
 
index cd1c5595d30b5d6f624d616db0e134a6090c313b..3f9351950f32ebb989f38e49d33679480eb1cc04 100644 (file)
@@ -365,14 +365,7 @@ module odl-lisp-proto {
     grouping map-register-cache-value-grouping {
         container map-register-cache-value {
             uses map-register-cache-metadata-container;
-            leaf auth-key-value {
-                type string;
-                description "Value of authentication key.";
-            }
-            leaf auth-key-type {
-                type uint16;
-                description "Type of authentication key.";
-            }
+            uses mapping-authkey-container;
             leaf packet-data {
                 type binary;
                 description
index a4b7aab055fb1a4d6b274371fd9d9d9bfa94c0f4..1ac782723c57f2f48f6256600bafca2abdba693e 100644 (file)
@@ -241,8 +241,7 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
 
                         final MapRegisterCacheValueBuilder cacheValueBldNew = new MapRegisterCacheValueBuilder();
                         cacheValueBldNew.setPacketData(artificialEntry.getValue());
-                        cacheValueBldNew.setAuthKeyValue(mappingAuthkey.getKeyString());
-                        cacheValueBldNew.setAuthKeyType(mappingAuthkey.getKeyType());
+                        cacheValueBldNew.setMappingAuthkey(mappingAuthkey);
                         cacheValueBldNew.setMapRegisterCacheMetadata(cacheMetadataBldNew.build());
 
                         mapRegisterCache.addEntry(cacheKey, cacheValueBldNew.build());
@@ -283,8 +282,7 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
                 final MapRegisterCacheMetadataBuilder newMapRegisterCacheMetadataBuilder =
                         new MapRegisterCacheMetadataBuilder(mapRegisterCacheValue.getMapRegisterCacheMetadata());
 
-                newMapRegisterCacheValueBuilder.setAuthKeyValue(mappingAuthkey.getKeyString());
-                newMapRegisterCacheValueBuilder.setAuthKeyType(mappingAuthkey.getKeyType());
+                newMapRegisterCacheValueBuilder.setMappingAuthkey(mappingAuthkey);
                 newMapRegisterCacheValueBuilder.setMapRegisterCacheMetadata(newMapRegisterCacheMetadataBuilder.build());
                 return newMapRegisterCacheValueBuilder.build();
             }
@@ -348,10 +346,10 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
 
     private void sendMapNotifyMsg(final ByteBuffer inBuffer, final InetAddress inetAddress, int portNumber,
                                   MapRegisterCacheValue mapRegisterValue) {
-        if (mapRegisterValue.getAuthKeyType() != null) {
+        if (mapRegisterValue.getMappingAuthkey().getKeyType() != null) {
             ByteBuffer outBuffer = transformMapRegisterToMapNotify(inBuffer);
-            if (mapRegisterValue.getAuthKeyType() != 0) {
-                outBuffer = calculateAndSetNewMAC(outBuffer, mapRegisterValue.getAuthKeyValue());
+            if (mapRegisterValue.getMappingAuthkey().getKeyType() != 0) {
+                outBuffer = calculateAndSetNewMAC(outBuffer, mapRegisterValue.getMappingAuthkey().getKeyString());
             }
             outBuffer.position(0);
             lispSbPlugin.handleSerializedLispBuffer(inetAddress, outBuffer, MessageType.MapNotify, portNumber);
index dfc085cade121ffce54499c363fb65ee8badab24..cc436399892805ab5572d7fe7f79a118603e0a22 100644 (file)
@@ -57,8 +57,7 @@ public class MapRegisterCache {
 
         final MapRegisterCacheValueBuilder mapRegisterCacheValueBuilderNew = new MapRegisterCacheValueBuilder();
         mapRegisterCacheValueBuilderNew.setPacketData(mapRegisterCacheValueOld.getPacketData());
-        mapRegisterCacheValueBuilderNew.setAuthKeyValue(mapRegisterCacheValueOld.getAuthKeyValue());
-        mapRegisterCacheValueBuilderNew.setAuthKeyType(mapRegisterCacheValueOld.getAuthKeyType());
+        mapRegisterCacheValueBuilderNew.setMappingAuthkey(mapRegisterCacheValueOld.getMappingAuthkey());
         mapRegisterCacheValueBuilderNew.setMapRegisterCacheMetadata(mapRegisterCacheMetadataBuilderNew.build());
 
         return mapRegisterCacheValueBuilderNew.build();