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 9e215a4..e4f30ac 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 ab824c4..5d37589 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;
+                                    }
+                              }
+                            }
             }
         }
 }