Having InMemoryDOMDatastore in its own bundle.To make it configurable
[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
38     // Augments the 'configuration' choice node under modules/module.
39     augment "/config:modules/config:module/config:configuration" {
40         case inmemory-config-datastore-provider {
41             when "/config:modules/config:module/config:type = 'inmemory-config-datastore-provider'";
42
43             container schema-service {
44               uses config:service-ref {
45                    refine type {
46                           mandatory false;
47                           config:required-identity sal:schema-service;
48                     }
49               }
50             }
51         }
52     }
53
54
55
56       // Augments the 'configuration' choice node under modules/module.
57         augment "/config:modules/config:module/config:configuration" {
58             case inmemory-operational-datastore-provider {
59                 when "/config:modules/config:module/config:type = 'inmemory-operational-datastore-provider'";
60
61                 container schema-service {
62                   uses config:service-ref {
63                        refine type {
64                               mandatory false;
65                               config:required-identity sal:schema-service;
66                         }
67                   }
68                 }
69             }
70         }
71 }