Bug 6071: Move authentication package to lisp-proto
[lispflowmapping.git] / mappingservice / api / src / main / yang / odl-mappingservice.yang
index 868f72dcd975d08e5fc03d9b4649e8ee59a8deec..e483d1cd1a9e60c2b8611d6f4554393e58e41559 100644 (file)
@@ -5,7 +5,7 @@ module odl-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 +18,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 {
@@ -41,13 +26,6 @@ module odl-mappingservice {
         }
     }
 
-    typedef site-id {
-        description "64 bit site identifier";
-        type binary {
-            length "8";
-        }
-    }
-
     typedef vni-uri {
         description "VNI as a string lookup key in a URI";
         type inet:uri;
@@ -58,6 +36,11 @@ module odl-mappingservice {
         type inet:uri;
     }
 
+    typedef xtr-id-uri {
+        description "xTR-ID as a string lookup key in a URI";
+        type inet:uri;
+    }
+
     typedef mapping-change {
         description "Type of mapping update";
         type enumeration {
@@ -75,15 +58,8 @@ module odl-mappingservice {
         description "A classifier for endpoint-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;
-            }
-        }
+    identity xtrid-context {
+        description "A classifier for xtr-id elements which allows direct access to a particular element in the data tree.";
     }
 
     grouping mapping-authkey-list {
@@ -92,7 +68,7 @@ module odl-mappingservice {
             leaf mapping-authkey-item-id {
                 type string;
             }
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -103,7 +79,7 @@ module odl-mappingservice {
                 type string;
             }
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -126,9 +102,19 @@ module odl-mappingservice {
             }
             leaf-list site-id {
                 description "Site ID";
-                type site-id;
+                type lisp-proto:site-id;
             }
             uses lisp-proto:mapping-record-container;
+            list xtr-id-mapping {
+                description "A list of xTR-IDs with their associated mappings";
+                config false;
+                key "xtr-id-uri";
+                ext:context-instance "xtrid-context";
+                leaf xtr-id-uri {
+                    type xtr-id-uri;
+                }
+                uses lisp-proto:mapping-record-container;
+            }
         }
         list authentication-key {
             description "A list of authentication keys for EID prefixes within the same Virtual Network Identifier";
@@ -138,7 +124,7 @@ module odl-mappingservice {
                 type eid-uri;
             }
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -155,7 +141,7 @@ module odl-mappingservice {
     rpc add-key {
         input {
             uses lisp-proto:eid-container;
-            uses mapping-authkey-container;
+            uses lisp-proto:mapping-authkey-container;
         }
     }
 
@@ -164,14 +150,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;
         }
     }