Merge "Registering Distributed Datastore for SchemaContext changes"
authorEd Warnicke <eaw@cisco.com>
Fri, 4 Jul 2014 20:45:29 +0000 (20:45 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 4 Jul 2014 20:45:29 +0000 (20:45 +0000)
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java
opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang

index ad2fb02a30d3fe332840f6866063882105a7afcf..665cb2d44148a6a3b6bb41d403e54b95cfe45363 100644 (file)
@@ -25,6 +25,7 @@ public class DistributedConfigDataStoreProviderModule extends org.opendaylight.c
 
 
       final DistributedDataStore configDatastore = new DistributedDataStore(actorSystem, "config");
+      getSchemaServiceDependency().registerSchemaServiceListener(configDatastore);
 
       final class AutoCloseableDistributedDataStore implements AutoCloseable {
 
index 9e215a436de439975da8544d6dbc882d740764da..e4f30ac723d009f0a23bbf5799bf4ecb2be66a24 100644 (file)
@@ -23,6 +23,7 @@ public class DistributedOperationalDataStoreProviderModule extends org.opendayli
     final ActorSystem actorSystem = ActorSystem.create("opendaylight-cluster", ConfigFactory
         .load().getConfig("ODLCluster"));
     final DistributedDataStore operationalStore = new DistributedDataStore(actorSystem, "operational");
+    getSchemaServiceDependency().registerSchemaServiceListener(operationalStore);
 
     final class AutoCloseableDistributedDataStore implements AutoCloseable {
 
index ab824c4479f03e86820c8826f58733effe0f5bfb..5d3758986c40fc8858005aad29cf74f85c9af857 100644 (file)
@@ -40,6 +40,14 @@ module distributed-datastore-provider {
     augment "/config:modules/config:module/config:configuration" {
         case distributed-config-datastore-provider {
             when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'";
+            container schema-service {
+                          uses config:service-ref {
+                               refine type {
+                                      mandatory false;
+                                      config:required-identity sal:schema-service;
+                                }
+                          }
+                        }
         }
     }
 
@@ -47,6 +55,14 @@ module distributed-datastore-provider {
         augment "/config:modules/config:module/config:configuration" {
             case distributed-operational-datastore-provider {
                 when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'";
+                container schema-service {
+                              uses config:service-ref {
+                                   refine type {
+                                          mandatory false;
+                                          config:required-identity sal:schema-service;
+                                    }
+                              }
+                            }
             }
         }
 }