Bug 1636: Fixed invalid model of inmemory-datastore configuration.
[controller.git] / opendaylight / md-sal / sal-inmemory-datastore / src / main / yang / opendaylight-inmemory-datastore-provider.yang
1
2 module opendaylight-inmemory-datastore-provider {
3
4     yang-version 1;
5     namespace "urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider";
6     prefix "inmemory-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         "InMemory datastore provider implementation for config & operational datastore";
16
17     revision "2014-06-17" {
18         description
19         "Initial revision.";
20     }
21
22     // This is the definition of the service implementation as a module identity.
23     identity inmemory-config-datastore-provider {
24             base config:module-type;
25             config:provided-service config-dom-store-spi:config-dom-datastore;
26             config:java-name-prefix InMemoryConfigDataStoreProvider;
27     }
28
29         // This is the definition of the service implementation as a module identity.
30
31      identity inmemory-operational-datastore-provider {
32              base config:module-type;
33              config:provided-service operational-dom-store-spi:operational-dom-datastore;
34              config:java-name-prefix InMemoryOperationalDataStoreProvider;
35       }
36
37     grouping datastore-configuration {
38             leaf max-data-change-executor-queue-size {
39                 default 1000;
40                 type uint16;
41                 description "The maximum queue size for the data change notification executor.";
42             }
43
44             leaf max-data-change-executor-pool-size {
45                 default 20;
46                 type uint16;
47                 description "The maximum thread pool size for the data change notification executor.";
48             }
49
50             leaf max-data-change-listener-queue-size {
51                 default 1000;
52                 type uint16;
53                 description "The maximum queue size for the data change listeners.";
54             }
55     }
56
57     // Augments the 'configuration' choice node under modules/module.
58     augment "/config:modules/config:module/config:configuration" {
59         case inmemory-config-datastore-provider {
60             when "/config:modules/config:module/config:type = 'inmemory-config-datastore-provider'";
61
62             container inmemory-config-datastore-provider {
63                 container schema-service {
64                     uses config:service-ref {
65                         refine type {
66                             mandatory false;
67                             config:required-identity sal:schema-service;
68                         }
69                     }
70                 }
71                 uses datastore-configuration;
72             }
73         }
74     }
75
76     // Augments the 'configuration' choice node under modules/module.
77     augment "/config:modules/config:module/config:configuration" {
78         case inmemory-operational-datastore-provider {
79             when "/config:modules/config:module/config:type = 'inmemory-operational-datastore-provider'";
80
81             container inmemory-operational-datastore-provider {
82                 container schema-service {
83                     uses config:service-ref {
84                         refine type {
85                             mandatory false;
86                             config:required-identity sal:schema-service;
87                         }
88                     }
89                 }
90                 uses datastore-configuration;
91             }
92         }
93     }
94 }