24fe7a36f8fa1d5c1c6d940738ea71811323513d
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / yang / entity-owners.yang
1 module entity-owners {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:clustering:entity-owners";
4     prefix "entity-owners";
5
6     description
7         "This module contains the base YANG definitions for
8         an implementation of the EntityOwnershipService which stores
9         entity ownership information in the data store";
10
11     revision "2015-08-04" {
12         description "Initial revision.";
13     }
14
15     container entity-owners {
16
17         // The entity-owner list contains a list of all entities which have been assigned an owner
18         // Since an owner will be a cluster member it gives us a quick way to figure out all the entities
19         // that will need to have new owners assigned on the failure of a given cluster member
20         list entity-owner {
21             key name;
22             leaf name {
23                 type string;
24             }
25
26             // Group all entities of a given type together
27             list entity-type {
28                 key type;
29                 leaf type {
30                     type string;
31                 }
32
33                 list entity {
34                     key id;
35                     leaf id {
36                         type string;
37                     }
38                 }
39             }
40         }
41
42         // A list of all entities grouped by type
43         list entity-type {
44             key type;
45             leaf type {
46                 type string;
47             }
48
49             list entity {
50                 key id;
51                 leaf id {
52                     type instance-identifier;
53                 }
54
55                 leaf owner {
56                     type string;
57                 }
58                 
59                 // A list of all the candidates that would like to own the entity
60                 list candidate {
61                     key name;
62                     leaf name {
63                         type string;
64                     }
65                 }
66             }
67         }
68     }
69 }