aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-core
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-02-15 12:59:26 +0100
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-02-19 12:51:46 +0100
commit82b27ff5bccc925fe03d05f259cf881fafc8a1ce (patch)
treed128931c70c19184d7b259d295ce39deeec370c3 /sources/hv-collector-core
parentdc47bd1847a46fe0ad0ca6c10a4d61f829f4c0c6 (diff)
Use SDK/SSL in HV-VES
Issue-ID: DCAEGEN2-1226 Change-Id: I7cfc09001f7315c1b6f4fcf150ad631630c810ef Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'sources/hv-collector-core')
-rw-r--r--sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt4
-rw-r--r--sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt1
-rw-r--r--sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt7
3 files changed, 5 insertions, 7 deletions
diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt
index 2e6bb4dc..31c06364 100644
--- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt
+++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt
@@ -24,7 +24,7 @@ import org.onap.dcae.collectors.veshv.boundary.Metrics
import org.onap.dcae.collectors.veshv.boundary.Server
import org.onap.dcae.collectors.veshv.impl.socket.NettyTcpServer
import org.onap.dcae.collectors.veshv.model.ServerConfiguration
-import org.onap.dcae.collectors.veshv.ssl.boundary.ServerSslContextFactory
+import org.onap.dcae.collectors.veshv.ssl.boundary.SslContextFactory
/**
* @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
@@ -34,5 +34,5 @@ object ServerFactory {
fun createNettyTcpServer(serverConfiguration: ServerConfiguration,
collectorProvider: CollectorProvider,
metrics: Metrics): Server =
- NettyTcpServer(serverConfiguration, ServerSslContextFactory(), collectorProvider, metrics)
+ NettyTcpServer(serverConfiguration, SslContextFactory(), collectorProvider, metrics)
}
diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt
index 51f7410b..8d154091 100644
--- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt
+++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt
@@ -22,7 +22,6 @@ package org.onap.dcae.collectors.veshv.impl.adapters
import io.netty.handler.codec.http.HttpStatusClass
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.onap.dcae.collectors.veshv.utils.logging.OnapMdc
-import org.slf4j.LoggerFactory
import reactor.core.publisher.Mono
import reactor.netty.http.client.HttpClient
import java.util.*
diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt
index 0d07d167..16edb55f 100644
--- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt
+++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt
@@ -19,7 +19,6 @@
*/
package org.onap.dcae.collectors.veshv.impl.socket
-import arrow.core.Try
import arrow.core.getOrElse
import arrow.effects.IO
import org.onap.dcae.collectors.veshv.boundary.Collector
@@ -31,7 +30,7 @@ import org.onap.dcae.collectors.veshv.impl.adapters.ClientContextLogging.info
import org.onap.dcae.collectors.veshv.model.ClientContext
import org.onap.dcae.collectors.veshv.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.model.ServiceContext
-import org.onap.dcae.collectors.veshv.ssl.boundary.ServerSslContextFactory
+import org.onap.dcae.collectors.veshv.ssl.boundary.SslContextFactory
import org.onap.dcae.collectors.veshv.utils.NettyServerHandle
import org.onap.dcae.collectors.veshv.utils.ServerHandle
import org.onap.dcae.collectors.veshv.utils.logging.Logger
@@ -50,7 +49,7 @@ import java.time.Duration
* @since May 2018
*/
internal class NettyTcpServer(private val serverConfig: ServerConfiguration,
- private val sslContextFactory: ServerSslContextFactory,
+ private val sslContextFactory: SslContextFactory,
private val collectorProvider: CollectorProvider,
private val metrics: Metrics) : Server {
@@ -68,7 +67,7 @@ internal class NettyTcpServer(private val serverConfig: ServerConfiguration,
private fun TcpServer.configureSsl() =
sslContextFactory
- .createSslContext(serverConfig.securityConfiguration)
+ .createServerContext(serverConfig.securityConfiguration)
.map { sslContext ->
logger.info { "Collector configured with SSL enabled" }
this.secure { b -> b.sslContext(sslContext) }