BUG-7965 Switch distributed-data backend to a separate shard
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / yang / prefix-shard-configuration.yang
diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/prefix-shard-configuration.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/prefix-shard-configuration.yang
new file mode 100644 (file)
index 0000000..02d5c30
--- /dev/null
@@ -0,0 +1,34 @@
+module prefix-shard-configuration {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:clustering:prefix-shard-configuration";
+    prefix "prefix-config";
+
+    description
+        "This module contains the base YANG definitions for
+        shards based on prefix configuration";
+
+    revision "2017-01-10" {
+        description "Initial revision.";
+    }
+
+    container prefix-shards {
+
+        list shard {
+            key prefix;
+            leaf prefix {
+                type instance-identifier;
+                description "Prefix that this shard is rooted at.";
+            }
+
+            container replicas {
+                leaf-list replica {
+                    type string;
+                }
+
+                description "List of cluster member nodes that this shard is replicated on";
+            }
+
+            description "List of prefix-based shards configured.";
+        }
+    }
+}