Bug 6102: Upgrade ietf-{inet,yang}-types to 2013-07-15
[lispflowmapping.git] / mappingservice / lisp-proto / src / main / yang / odl-lisp-proto.yang
index 8ca9955204744fa131984baf80895f0e324c493c..bc9adf615cee1014ae17ac90c9bfca1a8ae7f8bd 100644 (file)
@@ -4,8 +4,9 @@ module odl-lisp-proto {
     namespace "urn:opendaylight:lfm:lisp-proto";
     prefix "lisp-proto";
 
-    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
-    import ietf-lisp-address-types { prefix lisp-address; revision-date 2015-11-05; }
+    import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
+    import odl-inet-binary-types { prefix inet-bin; revision-date 2016-03-03; }
+    import odl-lisp-address-types { prefix odl-lisp-address; revision-date 2016-05-04; }
 
     organization "LISP Flow Mapping";
 
@@ -21,15 +22,6 @@ module odl-lisp-proto {
         reference "https://tools.ietf.org/html/rfc6830";
     }
 
-    typedef ipv4-address-binary {
-        type binary {
-            length "4";
-        }
-        description
-            "The ipv4-address-binary type represents an IPv4 address in binary
-             in network byte order.";
-    }
-
     typedef xtr-id {
         type binary {
             length "16";
@@ -46,30 +38,10 @@ module odl-lisp-proto {
             "64 bit site identifier.";
     }
 
-    typedef ipv6-address-binary {
-        type binary {
-            length "16";
-        }
-        description
-            "The ipv6-address-binary type represents an IPv6 address in binary
-             in network byte order.";
-    }
-
-    typedef ip-address-binary {
-        type union {
-            type ipv4-address-binary;
-            type ipv6-address-binary;
-        }
-        description
-            "The ip-address-binary type represents an IP address in binary
-             in network byte order, and is IP version neutral.  The length of
-             the byte array implies the IP version.";
-    }
-
     grouping transport-address {
         container transport-address {
             leaf ipAddress {
-                type inet:ip-address;
+                type inet-bin:ip-address-binary;
                 reference "http://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml";
             }
             leaf port {
@@ -80,13 +52,13 @@ module odl-lisp-proto {
 
     grouping eid-container {
         container eid {
-            uses lisp-address:lisp-address;
+            uses odl-lisp-address:augmented-lisp-address;
         }
     }
 
     grouping rloc-container {
         container rloc {
-            uses lisp-address:lisp-address;
+            uses odl-lisp-address:augmented-lisp-address;
         }
     }
 
@@ -145,7 +117,7 @@ module odl-lisp-proto {
                 "64 bit site identifier.";
         }
         leaf source-rloc {
-            type inet:ip-address;
+            type inet-bin:ip-address-binary;
             description
                 "The Source IP address used for sending the enclosing control
                  packet in RLOC space.";
@@ -314,6 +286,90 @@ 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 auth-key-value {
+                type string;
+                description "Value of authentication key.";
+            }
+            leaf auth-key-type {
+                type uint16;
+                description "Type of authentication key.";
+            }
+            leaf packet-data {
+                type binary;
+                description
+                    "Map-Register packet contents";
+            }
+        }
+    }
+
     typedef message-type {
         type enumeration {
             enum reserved {
@@ -441,4 +497,8 @@ module odl-lisp-proto {
     notification xtrReplyMapping {
         uses MapReplyNotification;
     }
+
+    notification mappingKeepAlive {
+        uses map-register-cache-metadata-container;
+    }
 }