X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FBrokerConfigActivator.xtend;h=482cfa959f2b8e11ce125a53da97d52b5990a808;hp=a6aa0ce32eea75a5aa0498bfe22a9bcf4b0c2169;hb=ac65af650d550ae56dd02b660e1c5eef24b78740;hpb=d6e3e28bf86638685e55289d6cd9cb749838a75e diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerConfigActivator.xtend b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerConfigActivator.xtend index a6aa0ce32e..482cfa959f 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerConfigActivator.xtend +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerConfigActivator.xtend @@ -12,21 +12,26 @@ import java.util.Hashtable import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier import org.opendaylight.controller.sal.core.api.data.DataStore +import org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter +import org.opendaylight.controller.sal.core.api.model.SchemaServiceListener class BrokerConfigActivator implements AutoCloseable { private static val ROOT = InstanceIdentifier.builder().toInstance(); + + @Property + private var DataBrokerImpl dataService; private var ServiceRegistration schemaReg; private var ServiceRegistration dataReg; private var ServiceRegistration dataProviderReg; private var ServiceRegistration mountReg; private var ServiceRegistration mountProviderReg; - private var SchemaServiceImpl schemaService; - private var DataBrokerImpl dataService; private var MountPointManagerImpl mountService; + + SchemaAwareDataStoreAdapter wrappedStore public def void start(BrokerImpl broker,DataStore store,BundleContext context) { val emptyProperties = new Hashtable(); @@ -45,9 +50,15 @@ class BrokerConfigActivator implements AutoCloseable { dataReg = context.registerService(DataBrokerService, dataService, emptyProperties); dataProviderReg = context.registerService(DataProviderService, dataService, emptyProperties); - dataService.registerConfigurationReader(ROOT, store); - dataService.registerCommitHandler(ROOT, store); - dataService.registerOperationalReader(ROOT, store); + wrappedStore = new SchemaAwareDataStoreAdapter(); + wrappedStore.changeDelegate(store); + wrappedStore.setValidationEnabled(false); + + context.registerService(SchemaServiceListener,wrappedStore,emptyProperties) + + dataService.registerConfigurationReader(ROOT, wrappedStore); + dataService.registerCommitHandler(ROOT, wrappedStore); + dataService.registerOperationalReader(ROOT, wrappedStore); mountService = new MountPointManagerImpl(); mountService.setDataBroker(dataService);