summaryrefslogtreecommitdiffstats
path: root/infra/minimal-distribution-core/src/main
diff options
context:
space:
mode:
authorMichal Cmarada <michal.cmarada@pantheon.tech>2018-09-25 11:15:35 +0200
committerMichal Cmarada <michal.cmarada@pantheon.tech>2018-09-25 11:22:18 +0200
commit556a0f59abc9b09005d40945bc20948d69e4f98e (patch)
tree76d795ae59aba49521fc4fdc7d65062c946147be /infra/minimal-distribution-core/src/main
parent46bcceb927b1bce07c1c9517f45470703293eb84 (diff)
Bump ODL dependencies to Fluorine (HONEYCOMB-433)
Change-Id: I142ebd2899272feff00abe7d4bae708f093ee3ec Signed-off-by: Michal Cmarada <michal.cmarada@pantheon.tech>
Diffstat (limited to 'infra/minimal-distribution-core/src/main')
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataStoreProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistedConfigInitializerProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/PersistedContextInitializerProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/oper/ReadableDTDelegProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java49
-rw-r--r--infra/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml14
11 files changed, 45 insertions, 54 deletions
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<InMemoryDOMDataStore> {
@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<DataTree> {
@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<ModifiableDataManager> {
@@ -33,7 +33,7 @@ public final class ModifiableDTDelegProvider extends ProviderTrait<ModifiableDat
@Inject
private BindingToNormalizedNodeCodec serializer;
@Inject
- private SchemaService schemaService;
+ private DOMSchemaService schemaService;
@Inject
@Named(ConfigAndOperationalPipelineModule.HONEYCOMB_CONFIG)
private DataTree dataTree;
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistedConfigInitializerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistedConfigInitializerProvider.java
index aef0819a6..bb2eb3f2a 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistedConfigInitializerProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistedConfigInitializerProvider.java
@@ -26,12 +26,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 PersistedConfigInitializerProvider extends ProviderTrait<RestoringInitializer> {
@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<DataTree> {
@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<RestoringInitializer> {
@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<ReadableDataManager> {
@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<ModifiableDataManager> {
@@ -40,7 +40,7 @@ public final class ModifiableDTDelegInitProvider extends ProviderTrait<Modifiabl
@Named(ContextPipelineModule.HONEYCOMB_CONTEXT)
private DataBroker contextBroker;
@Inject
- private SchemaService schemaService;
+ private DOMSchemaService schemaService;
@Override
public ModifiableDataTreeDelegator create() {
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java
index 7e6b89df7..f15997f74 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java
@@ -19,15 +19,15 @@ package io.fd.honeycomb.infra.distro.schema;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
public class SchemaModule extends AbstractModule {
@Override
protected void configure() {
bind(ModuleInfoBackedContext.class).toProvider(ModuleInfoBackedCtxProvider.class).in(Singleton.class);
- bind(SchemaService.class).toProvider(SchemaServiceProvider.class).in(Singleton.class);
+ bind(DOMSchemaService.class).toProvider(SchemaServiceProvider.class).in(Singleton.class);
bind(BindingToNormalizedNodeCodec.class).toProvider(SerializerProvider.class).in(Singleton.class);
}
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
index fe1006df1..22fe023de 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
@@ -16,60 +16,55 @@
package io.fd.honeycomb.infra.distro.schema;
+import com.google.common.collect.ClassToInstanceMap;
+import com.google.common.collect.ImmutableClassToInstanceMap;
+import com.google.common.util.concurrent.ListenableFuture;
import com.google.inject.Inject;
import io.fd.honeycomb.binding.init.ProviderTrait;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaServiceExtension;
+import org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
+import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
+import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
-// TODO: provide DOMSchemaService instead, but first Netconf's RestconfProviderImpl should not use it
-public final class SchemaServiceProvider extends ProviderTrait<SchemaService> {
+public final class SchemaServiceProvider extends ProviderTrait<DOMSchemaService> {
@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<SchemaContextListener> registerSchemaContextListener(
final SchemaContextListener listener) {
- listener.onGlobalContextUpdated(schemaContext);
+ listener.onGlobalContextUpdated(moduleInfoBackedContext.getSchemaContext());
return new ListenerRegistration<SchemaContextListener>() {
@Override
public void close() {}
@@ -81,5 +76,15 @@ public final class SchemaServiceProvider extends ProviderTrait<SchemaService> {
};
}
+
+ @Override
+ public ClassToInstanceMap<DOMSchemaServiceExtension> getExtensions() {
+ return ImmutableClassToInstanceMap.of(DOMYangTextSourceProvider.class, this);
+ }
+
+ @Override
+ public ListenableFuture<? extends YangTextSchemaSource> 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">
- <servlet>
- <servlet-name>JAXRSRestconf</servlet-name>
- <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.opendaylight.netconf.sal.rest.impl.RestconfApplication</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>JAXRSRestconf</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
<filter>
<filter-name>cross-origin-restconf</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>