Merge "BUG-1953: fix bad values in netconf monitoring test"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / yang / distributed-datastore-provider.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module distributed-datastore-provider {
3
4     yang-version 1;
5     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider";
6     prefix "distributed-datastore-provider";
7
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;}
13
14     description
15         "This module contains the base YANG definitions for
16         the distributed datastore provider implementation";
17
18     revision "2014-06-12" {
19         description
20             "Initial revision.";
21     }
22
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;
29     }
30
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;
37      }
38
39     typedef non-zero-uint32-type {
40         type uint32 {
41             range "1..max";
42         }
43     }
44
45     typedef operation-timeout-type {
46         type uint16 {
47             range "5..max";
48         }
49     }
50
51     typedef heartbeat-interval-type {
52         type uint16 {
53             range "100..max";
54         }
55     }
56
57     grouping data-store-properties {
58         leaf max-shard-data-change-executor-queue-size {
59             default 1000;
60             type non-zero-uint32-type;
61             description "The maximum queue size for each shard's data store data change notification executor.";
62          }
63
64          leaf max-shard-data-change-executor-pool-size {
65             default 20;
66             type non-zero-uint32-type;
67             description "The maximum thread pool size for each shard's data store data change notification executor.";
68          }
69
70          leaf max-shard-data-change-listener-queue-size {
71             default 1000;
72             type non-zero-uint32-type;
73             description "The maximum queue size for each shard's data store data change listeners.";
74          }
75
76          leaf max-shard-data-store-executor-queue-size {
77             default 5000;
78             type non-zero-uint32-type;
79             description "The maximum queue size for each shard's data store executor.";
80          }
81
82          leaf shard-transaction-idle-timeout-in-minutes {
83             default 10;
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.";
86          }
87
88          leaf shard-snapshot-batch-count {
89             default 20000;
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.";
92          }
93
94          leaf shard-hearbeat-interval-in-millis {
95             default 500;
96             type heartbeat-interval-type;
97             description "The interval at which a shard will send a heart beat message to its remote shard.";
98          }
99
100          leaf operation-timeout-in-seconds {
101             default 5;
102             type operation-timeout-type;
103             description "The maximum amount of time for akka operations (remote or local) to complete before failing.";
104          }
105
106          leaf shard-journal-recovery-log-batch-size {
107             default 5000;
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.";
110          }
111
112          leaf enable-metric-capture {
113             default false;
114             type boolean;
115             description "Enable or disable metric capture.";
116          }
117
118          leaf bounded-mailbox-capacity {
119              default 1000;
120              type non-zero-uint32-type;
121              description "Max queue size that an actor's mailbox can reach";
122          }
123     }
124
125     // Augments the 'configuration' choice node under modules/module.
126     augment "/config:modules/config:module/config:configuration" {
127         case distributed-config-datastore-provider {
128             when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'";
129                 container config-schema-service {
130                     uses config:service-ref {
131                         refine type {
132                             mandatory false;
133                             config:required-identity sal:schema-service;
134                         }
135                     }
136                 }
137
138                 container config-properties {
139                     uses data-store-properties;
140                 }
141         }
142     }
143
144     // Augments the 'configuration' choice node under modules/module.
145     augment "/config:modules/config:module/config:configuration" {
146         case distributed-operational-datastore-provider {
147             when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'";
148                 container operational-schema-service {
149                     uses config:service-ref {
150                         refine type {
151                             mandatory false;
152                             config:required-identity sal:schema-service;
153                         }
154                     }
155                 }
156
157                 container operational-properties {
158                     uses data-store-properties;
159                 }
160         }
161     }
162 }