82bc5e29bc98465624ad181a6e74b06942e9ed1b
[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-uint16-type {
40         type uint16 {
41             range "1..max";
42         }
43     }
44     
45     typedef operation-timeout-type {
46         type uint16 {
47             range "5..max";
48         }
49     }
50     
51     grouping data-store-properties {
52         leaf max-shard-data-change-executor-queue-size {
53             default 1000;
54             type non-zero-uint16-type;
55             description "The maximum queue size for each shard's data store data change notification executor.";
56          }
57
58          leaf max-shard-data-change-executor-pool-size {
59             default 20;
60             type non-zero-uint16-type;
61             description "The maximum thread pool size for each shard's data store data change notification executor.";
62          }
63
64          leaf max-shard-data-change-listener-queue-size {
65             default 1000;
66             type non-zero-uint16-type;
67             description "The maximum queue size for each shard's data store data change listeners.";
68          }
69
70          leaf max-shard-data-store-executor-queue-size {
71             default 5000;
72             type non-zero-uint16-type;
73             description "The maximum queue size for each shard's data store executor.";
74          }
75             
76          leaf shard-transaction-idle-timeout-in-minutes {
77             default 10;
78             type non-zero-uint16-type;
79             description "The maximum amount of time a shard transaction can be idle without receiving any messages before it self-destructs.";
80          }
81          
82          leaf operation-timeout-in-seconds {
83             default 5;
84             type operation-timeout-type;
85             description "The maximum amount of time for akka operations (remote or local) to complete before failing.";
86          }
87     }
88     
89     // Augments the 'configuration' choice node under modules/module.
90     augment "/config:modules/config:module/config:configuration" {
91         case distributed-config-datastore-provider {
92             when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'";
93                 container config-schema-service {
94                     uses config:service-ref {
95                         refine type {
96                             mandatory false;
97                             config:required-identity sal:schema-service;
98                         }
99                     }
100                 }
101
102                 container config-properties {
103                     uses data-store-properties;
104                 }
105         }
106     }
107
108     // Augments the 'configuration' choice node under modules/module.
109     augment "/config:modules/config:module/config:configuration" {
110         case distributed-operational-datastore-provider {
111             when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'";
112                 container operational-schema-service {
113                     uses config:service-ref {
114                         refine type {
115                             mandatory false;
116                             config:required-identity sal:schema-service;
117                         }
118                     }
119                 }
120
121                 container operational-properties {
122                     uses data-store-properties;
123                 }
124         }
125     }
126 }