IdManager implementation
[vpnservice.git] / idmanager / idmanager-api / src / main / yang / id-manager.yang
index 7066442aabd8bd0174f5d9ce3035ae2a0e9f27d6..79bd2ffa5ec3c78438f42b2f5ab82c1fba1a8e9f 100644 (file)
@@ -1,4 +1,4 @@
-module odl-id-manager {
+module id-manager {
     namespace "urn:opendaylight:vpnservice:idmanager";
     prefix idmgr;
 
@@ -6,35 +6,38 @@ module odl-id-manager {
         description "ID generator and manager Service module";
     }
 
-    
-       list id-pool {
-               key "pool-name";
-               leaf id-start { type uint32; }
-               leaf pool-size { type uint64; }
-               leaf pool-name { type string; }
-               list generated-ids {
-                       key "id-key";
-                       leaf id-key { type string; }
-                       leaf id-value { type uint32; }
-               }
-       }
-       
-       rpc createIdPool {
-               input {
-                       leaf pool-name { type string; }
-                       leaf id-start { type uint32; }
-                       leaf pool-size { type uint64; }
-               }
-       }
-       
-       rpc getUniqueId {
-               input {
-                       leaf pool-name { type string; }
-                       leaf id-key {type string; }
-               }
-               output {
-                       leaf id-value { type uint32; }
-               }
-       }
-    
+    container pools {
+      description
+        "id pool instances";
+      config false;
+      list id-pool {
+        key "pool-name";
+        leaf id-start { type uint32;}
+        leaf pool-size { type uint64;}
+        leaf pool-name { type string;}
+        list generated-ids {
+          key "id-key";
+          leaf id-key { type string;}
+          leaf id-value { type uint32;}
+        }
+      }
+    }
+
+    rpc createIdPool {
+      input {
+        leaf pool-name { type string; }
+        leaf id-start { type uint32; }
+        leaf pool-size { type uint64; }
+      }
+    }
+
+    rpc getUniqueId {
+      input {
+        leaf pool-name { type string; }
+        leaf id-key {type string; }
+      }
+      output {
+        leaf id-value { type uint32; }
+      }
+    }
 }