Bug 4105: Add entity-owners yang module 90/26790/1
authorMoiz Raja <moraja@cisco.com>
Tue, 4 Aug 2015 20:00:52 +0000 (13:00 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 10 Sep 2015 18:48:42 +0000 (14:48 -0400)
This module describes the data structure used for storing entity
ownership information by the clustered implementation of
EntityOwnershipService

Change-Id: Ib7f8fad74e00b480236b1a2bddb060b093e90ad4
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/yang/entity-owners.yang [new file with mode: 0644]

diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/entity-owners.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/entity-owners.yang
new file mode 100644 (file)
index 0000000..4006719
--- /dev/null
@@ -0,0 +1,65 @@
+module entity-owners {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:clustering:entity-owners";
+    prefix "entity-owners";
+
+    description
+        "This module contains the base YANG definitions for
+        an implementation of the EntityOwnershipService which stores
+        entity ownership information in the data store";
+
+    revision "2015-08-04" {
+        description "Initial revision.";
+    }
+
+    container entity-owners {
+
+        // The entity-owner list contains a list of all entities which have been assigned an owner
+        // Since an owner will be a cluster member it gives us a quick way to figure out all the entities
+        // that will need to have new owners assigned on the failure of a given cluster member
+        list entity-owner {
+            key name;
+            leaf name {
+                type string;
+            }
+
+            // Group all entities of a given type together
+            list entity-type {
+                key type;
+                leaf type {
+                    type string;
+                }
+
+                list entity {
+                    key id;
+                    leaf id {
+                        type string;
+                    }
+                }
+            }
+        }
+
+        // A list of all entities grouped by type
+        list entity-type {
+            key type;
+            leaf type {
+                type string;
+            }
+
+            list entity {
+                key id;
+                leaf id {
+                    type string;
+                }
+
+                // A list of all the candidates that would like to own the entity
+                list candidate {
+                    key id;
+                    leaf id {
+                        type string;
+                    }
+                }
+            }
+        }
+    }
+}