IdManager implementation
[vpnservice.git] / idmanager / idmanager-api / src / main / yang / id-manager.yang
1 module id-manager {
2     namespace "urn:opendaylight:vpnservice:idmanager";
3     prefix idmgr;
4
5     revision "2015-04-03" {
6         description "ID generator and manager Service module";
7     }
8
9     container pools {
10       description
11         "id pool instances";
12       config false;
13       list id-pool {
14         key "pool-name";
15         leaf id-start { type uint32;}
16         leaf pool-size { type uint64;}
17         leaf pool-name { type string;}
18         list generated-ids {
19           key "id-key";
20           leaf id-key { type string;}
21           leaf id-value { type uint32;}
22         }
23       }
24     }
25
26     rpc createIdPool {
27       input {
28         leaf pool-name { type string; }
29         leaf id-start { type uint32; }
30         leaf pool-size { type uint64; }
31       }
32     }
33
34     rpc getUniqueId {
35       input {
36         leaf pool-name { type string; }
37         leaf id-key {type string; }
38       }
39       output {
40         leaf id-value { type uint32; }
41       }
42     }
43 }