module id-manager { namespace "urn:opendaylight:vpnservice:idmanager"; prefix idmgr; revision "2015-04-03" { description "YANG model describes methods for allocating or releasing Ids as well as to create/delete Id Pools. The child pools are created inside the IdManager. This helps to improve ID Pool scalability/performance"; } container id-pools { description "Parent Id Pool is responsible allocating block (or) set of Ids to child Id Pools. The number of child pools are determined using some algorthimic approach inside IdManager. For example, spawning child pools based on Id allocation request rate for the given Pool, one child pool per blade in the cluster etc"; config true; list id-pool { key "pool-name"; leaf pool-name { type string; mandatory true; } leaf block-size { type uint16; mandatory true; } leaf parent-pool-name { type string; } list child-pools { key "child-pool-name"; leaf child-pool-name { type string; mandatory true; } leaf last-access-time { type uint32; } } list id-entries { description "Id entry for the given Id Pool, where id-key is used to identify the id entry"; key "id-key"; leaf id-key { type string;} leaf id-value { type uint32;} } container available-ids-holder { uses available-ids; } container released-ids-holder { uses released-ids; } } } grouping available-ids { leaf start { type uint32; } leaf end { type uint32; } leaf cursor { type int64; } } grouping released-ids { leaf available-id-count { type uint32; } leaf delayed-time-sec { type uint32; mandatory true; } list delayed-id-entries { uses delayed-id-entry; } } grouping delayed-id-entry { leaf id { type uint32; mandatory true; } leaf ready-time-sec { type uint32; mandatory true; } } rpc createIdPool { input { leaf pool-name { type string; } leaf low { type uint32; } leaf high { type uint32; } } } rpc deleteIdPool { input { leaf pool-name { type string; } } } rpc allocateId { input { leaf pool-name { type string; } leaf id-key { type string; } } output { leaf id-value { type uint32; } } } rpc releaseId { input { leaf pool-name { type string; } leaf id-key { type string; } } } }