Bug 9116: SMR children of a prefix too
[lispflowmapping.git] / mappingservice / api / src / main / yang / odl-mappingservice.yang
index 7aae417e97264fbae63a45bee131b36f918c491c..9c70b0dc27de706aa75204f989e41674b09acfd1 100644 (file)
@@ -4,8 +4,7 @@ module odl-mappingservice {
     namespace "urn:opendaylight:lfm:mappingservice";
     prefix "mappingservice";
 
-    import config { prefix config; revision-date 2013-04-05; }
-    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+    import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
     import yang-ext { prefix ext; revision-date 2013-07-09; }
     import odl-lisp-proto { prefix lisp-proto; revision-date 2015-11-05; }
 
@@ -18,21 +17,6 @@ module odl-mappingservice {
         description "Renamed and moved module to mappingservice.api.";
     }
 
-    identity mappingservice {
-        base config:service-type;
-        config:java-class "org.opendaylight.lispflowmapping.interfaces.mappingservice.IMappingService";
-    }
-
-    identity mappingservice-shell {
-        base config:service-type;
-        config:java-class "org.opendaylight.lispflowmapping.interfaces.mappingservice.IMappingServiceShell";
-    }
-
-    identity lisp-mappingservice {
-        base config:service-type;
-        config:java-class "org.opendaylight.lispflowmapping.interfaces.lisp.IFlowMapping";
-    }
-
     typedef mapping-origin {
         description "The originating entity of an EID-to-RLOC mapping";
         type enumeration {
@@ -77,24 +61,13 @@ module odl-mappingservice {
         description "A classifier for xtr-id elements which allows direct access to a particular element in the data tree.";
     }
 
-    grouping mapping-authkey-container {
-        container mapping-authkey {
-            leaf key-string {
-                type string;
-            }
-            leaf key-type {
-                type uint16;
-            }
-        }
-    }
-
     grouping mapping-authkey-list {
         list mapping-authkey-item {
             key "mapping-authkey-item-id";
             leaf mapping-authkey-item-id {
                 type string;
             }
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -105,7 +78,7 @@ module odl-mappingservice {
                 type string;
             }
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -150,7 +123,7 @@ module odl-mappingservice {
                 type eid-uri;
             }
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -162,12 +135,19 @@ module odl-mappingservice {
             ext:context-instance "vni-context";
             uses db-instance;
         }
+        container last-updated {
+            config false;
+            leaf last-updated {
+                description "Last database update timestamp (in milliseconds since January 1, 1970, 00:00:00 GMT)";
+                type int64;
+            }
+        }
     }
 
     rpc add-key {
         input {
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -176,14 +156,14 @@ module odl-mappingservice {
             uses lisp-proto:eid-container;
         }
         output {
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
     rpc update-key {
         input {
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -208,6 +188,18 @@ module odl-mappingservice {
         }
     }
 
+    rpc get-mapping-with-xtr-id {
+        input {
+            uses lisp-proto:eid-container;
+            leaf xtr-id {
+                type lisp-proto:xtr-id;
+            }
+        }
+        output {
+            uses lisp-proto:mapping-record-container;
+        }
+    }
+
     rpc update-mapping {
         input {
             uses lisp-proto:mapping-record-container;
@@ -292,6 +284,9 @@ module odl-mappingservice {
     rpc remove-all-mappings {
     }
 
+    rpc remove-all-operational-content {
+    }
+
     notification mapping-changed {
         description "Notification sent when a mapping is changed";
         leaf change-type {
@@ -299,5 +294,14 @@ module odl-mappingservice {
             type mapping-change;
         }
         uses lisp-proto:mapping-record-container;
+        uses lisp-proto:eid-container;
+        list subscriber-item {
+            description "The list of subscribers to be notified of this change.";
+            uses lisp-proto:subscriber-data-grouping;
+        }
+        list dst-subscriber-item {
+            description "For Src/Dst EIDs, The list of the Dst subscribers to be notified of this change.";
+            uses lisp-proto:subscriber-data-grouping;
+        }
     }
 }