YANG model for the Map-Register cache 02/38502/5
authorLorand Jakab <lojakab@cisco.com>
Wed, 11 May 2016 08:27:52 +0000 (11:27 +0300)
committerLorand Jakab <lojakab@cisco.com>
Wed, 11 May 2016 08:27:52 +0000 (11:27 +0300)
Change-Id: Ib2a5171731347ef600d09ddcc37af14c48e0deee
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
mappingservice/lisp-proto/src/main/yang/odl-lisp-proto.yang

index 8db34afbb248cb8042cad79deaf46ff152ecb0c9..06cfe743dd6c3e9a4e2fe329ec17ea12a50ca7ba 100644 (file)
@@ -72,6 +72,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.Ma
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapRegister;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapReply;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MappingKeepAlive;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.OdlLispProtoListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.RequestMapping;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrReplyMapping;
@@ -1989,6 +1990,10 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         public void onXtrRequestMapping(XtrRequestMapping notification) {
         }
 
+        @Override
+        public void onMappingKeepAlive(MappingKeepAlive notification) {
+        }
+
     }
 
     public void testRecievingNonProxyOnXtrPort() throws SocketTimeoutException, SocketException, Throwable {
index e53d9a0150a84a3c8c6f5734643895b530053b56..643279ff813d3234e8ba1c0f01df987779ccde99 100644 (file)
@@ -35,6 +35,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.Ma
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapRegister;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapReply;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MappingKeepAlive;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.OdlLispProtoListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.RequestMapping;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrReplyMapping;
@@ -237,6 +238,13 @@ public class LispMappingService implements IFlowMapping, BindingAwareProvider, I
         LOG.debug("Received XtrReplyMapping notification, ignoring");
     }
 
+    @Override
+    public void onMappingKeepAlive(MappingKeepAlive notification) {
+        LOG.debug("Received MappingKeepAlive notification, ignoring");
+        // TODO This notification means that SB received a Map-Register which was cached. Will need to update
+        // timestamps in stored mappings
+    }
+
     private OdlLispSbService getLispSB() {
         if (lispSB == null) {
             lispSB = session.getRpcService(OdlLispSbService.class);
index 47daea3c8da560d8c7bacf0c04f45a74759851b5..312f3363275dc01569b4c0fb787604fe666af984 100644 (file)
@@ -285,6 +285,82 @@ module odl-lisp-proto {
         uses mapping-record-list;
     }
 
+    grouping map-register-cache-key-container {
+        container map-register-cache-key {
+            leaf eid-prefix {
+                type binary;
+                description
+                    "The EID prefix stored as binary data";
+            }
+            leaf xtr-id {
+                type binary;
+                description
+                    "128 bit xTR identifier.";
+            }
+            leaf site-id {
+                type binary;
+                description
+                    "64 bit site identifier.";
+            }
+            description
+                "The lookup key in the Map-Register fast path.";
+        }
+    }
+
+    grouping map-register-cache-metadata-container {
+        container map-register-cache-metadata {
+            list eid-lisp-address {
+                key "eid-lisp-address-id";
+                leaf eid-lisp-address-id {
+                    type string;
+                }
+                uses eid-container;
+                description "List of EID-Prefixes from Map-Register message.";
+            }
+            leaf xtr-id {
+                type xtr-id;
+                description
+                    "128 bit xTR identifier.";
+            }
+            leaf site-id {
+                type site-id;
+                description
+                    "64 bit site identifier.";
+            }
+            leaf timestamp {
+                type int64;
+                description
+                    "Milliseconds since January 1, 1970, 00:00:00 GMT";
+            }
+            leaf want-map-notify {
+                type boolean;
+                description
+                    "xTR askes for Map-Register acknowledgement in form of
+                    a Map-Notify control message.";
+            }
+            leaf merge-enabled {
+                type boolean;
+                description "Value of 22th bit in map register message.";
+            }
+            description
+                "The Map-Register cache metadata is information for a mapping
+                database about mapping update event, without the full Map-Register
+                packet data. The metadata and the packet data together will form
+                the Map-Register cache value.";
+        }
+    }
+
+    grouping map-register-cache-value-grouping {
+        container map-register-cache-value {
+            uses map-register-cache-metadata-container;
+            leaf packet-data {
+                type binary;
+                description
+                    "Map-Register packet contents";
+            }
+        }
+    }
+
     typedef message-type {
         type enumeration {
             enum reserved {
@@ -412,4 +488,8 @@ module odl-lisp-proto {
     notification xtrReplyMapping {
         uses MapReplyNotification;
     }
+
+    notification mappingKeepAlive {
+        uses map-register-cache-metadata-container;
+    }
 }