summaryrefslogtreecommitdiffstats
path: root/infra/minimal-distribution
diff options
context:
space:
mode:
Diffstat (limited to 'infra/minimal-distribution')
-rw-r--r--infra/minimal-distribution/pom.xml48
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java1
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java3
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java27
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java35
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java2
-rw-r--r--infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml2
11 files changed, 54 insertions, 76 deletions
diff --git a/infra/minimal-distribution/pom.xml b/infra/minimal-distribution/pom.xml
index 4094c56e9..a03e3a97e 100644
--- a/infra/minimal-distribution/pom.xml
+++ b/infra/minimal-distribution/pom.xml
@@ -61,123 +61,111 @@
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
<groupId>net.jmob</groupId>
<artifactId>guice.conf</artifactId>
- <version>${guice.config.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
- <version>${guice.version}</version>
</dependency>
<!-- ODL -->
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
- <version>${yangtools.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
- <version>${mdsal.version}</version>
</dependency>
<!-- ODL-Restconf -->
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>sal-rest-connector</artifactId>
- <version>${restconf.version}</version>
</dependency>
<!-- ODL-Netconf -->
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-impl</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-ssh</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>mdsal-netconf-notification</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>mdsal-netconf-monitoring</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>mdsal-netconf-connector</artifactId>
- <version>${netconf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>ietf-netconf-monitoring</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>ietf-netconf-monitoring-extension</artifactId>
</dependency>
<!-- Jersey + Jetty for RESTCONF -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <version>${servlet.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
- <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
- <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
- <version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
- <version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
- <version>${jersey.version}</version>
+ </dependency>
+
+ <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>compile</scope>
</dependency>
<!-- HC -->
<dependency>
- <groupId>io.fd.honeycomb</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>data-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.fd.honeycomb</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>honeycomb-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.fd.honeycomb</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>notification-impl</artifactId>
<version>${project.version}</version>
</dependency>
-
- <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>${osgi.core.version}</version>
- <scope>compile</scope>
- </dependency>
</dependencies>
-
</project>
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
index d43e33096..c592fd3b3 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
@@ -69,7 +69,6 @@ public final class Main {
private Main() {}
public static void main(String[] args) {
- // TODO add "clean" argument
init(BASE_MODULES);
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
index e25cb1569..f2e81a9f6 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
@@ -59,9 +59,9 @@ public final class HoneycombNotificationManagerProvider extends ProviderTrait<No
new NotificationProducerTracker(notificationProducerRegistry, honeycombNotificationCollector,
notificationRouter);
- // TODO wire with restconf
// DOMNotificationService is already provided by DOMBroker injected into RESTCONF, however RESTCONF
- // only supports data-change notification, nothing else. So currently its impossible.
+ // only supports data-change notification, nothing else. So currently (Beryllium-SR2) honeycomb notifications
+ // won't be available over RESTCONF.
return honeycombNotificationCollector;
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
index 7db2f7856..f5f04d2a7 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
@@ -49,7 +49,7 @@ public final class InmemoryDOMDataBrokerProvider extends ProviderTrait<DOMDataBr
ExecutorService listenableFutureExecutor =
SpecialExecutors.newBlockingBoundedCachedThreadPool(1, 100, "commits");
ExecutorService commitExecutor = SpecialExecutors.newBoundedSingleThreadExecutor(100, "WriteTxCommit");
- // TODO try to provide more lightweight implementation of DataBroker, maybe a single executor would be enough
+ // TODO HONEYCOMB-164 try to provide more lightweight implementation of DataBroker
Map<LogicalDatastoreType, DOMStore> map = new LinkedHashMap<>();
map.put(LogicalDatastoreType.CONFIGURATION, cfgDataStore);
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java
index 3954af896..f60366c7e 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java
@@ -68,7 +68,7 @@ public final class HoneycombNotification2NetconfProvider
new TranslatingNotificationListener(netconfNotifReg, streamType, schemaService);
// NotificationManager is used to provide list of available notifications (which are all of the notifications registered)
- // TODO make available notifications configurable here so that any number of notification streams for HONEYCOMB_NETCONF
+ // TODO HONEYCOMB-165 make available notifications configurable here so that any number of notification streams for netconf
// can be configured on top of a single notification manager
LOG.debug("Current notifications to be exposed over HONEYCOMB_NETCONF: {}",
hcNotificationCollector.getNotificationTypes());
@@ -77,7 +77,7 @@ public final class HoneycombNotification2NetconfProvider
.collect(Collectors.toList());
// Register as listener to HC'OPERATIONAL DOM notification service
- // TODO This should only be triggered when HONEYCOMB_NETCONF notifications are activated
+ // TODO HONEYCOMB-166 This should only be triggered when HONEYCOMB_NETCONF notifications are activated
// Because this way we actually start all notification producers
// final Collection<QName> notificationQNames =
ListenerRegistration<DOMNotificationListener> domNotifListenerReg = notificationRouter
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java
index 9beb10dbc..3466362cf 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java
@@ -29,6 +29,7 @@ import io.fd.honeycomb.infra.distro.data.HoneycombNotificationManagerProvider;
import io.fd.honeycomb.infra.distro.data.InmemoryDOMDataBrokerProvider;
import io.fd.honeycomb.notification.NotificationCollector;
import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.util.HashedWheelTimer;
import io.netty.util.Timer;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -118,7 +119,7 @@ public class NetconfModule extends PrivateModule {
*/
private AnnotatedElementBuilder configureServer() {
bind(NioEventLoopGroup.class).toProvider(NettyThreadGroupProvider.class).in(Singleton.class);
- bind(Timer.class).toProvider(NettyTimerProvider.class).in(Singleton.class);
+ bind(Timer.class).toInstance(new HashedWheelTimer());
bind(NetconfServerDispatcher.class).toProvider(NetconfServerDispatcherProvider.class).in(Singleton.class);
bind(NetconfTcpServerProvider.NetconfTcpServer.class).toProvider(NetconfTcpServerProvider.class)
.in(Singleton.class);
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java
index 583b15055..3a4c13697 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java
@@ -18,10 +18,15 @@ package io.fd.honeycomb.infra.distro.netconf;
import com.google.inject.Inject;
import com.google.inject.name.Named;
-import io.fd.honeycomb.impl.NetconfMonitoringReaderFactory;
import io.fd.honeycomb.infra.distro.ProviderTrait;
import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
+import io.fd.honeycomb.translate.util.read.BindingBrokerReader;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class NetconfMonitoringReaderFactoryProvider extends ProviderTrait<ReaderFactory> {
@@ -34,4 +39,24 @@ public final class NetconfMonitoringReaderFactoryProvider extends ProviderTrait<
protected NetconfMonitoringReaderFactory create() {
return new NetconfMonitoringReaderFactory(netconfDataBroker);
}
+
+ /**
+ * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader into NETCONF's dedicated data store.
+ * Making NETCONF operational data available over NETCONF/RESTCONF
+ */
+ private static final class NetconfMonitoringReaderFactory implements ReaderFactory {
+
+ private final DataBroker netconfMonitoringBindingBrokerDependency;
+
+ NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) {
+ this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency;
+ }
+
+ @Override
+ public void init(final ModifiableReaderRegistryBuilder registry) {
+ registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class),
+ netconfMonitoringBindingBrokerDependency,
+ LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class));
+ }
+ }
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java
index 0b3be9f1f..2c1eceeaf 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java
@@ -75,7 +75,7 @@ public final class NetconfSshServerProvider extends ProviderTrait<NetconfSshServ
final SshProxyServerConfigurationBuilder sshConfigBuilder = new SshProxyServerConfigurationBuilder();
sshConfigBuilder.setBindingAddress(bindingAddress);
sshConfigBuilder.setLocalAddress(localAddress);
- // TODO only simple authProvider checking ConfigAttributes
+ // Only simple authProvider checking ConfigAttributes, checking the config file
sshConfigBuilder.setAuthenticator(new SimplelAuthProvider(cfgAttributes));
sshConfigBuilder.setIdleTimeout(Integer.MAX_VALUE);
sshConfigBuilder.setKeyPairProvider(new PEMGeneratorHostKeyProvider());
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java
deleted file mode 100644
index 6ae960cea..000000000
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.infra.distro.netconf;
-
-import com.google.inject.Inject;
-import io.fd.honeycomb.infra.distro.ProviderTrait;
-import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration;
-import io.netty.util.HashedWheelTimer;
-import io.netty.util.Timer;
-
-public final class NettyTimerProvider extends ProviderTrait<Timer> {
-
- @Inject
- private HoneycombConfiguration cfgAttributes;
-
- @Override
- protected HashedWheelTimer create() {
- // TODO expose configuration,
- return new HashedWheelTimer();
- }
-}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java
index 76fc72f3f..8dca157a6 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java
@@ -53,7 +53,7 @@ public final class HttpsConnectorProvider extends ProviderTrait<ServerConnector>
URL truststoreURL = getClass().getResource(cfg.restconfTruststore.get());
sslContextFactory.setTrustStorePath(truststoreURL.getPath());
sslContextFactory.setTrustStorePassword((cfg.truststorePassword.get()));
- // TODO make this more configurable
+ // TODO HONEYCOMB-167 make this more configurable
sslContextFactory.setExcludeCipherSuites("SSL_RSA_WITH_DES_CBC_SHA", "SSL_DHE_RSA_WITH_DES_CBC_SHA",
"SSL_DHE_DSS_WITH_DES_CBC_SHA", "SSL_RSA_EXPORT_WITH_RC4_40_MD5", "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
"SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA");
diff --git a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
index 7e59a1a7d..45fcce741 100644
--- a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
+++ b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
@@ -42,7 +42,7 @@
<param-value>application/xml,application/yang.data+xml,xml,application/json,application/yang.data+json</param-value>
</init-param>
</filter>
- <!-- FIXME gzip filter is deprecated -->
+ <!-- TODO HONEYCOMB-168 gzip filter is deprecated -->
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>/*</url-pattern>