1 // vi: set smarttab et sw=4 tabstop=4:
2 module distributed-datastore-provider {
5 namespace "urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider";
6 prefix "distributed-datastore-provider";
8 import config { prefix config; revision-date 2013-04-05; }
9 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
10 import opendaylight-config-dom-datastore {prefix config-dom-store-spi;}
11 import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;}
12 import opendaylight-md-sal-dom {prefix sal;}
15 "This module contains the base YANG definitions for
16 the distributed datastore provider implementation";
18 revision "2014-06-12" {
23 // This is the definition of the service implementation as a module identity.
24 identity distributed-config-datastore-provider {
25 base config:module-type;
26 config:provided-service config-dom-store-spi:config-dom-datastore;
27 // Specifies the prefix for generated java classes.
28 config:java-name-prefix DistributedConfigDataStoreProvider;
31 // This is the definition of the service implementation as a module identity.
32 identity distributed-operational-datastore-provider {
33 base config:module-type;
34 config:provided-service operational-dom-store-spi:operational-dom-datastore;
35 // Specifies the prefix for generated java classes.
36 config:java-name-prefix DistributedOperationalDataStoreProvider;
39 typedef non-zero-uint32-type {
45 typedef operation-timeout-type {
51 typedef heartbeat-interval-type {
57 grouping data-store-properties {
58 leaf max-shard-data-change-executor-queue-size {
60 type non-zero-uint32-type;
61 description "The maximum queue size for each shard's data store data change notification executor.";
64 leaf max-shard-data-change-executor-pool-size {
66 type non-zero-uint32-type;
67 description "The maximum thread pool size for each shard's data store data change notification executor.";
70 leaf max-shard-data-change-listener-queue-size {
72 type non-zero-uint32-type;
73 description "The maximum queue size for each shard's data store data change listener.";
76 leaf max-shard-data-store-executor-queue-size {
78 type non-zero-uint32-type;
79 description "The maximum queue size for each shard's data store executor.";
82 leaf shard-transaction-idle-timeout-in-minutes {
84 type non-zero-uint32-type;
85 description "The maximum amount of time a shard transaction can be idle without receiving any messages before it self-destructs.";
88 leaf shard-snapshot-batch-count {
90 type non-zero-uint32-type;
91 description "The minimum number of entries to be present in the in-memory journal log before a snapshot to be taken.";
94 leaf shard-hearbeat-interval-in-millis {
96 type heartbeat-interval-type;
97 description "The interval at which a shard will send a heart beat message to its remote shard.";
100 leaf operation-timeout-in-seconds {
102 type operation-timeout-type;
103 description "The maximum amount of time for akka operations (remote or local) to complete before failing.";
106 leaf shard-journal-recovery-log-batch-size {
108 type non-zero-uint32-type;
109 description "The maximum number of journal log entries to batch on recovery for a shard before committing to the data store.";
112 leaf shard-transaction-commit-timeout-in-seconds {
114 type non-zero-uint32-type;
115 description "The maximum amount of time a shard transaction three-phase commit can be idle without receiving the next messages before it aborts the transaction";
118 leaf shard-transaction-commit-queue-capacity {
120 type non-zero-uint32-type;
121 description "The maximum allowed capacity for each shard's transaction commit queue.";
124 leaf shard-initialization-timeout-in-seconds {
125 default 300; // 5 minutes
126 type non-zero-uint32-type;
127 description "The maximum amount of time to wait for a shard to initialize from persistence
128 on startup before failing an operation (eg transaction create and change
129 listener registration).";
132 leaf shard-leader-election-timeout-in-seconds {
134 type non-zero-uint32-type;
135 description "The maximum amount of time to wait for a shard to elect a leader before failing
136 an operation (eg transaction create).";
139 leaf enable-metric-capture {
142 description "Enable or disable metric capture.";
145 leaf bounded-mailbox-capacity {
147 type non-zero-uint32-type;
148 description "Max queue size that an actor's mailbox can reach";
154 description "Enable or disable data persistence";
157 leaf shard-isolated-leader-check-interval-in-millis {
159 type heartbeat-interval-type;
160 description "The interval at which the leader of the shard will check if its majority
161 followers are active and term itself as isolated";
165 // Augments the 'configuration' choice node under modules/module.
166 augment "/config:modules/config:module/config:configuration" {
167 case distributed-config-datastore-provider {
168 when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'";
169 container config-schema-service {
170 uses config:service-ref {
173 config:required-identity sal:schema-service;
178 container config-properties {
179 uses data-store-properties;
184 // Augments the 'configuration' choice node under modules/module.
185 augment "/config:modules/config:module/config:configuration" {
186 case distributed-operational-datastore-provider {
187 when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'";
188 container operational-schema-service {
189 uses config:service-ref {
192 config:required-identity sal:schema-service;
197 container operational-properties {
198 uses data-store-properties;