From 556a0f59abc9b09005d40945bc20948d69e4f98e Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Tue, 25 Sep 2018 11:15:35 +0200 Subject: Bump ODL dependencies to Fluorine (HONEYCOMB-433) Change-Id: I142ebd2899272feff00abe7d4bae708f093ee3ec Signed-off-by: Michal Cmarada --- .../infra/distro/data/DataStoreProvider.java | 4 +- .../infra/distro/data/DataTreeProvider.java | 4 +- .../distro/data/ModifiableDTDelegProvider.java | 4 +- .../data/PersistedConfigInitializerProvider.java | 4 +- .../distro/data/PersistingDataTreeProvider.java | 4 +- .../PersistedContextInitializerProvider.java | 4 +- .../distro/data/oper/ReadableDTDelegProvider.java | 4 +- .../initializer/ModifiableDTDelegInitProvider.java | 4 +- .../infra/distro/schema/SchemaModule.java | 4 +- .../infra/distro/schema/SchemaServiceProvider.java | 49 ++++++++++++---------- .../config/WEB-INF/web.xml | 14 ------- 11 files changed, 45 insertions(+), 54 deletions(-) (limited to 'infra/minimal-distribution-core/src') diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataStoreProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataStoreProvider.java index 82b1ed32c..1dd554fc9 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataStoreProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataStoreProvider.java @@ -21,12 +21,12 @@ import io.fd.honeycomb.binding.init.ProviderTrait; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; public final class DataStoreProvider extends ProviderTrait { @Inject - private SchemaService schemaService; + private DOMSchemaService schemaService; private String name; private LogicalDatastoreType type; diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java index 34d3916fc..5f5ef66aa 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java @@ -19,7 +19,7 @@ package io.fd.honeycomb.infra.distro.data; import com.google.inject.Inject; import io.fd.honeycomb.binding.init.ProviderTrait; import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguration; import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; @@ -27,7 +27,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFac public abstract class DataTreeProvider extends ProviderTrait { @Inject - private SchemaService schemaService; + private DOMSchemaService schemaService; @Inject private HoneycombConfiguration config; diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java index 419130cc1..6e3874788 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java @@ -25,7 +25,7 @@ import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; import io.fd.honeycomb.translate.write.registry.WriterRegistry; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; public final class ModifiableDTDelegProvider extends ProviderTrait { @@ -33,7 +33,7 @@ public final class ModifiableDTDelegProvider extends ProviderTrait { @Inject - private SchemaService schemaService; + private DOMSchemaService schemaService; @Inject protected HoneycombConfiguration cfgAttributes; @Inject diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java index 9da3a000b..df56f4667 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java @@ -23,14 +23,14 @@ import io.fd.honeycomb.data.impl.PersistingDataTreeAdapter; import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; import java.nio.file.Paths; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType; public abstract class PersistingDataTreeProvider extends ProviderTrait { @Inject - private SchemaService schemaService; + private DOMSchemaService schemaService; @Inject protected HoneycombConfiguration config; diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/PersistedContextInitializerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/PersistedContextInitializerProvider.java index 6d256d822..d4a795b8c 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/PersistedContextInitializerProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/PersistedContextInitializerProvider.java @@ -23,12 +23,12 @@ import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; import java.nio.file.Paths; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; final class PersistedContextInitializerProvider extends ProviderTrait { @Inject - private SchemaService schemaService; + private DOMSchemaService schemaService; @Inject protected HoneycombConfiguration cfgAttributes; // injects data broker from within context of private module diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/oper/ReadableDTDelegProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/oper/ReadableDTDelegProvider.java index cdd3596d8..ddad2e3cd 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/oper/ReadableDTDelegProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/oper/ReadableDTDelegProvider.java @@ -25,14 +25,14 @@ import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; import io.fd.honeycomb.translate.read.registry.ReaderRegistry; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; public final class ReadableDTDelegProvider extends ProviderTrait { @Inject private BindingToNormalizedNodeCodec serializer; @Inject - private SchemaService schemaService; + private DOMSchemaService schemaService; @Inject private ReaderRegistry registry; @Inject diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java index 2ac315f8f..34ac0671e 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java @@ -26,7 +26,7 @@ import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; import io.fd.honeycomb.translate.util.write.NoopWriterRegistry; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; public final class ModifiableDTDelegInitProvider extends ProviderTrait { @@ -40,7 +40,7 @@ public final class ModifiableDTDelegInitProvider extends ProviderTrait { +public final class SchemaServiceProvider extends ProviderTrait { @Inject private ModuleInfoBackedContext mibCtx; @Override public StaticSchemaService create() { - return new StaticSchemaService(mibCtx.getSchemaContext()); + return new StaticSchemaService(mibCtx); } /** * Static schema context provider service. */ - private static final class StaticSchemaService implements SchemaService { - private final SchemaContext schemaContext; + private static final class StaticSchemaService implements DOMSchemaService, DOMYangTextSourceProvider { + private final ModuleInfoBackedContext moduleInfoBackedContext; - StaticSchemaService(SchemaContext schemaContext) { - this.schemaContext = schemaContext; - } - - @Override - public void addModule(final Module module) { - throw new UnsupportedOperationException("Static service"); - } - - @Override - public void removeModule(final Module module) { - throw new UnsupportedOperationException("Static service"); + StaticSchemaService(ModuleInfoBackedContext moduleInfoBackedContext) { + this.moduleInfoBackedContext = moduleInfoBackedContext; } @Override public SchemaContext getSessionContext() { - return schemaContext; + return moduleInfoBackedContext.getSchemaContext(); } @Override public SchemaContext getGlobalContext() { - return schemaContext; + return moduleInfoBackedContext.getSchemaContext(); } @Override public ListenerRegistration registerSchemaContextListener( final SchemaContextListener listener) { - listener.onGlobalContextUpdated(schemaContext); + listener.onGlobalContextUpdated(moduleInfoBackedContext.getSchemaContext()); return new ListenerRegistration() { @Override public void close() {} @@ -81,5 +76,15 @@ public final class SchemaServiceProvider extends ProviderTrait { }; } + + @Override + public ClassToInstanceMap getExtensions() { + return ImmutableClassToInstanceMap.of(DOMYangTextSourceProvider.class, this); + } + + @Override + public ListenableFuture getSource(final SourceIdentifier sourceIdentifier) { + return moduleInfoBackedContext.getSource(sourceIdentifier); + } } } diff --git a/infra/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml b/infra/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml index 6cf487170..b5d2c8ba2 100644 --- a/infra/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml +++ b/infra/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml @@ -19,20 +19,6 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> - - JAXRSRestconf - com.sun.jersey.spi.container.servlet.ServletContainer - - javax.ws.rs.Application - org.opendaylight.netconf.sal.rest.impl.RestconfApplication - - 1 - - - - JAXRSRestconf - /* - cross-origin-restconf org.eclipse.jetty.servlets.CrossOriginFilter -- cgit 1.2.3-korg