</parent>
<artifactId>hv-collector-analysis</artifactId>
- <version>1.1.0-SNAPSHOT</version>
<description>VES HighVolume Collector :: Code analysis configuration</description>
<dependencies>
<artifactId>hv-collector-commandline</artifactId>
<version>${project.parent.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.parent.groupId}</groupId>
+ <artifactId>hv-collector-configuration</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>hv-collector-core</artifactId>
</parent>
<artifactId>hv-collector-build</artifactId>
- <version>1.1.0-SNAPSHOT</version>
<description>VES HighVolume Collector :: Build-time modules</description>
<packaging>pom</packaging>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<artifactId>hv-collector-sources</artifactId>
<groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
<artifactId>hv-collector-commandline</artifactId>
+ <description>VES HighVolume Collector :: Command Line</description>
<build>
<plugins>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ ============LICENSE_START=======================================================
+ ~ dcaegen2-collectors-veshv
+ ~ ================================================================================
+ ~ Copyright (C) 2019 NOKIA
+ ~ ================================================================================
+ ~ 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.
+ ~ ============LICENSE_END=========================================================
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ </license>
+ </licenses>
+
+ <parent>
+ <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
+ <artifactId>hv-collector-sources</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>hv-collector-configuration</artifactId>
+ <description>VES HighVolume Collector :: Configuration</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-commandline</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-ssl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-test-utils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
+ <artifactId>cbs-client</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib-jdk8</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * dcaegen2-collectors-veshv
+ * ================================================================================
+ * Copyright (C) 2019 NOKIA
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.dcae.collectors.veshv.config.api
+
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
+import org.onap.dcae.collectors.veshv.config.impl.ArgVesHvConfiguration
+import reactor.core.publisher.Flux
+
+class ConfigurationModule {
+ fun createConfigurationFromCommandLine(args: Array<String>) =
+ ArgVesHvConfiguration().parse(args)
+
+ fun hvVesConfigurationUpdates(): Flux<ServerConfiguration> = Flux.never<ServerConfiguration>()
+}
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.config.api.model
/**
* @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.config.api.model
import java.time.Duration
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.config.api.model
/**
* @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.config.api.model
-import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
+import org.onap.dcae.collectors.veshv.ssl.boundary.SecurityConfiguration
import org.onap.dcae.collectors.veshv.utils.logging.LogLevel
import java.net.InetSocketAddress
import java.time.Duration
* @since May 2018
*/
data class ServerConfiguration(
- val serverListenAddress: InetSocketAddress,
- val kafkaConfiguration: KafkaConfiguration,
- val configurationProviderParams: ConfigurationProviderParams,
- val securityConfiguration: SecurityConfiguration,
- val idleTimeout: Duration,
- val healthCheckApiListenAddress: InetSocketAddress,
- val maximumPayloadSizeBytes: Int,
- val logLevel: LogLevel,
- val dummyMode: Boolean = false
+ val serverListenAddress: InetSocketAddress,
+ val kafkaConfiguration: KafkaConfiguration,
+ val configurationProviderParams: ConfigurationProviderParams,
+ val securityConfiguration: SecurityConfiguration,
+ val idleTimeout: Duration,
+ val healthCheckApiListenAddress: InetSocketAddress,
+ val maximumPayloadSizeBytes: Int,
+ val logLevel: LogLevel,
+ val dummyMode: Boolean = false
)
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.config.api.model
import arrow.core.Option
-import org.onap.dcae.collectors.veshv.utils.logging.Logger
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.ves.VesEventOuterClass.CommonEventHeader
data class Routing(val routes: List<Route>) {
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main
+package org.onap.dcae.collectors.veshv.config.impl
import arrow.core.Option
import arrow.core.fix
import org.onap.dcae.collectors.veshv.commandline.intValue
import org.onap.dcae.collectors.veshv.commandline.longValue
import org.onap.dcae.collectors.veshv.commandline.stringValue
+import org.onap.dcae.collectors.veshv.config.api.model.ConfigurationProviderParams
+import org.onap.dcae.collectors.veshv.config.api.model.KafkaConfiguration
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
-import org.onap.dcae.collectors.veshv.model.ConfigurationProviderParams
-import org.onap.dcae.collectors.veshv.model.KafkaConfiguration
-import org.onap.dcae.collectors.veshv.model.ServerConfiguration
-import org.onap.dcae.collectors.veshv.model.ServiceContext
import org.onap.dcae.collectors.veshv.ssl.boundary.createSecurityConfiguration
import org.onap.dcae.collectors.veshv.utils.arrow.doOnFailure
import org.onap.dcae.collectors.veshv.utils.logging.LogLevel
val dummyMode = cmdLine.hasOption(DUMMY_MODE)
val security = createSecurityConfiguration(cmdLine)
.doOnFailure { ex ->
- logger.withError(ServiceContext::mdc) {
- log("Could not read security keys", ex)
- }
+ logger.withError { log("Could not read security keys", ex) }
}
.toOption()
.bind()
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config
+package org.onap.dcae.collectors.veshv.config.impl
import arrow.core.Option
import com.google.gson.GsonBuilder
-import org.onap.dcae.collectors.veshv.main.config.adapters.*
-import org.onap.dcae.collectors.veshv.model.Route
-import org.onap.dcae.collectors.veshv.model.Routing
+import org.onap.dcae.collectors.veshv.config.api.model.Route
+import org.onap.dcae.collectors.veshv.config.api.model.Routing
+import org.onap.dcae.collectors.veshv.config.impl.gsonadapters.AddressAdapter
+import org.onap.dcae.collectors.veshv.config.impl.gsonadapters.OptionAdapter
+import org.onap.dcae.collectors.veshv.config.impl.gsonadapters.RouteAdapter
+import org.onap.dcae.collectors.veshv.config.impl.gsonadapters.RoutingAdapter
+import org.onap.dcae.collectors.veshv.config.impl.gsonadapters.SecurityKeysAdapter
import org.onap.dcaegen2.services.sdk.security.ssl.SecurityKeys
import java.io.Reader
import java.net.InetSocketAddress
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since February 2019
*/
-class ConfigFactory {
+internal class FileConfigurationReader {
private val gson = GsonBuilder()
.registerTypeAdapter(InetSocketAddress::class.java, AddressAdapter())
.registerTypeAdapter(Route::class.java, RouteAdapter())
.create()
fun loadConfig(input: Reader): PartialConfiguration =
- gson.fromJson(input, PartialConfiguration::class.java)
+ gson.fromJson(input, PartialConfiguration::class.java)
}
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config
+package org.onap.dcae.collectors.veshv.config.impl
import arrow.core.Option
-import org.onap.dcae.collectors.veshv.model.Routing
+import org.onap.dcae.collectors.veshv.config.api.model.Routing
import org.onap.dcae.collectors.veshv.utils.logging.LogLevel
import org.onap.dcaegen2.services.sdk.security.ssl.SecurityKeys
import java.net.InetSocketAddress
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since February 2019
*/
-data class PartialConfiguration(
+internal data class PartialConfiguration(
val server : Option<PartialServerConfig>,
val cbs : Option<PartialCbsConfig>,
val security : Option<PartialSecurityConfig>,
val kafka : Option<PartialKafkaConfig>,
val logLevel : Option<LogLevel>
)
-data class PartialSecurityConfig(
- val sslDisable : Option<Boolean>,
- val keys : Option<SecurityKeys>)
-data class PartialCbsConfig(
- val firstRequestDelaySec : Option<Int>,
- val requestIntervalSec : Option<Int>
-)
-
-data class PartialServerConfig(
+internal data class PartialServerConfig(
val healthCheckApiPort : Option<Int>,
val listenPort : Option<Int>,
val idleTimeoutSec : Option<Int>,
val dummyMode : Option<Boolean>
)
-data class PartialKafkaConfig(
+internal data class PartialCbsConfig(
+ val firstRequestDelaySec : Option<Int>,
+ val requestIntervalSec : Option<Int>
+)
+
+internal data class PartialSecurityConfig(
+ val sslDisable : Option<Boolean>,
+ val keys : Option<SecurityKeys>)
+
+internal data class PartialKafkaConfig(
val kafkaServers : Option<Array<InetSocketAddress>>,
val routing : Option<Routing>
)
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config.adapters
+package org.onap.dcae.collectors.veshv.config.impl.gsonadapters
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since February 2019
*/
-class AddressAdapter : JsonDeserializer<InetSocketAddress> {
+internal class AddressAdapter : JsonDeserializer<InetSocketAddress> {
override fun deserialize(
json: JsonElement,
typeOfT: Type,
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config.adapters
+package org.onap.dcae.collectors.veshv.config.impl.gsonadapters
import arrow.core.Option
import com.google.gson.JsonDeserializationContext
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since March 2019
*/
-class OptionAdapter : JsonDeserializer<Option<Any>> {
+internal class OptionAdapter : JsonDeserializer<Option<Any>> {
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Option<Any> {
val parametrizedType = typeOfT as ParameterizedType
val typeParameter = parametrizedType.actualTypeArguments.first()
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config.adapters
+package org.onap.dcae.collectors.veshv.config.impl.gsonadapters
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
import com.google.gson.JsonElement
-import org.onap.dcae.collectors.veshv.model.Route
-import org.onap.dcae.collectors.veshv.model.RouteBuilder
+import org.onap.dcae.collectors.veshv.config.api.model.Route
+import org.onap.dcae.collectors.veshv.config.api.model.RouteBuilder
import java.lang.reflect.Type
/**
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since March 2019
*/
-class RouteAdapter : JsonDeserializer<Route> {
+internal class RouteAdapter : JsonDeserializer<Route> {
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext?): Route {
val jobj = json.asJsonObject
return RouteBuilder()
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config.adapters
+package org.onap.dcae.collectors.veshv.config.impl.gsonadapters
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
import com.google.gson.JsonElement
import com.google.gson.reflect.TypeToken
-import org.onap.dcae.collectors.veshv.model.Route
-import org.onap.dcae.collectors.veshv.model.Routing
+import org.onap.dcae.collectors.veshv.config.api.model.Route
+import org.onap.dcae.collectors.veshv.config.api.model.Routing
import java.lang.reflect.Type
/**
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since March 2019
*/
-class RoutingAdapter : JsonDeserializer<Routing> {
+internal class RoutingAdapter : JsonDeserializer<Routing> {
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Routing {
val parametrizedType = TypeToken.getParameterized(List::class.java, Route::class.java).type
return Routing(context.deserialize<List<Route>>(json, parametrizedType))
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main.config.adapters
+package org.onap.dcae.collectors.veshv.config.impl.gsonadapters
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since March 2019
*/
-class SecurityKeysAdapter : JsonDeserializer<SecurityKeys> {
+internal class SecurityKeysAdapter : JsonDeserializer<SecurityKeys> {
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext?): SecurityKeys {
val obj = json.asJsonObject
return ImmutableSecurityKeys.builder()
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main
+package org.onap.dcae.collectors.veshv.config.api
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
import org.onap.dcae.collectors.veshv.commandline.WrongArgumentError
-import org.onap.dcae.collectors.veshv.model.ServerConfiguration
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
+import org.onap.dcae.collectors.veshv.config.impl.ArgVesHvConfiguration
import org.onap.dcae.collectors.veshv.tests.utils.parseExpectingFailure
import org.onap.dcae.collectors.veshv.tests.utils.parseExpectingSuccess
import org.onap.dcae.collectors.veshv.utils.logging.LogLevel
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.main
+package org.onap.dcae.collectors.veshv.config.api
import arrow.core.Some
import org.jetbrains.spek.api.Spek
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
-import org.onap.dcae.collectors.veshv.main.config.*
-import org.onap.dcae.collectors.veshv.model.Routing
+import org.onap.dcae.collectors.veshv.config.api.model.Routing
+import org.onap.dcae.collectors.veshv.config.impl.FileConfigurationReader
+import org.onap.dcae.collectors.veshv.config.impl.PartialCbsConfig
+import org.onap.dcae.collectors.veshv.config.impl.PartialKafkaConfig
+import org.onap.dcae.collectors.veshv.config.impl.PartialSecurityConfig
+import org.onap.dcae.collectors.veshv.config.impl.PartialServerConfig
import org.onap.dcae.collectors.veshv.utils.logging.LogLevel
import java.io.InputStreamReader
import java.io.StringReader
* @author Pawel Biniek <pawel.biniek@nokia.com>
* @since February 2019
*/
-internal object ConfigFactoryTest : Spek({
+internal object FileConfigurationReaderTest : Spek({
describe("A configuration loader utility") {
describe("partial configuration loading") {
it("parses enumerations") {
val input = """{"logLevel":"ERROR"}"""
- val config = ConfigFactory().loadConfig(StringReader(input))
+ val config = FileConfigurationReader().loadConfig(StringReader(input))
assertThat(config.logLevel).isEqualTo(Some(LogLevel.ERROR))
}
}
}
""".trimIndent()
- val config = ConfigFactory().loadConfig(StringReader(input))
+ val config = FileConfigurationReader().loadConfig(StringReader(input))
assertThat(config.server.nonEmpty()).isTrue()
assertThat(config.server.orNull()?.healthCheckApiPort).isEqualTo(Some(12002))
assertThat(config.server.orNull()?.listenPort).isEqualTo(Some(12003))
}
}"""
- val config = ConfigFactory().loadConfig(StringReader(input))
+ val config = FileConfigurationReader().loadConfig(StringReader(input))
assertThat(config.kafka.nonEmpty()).isTrue()
val kafka = config.kafka.orNull() as PartialKafkaConfig
assertThat(kafka.kafkaServers.nonEmpty()).isTrue()
]
}
}""".trimIndent()
- val config = ConfigFactory().loadConfig(StringReader(input))
+ val config = FileConfigurationReader().loadConfig(StringReader(input))
assertThat(config.kafka.nonEmpty()).isTrue()
val kafka = config.kafka.orNull() as PartialKafkaConfig
assertThat(kafka.routing.nonEmpty()).isTrue()
describe("complete file loading") {
it("loads actual file") {
- val config = ConfigFactory().loadConfig(
+ val config = FileConfigurationReader().loadConfig(
InputStreamReader(
- ConfigFactoryTest.javaClass.getResourceAsStream("/sampleConfig.json")))
+ FileConfigurationReaderTest.javaClass.getResourceAsStream("/sampleConfig.json")))
assertThat(config).isNotNull
assertThat(config.logLevel).isEqualTo(Some(LogLevel.ERROR))
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-ssl</artifactId>
+ <artifactId>hv-collector-configuration</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-utils</artifactId>
+ <artifactId>hv-collector-domain</artifactId>
<version>${project.parent.version}</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-domain</artifactId>
+ <artifactId>hv-collector-utils</artifactId>
<version>${project.parent.version}</version>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-test-utils</artifactId>
+ <artifactId>hv-collector-ssl</artifactId>
<version>${project.parent.version}</version>
- <scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
- <artifactId>cbs-client</artifactId>
+ <groupId>${project.parent.groupId}</groupId>
+ <artifactId>hv-collector-test-utils</artifactId>
+ <version>${project.parent.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
*/
package org.onap.dcae.collectors.veshv.boundary
+import org.onap.dcae.collectors.veshv.config.api.model.CollectorConfiguration
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
import org.onap.dcae.collectors.veshv.model.ClientContext
import org.onap.dcae.collectors.veshv.model.ClientRejectionCause
-import org.onap.dcae.collectors.veshv.model.CollectorConfiguration
import org.onap.dcae.collectors.veshv.model.ConsumedMessage
import org.onap.dcae.collectors.veshv.model.MessageDropCause
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import org.onap.dcae.collectors.veshv.utils.Closeable
import reactor.core.publisher.Flux
fun notifyClientRejected(cause: ClientRejectionCause)
}
-interface SinkProvider: Closeable {
+interface SinkProvider : Closeable {
operator fun invoke(ctx: ClientContext): Sink
}
import org.onap.dcae.collectors.veshv.boundary.ConfigurationProvider
import org.onap.dcae.collectors.veshv.boundary.Metrics
import org.onap.dcae.collectors.veshv.boundary.SinkProvider
+import org.onap.dcae.collectors.veshv.config.api.model.CollectorConfiguration
import org.onap.dcae.collectors.veshv.domain.WireFrameDecoder
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthDescription
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthState
import org.onap.dcae.collectors.veshv.impl.VesHvCollector
import org.onap.dcae.collectors.veshv.impl.wire.WireChunkDecoder
import org.onap.dcae.collectors.veshv.model.ClientContext
-import org.onap.dcae.collectors.veshv.model.CollectorConfiguration
import org.onap.dcae.collectors.veshv.model.ServiceContext
import org.onap.dcae.collectors.veshv.utils.arrow.getOption
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.onap.dcae.collectors.veshv.boundary.CollectorProvider
import org.onap.dcae.collectors.veshv.boundary.Metrics
import org.onap.dcae.collectors.veshv.boundary.Server
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
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.SslContextFactory
/**
import arrow.core.Either
import arrow.data.Nel
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
typealias ValidationFailMessage = () -> String
typealias ValidationSuccessMessage = () -> String
package org.onap.dcae.collectors.veshv.impl
import arrow.core.Option
+import org.onap.dcae.collectors.veshv.config.api.model.Routing
import org.onap.dcae.collectors.veshv.model.ClientContext
import org.onap.dcae.collectors.veshv.impl.adapters.ClientContextLogging.debug
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
-import org.onap.dcae.collectors.veshv.model.Routing
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.utils.logging.Logger
class Router(private val routing: Routing, private val ctx: ClientContext) {
package org.onap.dcae.collectors.veshv.impl
import arrow.core.Try
-import org.onap.dcae.collectors.veshv.domain.ByteData
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.ves.VesEventOuterClass.VesEvent
/**
import org.onap.dcae.collectors.veshv.model.MessageDropCause.INVALID_MESSAGE
import org.onap.dcae.collectors.veshv.model.MessageDropCause.ROUTE_NOT_FOUND
import org.onap.dcae.collectors.veshv.model.SuccessfullyConsumedMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.utils.arrow.doOnEmpty
import org.onap.dcae.collectors.veshv.utils.arrow.doOnFailure
import org.onap.dcae.collectors.veshv.utils.arrow.doOnLeft
import org.onap.dcae.collectors.veshv.boundary.ConfigurationProvider
import org.onap.dcae.collectors.veshv.boundary.SinkProvider
+import org.onap.dcae.collectors.veshv.config.api.model.KafkaConfiguration
import org.onap.dcae.collectors.veshv.impl.adapters.kafka.KafkaSinkProvider
-import org.onap.dcae.collectors.veshv.model.ConfigurationProviderParams
-import org.onap.dcae.collectors.veshv.model.KafkaConfiguration
+import org.onap.dcae.collectors.veshv.config.api.model.ConfigurationProviderParams
import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.CbsClientFactory
import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.EnvProperties
import com.google.gson.JsonObject
import org.onap.dcae.collectors.veshv.boundary.ConfigurationProvider
+import org.onap.dcae.collectors.veshv.config.api.model.CollectorConfiguration
+import org.onap.dcae.collectors.veshv.config.api.model.routing
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthDescription
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthState
-import org.onap.dcae.collectors.veshv.model.CollectorConfiguration
-import org.onap.dcae.collectors.veshv.model.ConfigurationProviderParams
+import org.onap.dcae.collectors.veshv.config.api.model.ConfigurationProviderParams
import org.onap.dcae.collectors.veshv.model.ServiceContext
-import org.onap.dcae.collectors.veshv.model.routing
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.onap.dcae.collectors.veshv.utils.logging.onErrorLog
import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.CbsClient
import org.onap.dcae.collectors.veshv.impl.adapters.ClientContextLogging.trace
import org.onap.dcae.collectors.veshv.model.ClientContext
import org.onap.dcae.collectors.veshv.model.ConsumedMessage
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import org.onap.dcae.collectors.veshv.model.SuccessfullyConsumedMessage
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import reactor.core.publisher.Flux
import org.onap.dcae.collectors.veshv.model.ConsumedMessage
import org.onap.dcae.collectors.veshv.model.FailedToConsumeMessage
import org.onap.dcae.collectors.veshv.model.MessageDropCause
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import org.onap.dcae.collectors.veshv.model.SuccessfullyConsumedMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.onap.dcae.collectors.veshv.utils.logging.Marker
import org.onap.ves.VesEventOuterClass.CommonEventHeader
import org.apache.kafka.clients.producer.ProducerConfig.RETRIES_CONFIG
import org.apache.kafka.clients.producer.ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG
import org.onap.dcae.collectors.veshv.boundary.SinkProvider
+import org.onap.dcae.collectors.veshv.config.api.model.KafkaConfiguration
import org.onap.dcae.collectors.veshv.model.ClientContext
-import org.onap.dcae.collectors.veshv.model.KafkaConfiguration
import org.onap.dcae.collectors.veshv.model.ServiceContext
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.onap.ves.VesEventOuterClass.CommonEventHeader
import reactor.kafka.sender.KafkaSender
package org.onap.dcae.collectors.veshv.impl.adapters.kafka
import org.apache.kafka.common.serialization.Serializer
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
/**
* @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
import org.onap.dcae.collectors.veshv.boundary.CollectorProvider
import org.onap.dcae.collectors.veshv.boundary.Metrics
import org.onap.dcae.collectors.veshv.boundary.Server
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.impl.adapters.ClientContextLogging.debug
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.SslContextFactory
import org.onap.dcae.collectors.veshv.utils.NettyServerHandle
*/
package org.onap.dcae.collectors.veshv.model
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import java.lang.Exception
sealed class ConsumedMessage {
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.*
import org.onap.dcae.collectors.veshv.domain.*
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.tests.utils.commonHeader
import org.onap.dcae.collectors.veshv.tests.utils.emptyWireProtocolFrame
import org.onap.dcae.collectors.veshv.tests.utils.wireProtocolFrame
import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
+import org.onap.dcae.collectors.veshv.config.api.model.routing
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.PERF3GPP
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HEARTBEAT
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.SYSLOG
import org.onap.dcae.collectors.veshv.model.ClientContext
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
-import org.onap.dcae.collectors.veshv.model.routing
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.tests.utils.commonHeader
import org.onap.dcae.collectors.veshv.tests.utils.emptyWireProtocolFrame
import org.jetbrains.spek.api.dsl.on
import org.onap.dcae.collectors.veshv.domain.ByteData
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HEARTBEAT
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.tests.utils.commonHeader
import org.onap.dcae.collectors.veshv.tests.utils.emptyWireProtocolFrame
import org.onap.dcae.collectors.veshv.tests.utils.wireProtocolFrame
import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
+import org.onap.dcae.collectors.veshv.config.api.model.KafkaConfiguration
import org.onap.dcae.collectors.veshv.model.ClientContext
-import org.onap.dcae.collectors.veshv.model.KafkaConfiguration
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.ves.VesEventOuterClass
import reactor.kafka.sender.KafkaSender
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.ves.VesEventOuterClass.CommonEventHeader.*
<groupId>${project.parent.groupId}</groupId>
<artifactId>hv-collector-test-utils</artifactId>
<version>${project.parent.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>io.arrow-kt</groupId>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
</dependency>
- <dependency>
- <groupId>org.jetbrains.spek</groupId>
- <artifactId>spek-api</artifactId>
- </dependency>
<dependency>
<groupId>org.jetbrains.spek</groupId>
<artifactId>spek-junit-platform-engine</artifactId>
import org.onap.dcae.collectors.veshv.boundary.Collector
import org.onap.dcae.collectors.veshv.boundary.Sink
import org.onap.dcae.collectors.veshv.boundary.SinkProvider
+import org.onap.dcae.collectors.veshv.config.api.model.CollectorConfiguration
import org.onap.dcae.collectors.veshv.factory.CollectorFactory
import org.onap.dcae.collectors.veshv.model.ClientContext
-import org.onap.dcae.collectors.veshv.model.CollectorConfiguration
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import org.onap.dcae.collectors.veshv.tests.fakes.*
import reactor.core.publisher.Flux
import java.time.Duration
package org.onap.dcae.collectors.veshv.tests.fakes
import org.onap.dcae.collectors.veshv.boundary.ConfigurationProvider
+import org.onap.dcae.collectors.veshv.config.api.model.CollectorConfiguration
+import org.onap.dcae.collectors.veshv.config.api.model.routing
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.PERF3GPP
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HEARTBEAT
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.MEASUREMENT
-import org.onap.dcae.collectors.veshv.model.CollectorConfiguration
-import org.onap.dcae.collectors.veshv.model.routing
import reactor.core.publisher.FluxProcessor
import reactor.core.publisher.UnicastProcessor
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
import org.onap.dcae.collectors.veshv.model.ClientRejectionCause
import org.onap.dcae.collectors.veshv.model.MessageDropCause
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import java.time.Duration
import java.time.Instant
import kotlin.test.fail
import org.onap.dcae.collectors.veshv.model.ConsumedMessage
import org.onap.dcae.collectors.veshv.model.FailedToConsumeMessage
import org.onap.dcae.collectors.veshv.model.MessageDropCause
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import org.onap.dcae.collectors.veshv.model.SuccessfullyConsumedMessage
import org.reactivestreams.Publisher
import reactor.core.publisher.Flux
<artifactId>guava</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency>
<dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
<artifactId>hv-collector-sources</artifactId>
<version>1.1.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
</parent>
<artifactId>hv-collector-domain</artifactId>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
</dependency>
- <dependency>
- <groupId>org.onap.dcaegen2.services.sdk.security</groupId>
- <artifactId>ssl</artifactId>
- </dependency>
<dependency>
<groupId>io.arrow-kt</groupId>
<artifactId>arrow-core</artifactId>
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.domain
data class RoutedMessage(val topic: String, val partition: Int, val message: VesMessage)
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.model
+package org.onap.dcae.collectors.veshv.domain
-import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
import org.onap.ves.VesEventOuterClass.CommonEventHeader
/**
<groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
<artifactId>hv-collector-sources</artifactId>
<version>1.1.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
</parent>
<artifactId>hv-collector-health-check</artifactId>
<groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
<artifactId>hv-collector-sources</artifactId>
<version>1.1.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
</parent>
<artifactId>hv-collector-main</artifactId>
<dependencies>
<dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-core</artifactId>
- <version>${project.parent.version}</version>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-configuration</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-health-check</artifactId>
- <version>${project.parent.version}</version>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-core</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-test-utils</artifactId>
- <version>${project.parent.version}</version>
- <scope>test</scope>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-health-check</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.arrow-kt</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hv-collector-test-utils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
</dependency>
</dependencies>
import arrow.effects.instances.io.monad.monad
import arrow.typeclasses.binding
import org.onap.dcae.collectors.veshv.commandline.handleWrongArgumentErrorCurried
+import org.onap.dcae.collectors.veshv.config.api.ConfigurationModule
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthDescription
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthState
import org.onap.dcae.collectors.veshv.main.servers.HealthCheckServer
import org.onap.dcae.collectors.veshv.main.servers.VesServer
-import org.onap.dcae.collectors.veshv.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.model.ServiceContext
import org.onap.dcae.collectors.veshv.utils.Closeable
import org.onap.dcae.collectors.veshv.utils.ServerHandle
private const val PROGRAM_NAME = "java $VESHV_PACKAGE.main.MainKt"
fun main(args: Array<String>) =
- ArgVesHvConfiguration().parse(args)
+ ConfigurationModule()
+ .createConfigurationFromCommandLine(args)
.mapLeft(handleWrongArgumentErrorCurried(PROGRAM_NAME))
.map(::startAndAwaitServers)
.unsafeRunEitherSync(
import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
import org.onap.dcae.collectors.veshv.model.ClientRejectionCause
import org.onap.dcae.collectors.veshv.model.MessageDropCause
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
import org.onap.dcae.collectors.veshv.utils.TimeUtils.epochMicroToInstant
import java.time.Duration
import java.time.Instant
*/
package org.onap.dcae.collectors.veshv.main.servers
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.healthcheck.api.HealthState
import org.onap.dcae.collectors.veshv.healthcheck.factory.HealthCheckApiServer
import org.onap.dcae.collectors.veshv.main.metrics.MicrometerMetrics
-import org.onap.dcae.collectors.veshv.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.utils.ServerHandle
/**
package org.onap.dcae.collectors.veshv.main.servers
import arrow.effects.IO
-import org.onap.dcae.collectors.veshv.model.ServerConfiguration
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.model.ServiceContext
import org.onap.dcae.collectors.veshv.utils.ServerHandle
import org.onap.dcae.collectors.veshv.utils.arrow.then
import arrow.effects.IO
import org.onap.dcae.collectors.veshv.boundary.Server
+import org.onap.dcae.collectors.veshv.config.api.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.factory.CollectorFactory
import org.onap.dcae.collectors.veshv.factory.ServerFactory
import org.onap.dcae.collectors.veshv.impl.adapters.AdapterFactory
import org.onap.dcae.collectors.veshv.main.metrics.MicrometerMetrics
-import org.onap.dcae.collectors.veshv.model.ServerConfiguration
import org.onap.dcae.collectors.veshv.utils.ServerHandle
/**
import org.onap.dcae.collectors.veshv.model.ClientRejectionCause.PAYLOAD_SIZE_EXCEEDED_IN_MESSAGE
import org.onap.dcae.collectors.veshv.model.MessageDropCause.INVALID_MESSAGE
import org.onap.dcae.collectors.veshv.model.MessageDropCause.ROUTE_NOT_FOUND
-import org.onap.dcae.collectors.veshv.model.RoutedMessage
-import org.onap.dcae.collectors.veshv.model.VesMessage
+import org.onap.dcae.collectors.veshv.domain.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.VesMessage
import org.onap.dcae.collectors.veshv.tests.utils.emptyWireProtocolFrame
import org.onap.dcae.collectors.veshv.tests.utils.vesEvent
import org.onap.dcae.collectors.veshv.tests.utils.wireProtocolFrame
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-domain</artifactId>
+ <artifactId>hv-collector-commandline</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-commandline</artifactId>
+ <artifactId>hv-collector-domain</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.onap.dcaegen2.services.sdk.security</groupId>
+ <artifactId>ssl</artifactId>
+ </dependency>
+
<dependency>
<groupId>io.arrow-kt</groupId>
<artifactId>arrow-core</artifactId>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- </dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
</dependency>
- <dependency>
- <groupId>org.jetbrains.spek</groupId>
- <artifactId>spek-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jetbrains.spek</groupId>
- <artifactId>spek-junit-platform-engine</artifactId>
- </dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcae.collectors.veshv.domain
+package org.onap.dcae.collectors.veshv.ssl.boundary
import arrow.core.Option
import org.onap.dcaegen2.services.sdk.security.ssl.SecurityKeys
import arrow.core.Option
import io.netty.handler.ssl.SslContext
-import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
import org.onap.dcaegen2.services.sdk.security.ssl.SslFactory
/**
import org.onap.dcae.collectors.veshv.commandline.CommandLineOption
import org.onap.dcae.collectors.veshv.commandline.hasOption
import org.onap.dcae.collectors.veshv.commandline.stringValue
-import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
import org.onap.dcaegen2.services.sdk.security.ssl.ImmutableSecurityKeys
import org.onap.dcaegen2.services.sdk.security.ssl.ImmutableSecurityKeysStore
import org.onap.dcaegen2.services.sdk.security.ssl.Passwords
import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
-import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
import org.onap.dcaegen2.services.sdk.security.ssl.ImmutableSecurityKeys
import org.onap.dcaegen2.services.sdk.security.ssl.ImmutableSecurityKeysStore
import org.onap.dcaegen2.services.sdk.security.ssl.Passwords
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib-jdk8</artifactId>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>org.jetbrains.kotlin</groupId>
- <artifactId>kotlin-stdlib-jdk8</artifactId>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>runtime</scope>
</dependency>
<!-- See comment in main pom
<dependency>
<classifier>${os.detected.classifier}</classifier>
</dependency>
-->
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>runtime</scope>
- </dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
package org.onap.dcae.collectors.veshv.simulators.xnf.impl.config
import io.vavr.collection.Set
-import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
+import org.onap.dcae.collectors.veshv.ssl.boundary.SecurityConfiguration
import java.net.InetSocketAddress
/**
*/
package org.onap.dcae.collectors.veshv.simulators.xnf.impl.config
-import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
+import org.onap.dcae.collectors.veshv.ssl.boundary.SecurityConfiguration
import java.net.InetSocketAddress
/**
</parent>
<artifactId>hv-collector-sources</artifactId>
- <version>1.1.0-SNAPSHOT</version>
<description>VES HighVolume Collector :: Sources</description>
<packaging>pom</packaging>
<modules>
<module>hv-collector-commandline</module>
+ <module>hv-collector-configuration</module>
<module>hv-collector-core</module>
<module>hv-collector-ct</module>
<module>hv-collector-dcae-app-simulator</module>