aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--docker-compose.yml4
-rw-r--r--hv-collector-coverage/pom.xml2
-rw-r--r--hv-collector-ct/pom.xml2
-rw-r--r--hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt6
-rw-r--r--hv-collector-xnf-simulator/Dockerfile (renamed from hv-collector-client-simulator/Dockerfile)2
-rw-r--r--hv-collector-xnf-simulator/pom.xml (renamed from hv-collector-client-simulator/pom.xml)6
-rw-r--r--hv-collector-xnf-simulator/sample-request.json (renamed from hv-collector-client-simulator/sample-request.json)0
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/api/MessageGenerator.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/api/MessageGenerator.kt)0
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgBasedClientConfiguration.kt)23
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/MessageParameters.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/MessageParameters.kt)0
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/SimulatorConfiguration.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ClientConfiguration.kt)2
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/factory.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/factory.kt)0
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/HttpServer.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/HttpServer.kt)2
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageGeneratorImpl.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageGeneratorImpl.kt)0
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGenerator.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGenerator.kt)0
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/VesHvClient.kt)6
-rw-r--r--hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt (renamed from hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt)9
-rw-r--r--hv-collector-xnf-simulator/src/main/resources/logback.xml (renamed from hv-collector-client-simulator/src/main/resources/logback.xml)0
-rw-r--r--hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt (renamed from hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgBasedClientConfigurationTest.kt)18
-rw-r--r--hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageFactoryTest.kt (renamed from hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageFactoryTest.kt)0
-rw-r--r--hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGeneratorTest.kt (renamed from hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGeneratorTest.kt)0
-rw-r--r--pom.xml2
-rw-r--r--public/index.html2
24 files changed, 41 insertions, 49 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ea834191..5585f92c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,7 +16,7 @@ build:
- hv-collector-main/target/reports
- hv-collector-utils/target/reports
- hv-collector-dcae-app-simulator/target/reports
- - hv-collector-client-simulator/target/reports
+ - hv-collector-xnf-simulator/target/reports
publish:
@@ -44,5 +44,5 @@ pages:
- mv hv-collector-main/target/reports public/analysis/main
- mv hv-collector-utils/target/reports public/analysis/utils
- mv hv-collector-dcae-app-simulator/target/reports public/analysis/dcae-app-simulator
- - mv hv-collector-client-simulator/target/reports public/analysis/client-simulator
+ - mv hv-collector-xnf-simulator/target/reports public/analysis/xnf-simulator
diff --git a/docker-compose.yml b/docker-compose.yml
index d98971ba..6c4bf73c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -42,9 +42,9 @@ services:
- ./ssl/:/etc/ves-hv/
xnf-simulator:
- image: onap/ves-hv-collector-client-simulator
+ image: onap/ves-hv-collector-xnf-simulator
# build:
-# context: hv-collector-client-simulator
+# context: hv-collector-xnf-simulator
# dockerfile: Dockerfile
ports:
- "8000:5000/tcp"
diff --git a/hv-collector-coverage/pom.xml b/hv-collector-coverage/pom.xml
index e02eeeb5..1c039367 100644
--- a/hv-collector-coverage/pom.xml
+++ b/hv-collector-coverage/pom.xml
@@ -97,7 +97,7 @@
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-client-simulator</artifactId>
+ <artifactId>hv-collector-xnf-simulator</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
diff --git a/hv-collector-ct/pom.xml b/hv-collector-ct/pom.xml
index 63a5c093..71b906cb 100644
--- a/hv-collector-ct/pom.xml
+++ b/hv-collector-ct/pom.xml
@@ -66,7 +66,7 @@
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
- <artifactId>hv-collector-client-simulator</artifactId>
+ <artifactId>hv-collector-xnf-simulator</artifactId>
<version>${project.parent.version}</version>
</dependency>
diff --git a/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt b/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt
index 00739fa4..54a7ea11 100644
--- a/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt
+++ b/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt
@@ -20,11 +20,7 @@
package org.onap.dcae.collectors.veshv.tests.component
import arrow.syntax.function.partially1
-import io.netty.buffer.ByteBuf
-import io.netty.buffer.ByteBufAllocator
-import io.netty.buffer.CompositeByteBuf
-import io.netty.buffer.Unpooled
-import io.netty.buffer.UnpooledByteBufAllocator
+import io.netty.buffer.*
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
diff --git a/hv-collector-client-simulator/Dockerfile b/hv-collector-xnf-simulator/Dockerfile
index 7d12c494..b713bafc 100644
--- a/hv-collector-client-simulator/Dockerfile
+++ b/hv-collector-xnf-simulator/Dockerfile
@@ -12,4 +12,4 @@ ENTRYPOINT ["java", "-cp", "*:", "org.onap.dcae.collectors.veshv.simulators.xnf.
CMD ["--ves-host", "ves-hv-collector", "--ves-port", "6061"]
COPY target/libs/external/* ./
COPY target/libs/internal/* ./
-COPY target/hv-collector-client-simulator-*.jar ./
+COPY target/hv-collector-xnf-simulator-*.jar ./
diff --git a/hv-collector-client-simulator/pom.xml b/hv-collector-xnf-simulator/pom.xml
index 8cfe0a4f..9af2246d 100644
--- a/hv-collector-client-simulator/pom.xml
+++ b/hv-collector-xnf-simulator/pom.xml
@@ -37,12 +37,12 @@
<relativePath>..</relativePath>
</parent>
- <artifactId>hv-collector-client-simulator</artifactId>
- <description>VES HighVolume Collector :: Client simulator</description>
+ <artifactId>hv-collector-xnf-simulator</artifactId>
+ <description>VES HighVolume Collector :: XNF simulator</description>
<properties>
<skipAnalysis>false</skipAnalysis>
- <docker-image.name>ves-hv-collector-client-simulator</docker-image.name>
+ <docker-image.name>ves-hv-collector-xnf-simulator</docker-image.name>
</properties>
<build>
diff --git a/hv-collector-client-simulator/sample-request.json b/hv-collector-xnf-simulator/sample-request.json
index ca8bd885..ca8bd885 100644
--- a/hv-collector-client-simulator/sample-request.json
+++ b/hv-collector-xnf-simulator/sample-request.json
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/api/MessageGenerator.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/api/MessageGenerator.kt
index f4c92fd4..f4c92fd4 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/api/MessageGenerator.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/api/MessageGenerator.kt
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgBasedClientConfiguration.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt
index f29b693c..04654f8c 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgBasedClientConfiguration.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt
@@ -35,16 +35,7 @@ import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.VES_HV
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since June 2018
*/
-internal object DefaultValues {
- const val MESSAGES_AMOUNT = -1L
- const val PRIVATE_KEY_FILE = "/etc/ves-hv/client.key"
- const val CERT_FILE = "/etc/ves-hv/client.crt"
- const val TRUST_CERT_FILE = "/etc/ves-hv/trust.crt"
- const val VES_HV_PORT = 6061
- const val VES_HV_HOST = "veshvcollector"
-}
-
-internal class ArgBasedClientConfiguration : ArgBasedConfiguration<ClientConfiguration>(DefaultParser()) {
+internal class ArgConfigurationProvider : ArgBasedConfiguration<SimulatorConfiguration>(DefaultParser()) {
override val cmdLineOptionsList = listOf(
VES_HV_PORT,
VES_HV_HOST,
@@ -54,11 +45,11 @@ internal class ArgBasedClientConfiguration : ArgBasedConfiguration<ClientConfigu
TRUST_CERT_FILE
)
- override fun getConfiguration(cmdLine: CommandLine): ClientConfiguration {
+ override fun getConfiguration(cmdLine: CommandLine): SimulatorConfiguration {
val host = cmdLine.stringValue(VES_HV_HOST, DefaultValues.VES_HV_HOST)
val port = cmdLine.intValue(VES_HV_PORT, DefaultValues.VES_HV_PORT)
val messagesAmount = cmdLine.longValue(MESSAGES_TO_SEND_AMOUNT, DefaultValues.MESSAGES_AMOUNT)
- return ClientConfiguration(
+ return SimulatorConfiguration(
host,
port,
parseSecurityConfig(cmdLine),
@@ -75,4 +66,12 @@ internal class ArgBasedClientConfiguration : ArgBasedConfiguration<ClientConfigu
trustedCert = stringPathToPath(trustCertFile))
}
+ internal object DefaultValues {
+ const val MESSAGES_AMOUNT = -1L
+ const val PRIVATE_KEY_FILE = "/etc/ves-hv/client.key"
+ const val CERT_FILE = "/etc/ves-hv/client.crt"
+ const val TRUST_CERT_FILE = "/etc/ves-hv/trust.crt"
+ const val VES_HV_PORT = 6061
+ const val VES_HV_HOST = "veshvcollector"
+ }
}
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/MessageParameters.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/MessageParameters.kt
index f993f45a..f993f45a 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/MessageParameters.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/MessageParameters.kt
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ClientConfiguration.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/SimulatorConfiguration.kt
index 657ed317..1052cfcc 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ClientConfiguration.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/SimulatorConfiguration.kt
@@ -25,7 +25,7 @@ import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since June 2018
*/
-internal data class ClientConfiguration(
+internal data class SimulatorConfiguration(
val vesHost: String,
val vesPort: Int,
val security: SecurityConfiguration,
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/factory.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/factory.kt
index dce386b1..dce386b1 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/factory.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/factory.kt
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/HttpServer.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/HttpServer.kt
index c545ac8d..b67bc644 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/HttpServer.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/HttpServer.kt
@@ -37,7 +37,7 @@ import javax.json.JsonObject
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since June 2018
*/
-internal class HttpServer(private val vesClient: VesHvClient) {
+internal class HttpServer(private val vesClient: XnfSimulator) {
fun start(port: Int = DEFAULT_PORT): IO<RatpackServer> = IO {
RatpackServer.start { server ->
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageGeneratorImpl.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageGeneratorImpl.kt
index 0d28bad0..0d28bad0 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageGeneratorImpl.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageGeneratorImpl.kt
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGenerator.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGenerator.kt
index c8b97639..c8b97639 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGenerator.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGenerator.kt
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/VesHvClient.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt
index 43b73e1f..6487888e 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/VesHvClient.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt
@@ -28,7 +28,7 @@ import io.netty.handler.ssl.SslProvider
import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
import org.onap.dcae.collectors.veshv.domain.WireFrame
import org.onap.dcae.collectors.veshv.domain.WireFrameEncoder
-import org.onap.dcae.collectors.veshv.simulators.xnf.config.ClientConfiguration
+import org.onap.dcae.collectors.veshv.simulators.xnf.config.SimulatorConfiguration
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.reactivestreams.Publisher
import reactor.core.publisher.Flux
@@ -42,7 +42,7 @@ import reactor.ipc.netty.tcp.TcpClient
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since June 2018
*/
-internal class VesHvClient(private val configuration: ClientConfiguration) {
+internal class XnfSimulator(private val configuration: SimulatorConfiguration) {
private val client: TcpClient = TcpClient.builder()
.options { opts ->
@@ -116,6 +116,6 @@ internal class VesHvClient(private val configuration: ClientConfiguration) {
companion object {
private const val MAX_BATCH_SIZE = 128
- private val logger = Logger(VesHvClient::class)
+ private val logger = Logger(XnfSimulator::class)
}
}
diff --git a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt
index 63c48757..facf611a 100644
--- a/hv-collector-client-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt
@@ -19,15 +19,14 @@
*/
package org.onap.dcae.collectors.veshv.simulators.xnf
-import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgBasedClientConfiguration
+import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgConfigurationProvider
import org.onap.dcae.collectors.veshv.simulators.xnf.impl.HttpServer
-import org.onap.dcae.collectors.veshv.simulators.xnf.impl.VesHvClient
+import org.onap.dcae.collectors.veshv.simulators.xnf.impl.XnfSimulator
import org.onap.dcae.collectors.veshv.utils.arrow.ExitFailure
import org.onap.dcae.collectors.veshv.utils.arrow.unsafeRunEitherSync
import org.onap.dcae.collectors.veshv.utils.arrow.void
import org.onap.dcae.collectors.veshv.utils.commandline.handleWrongArgumentErrorCurried
import org.onap.dcae.collectors.veshv.utils.logging.Logger
-import org.slf4j.LoggerFactory
private const val PACKAGE_NAME = "org.onap.dcae.collectors.veshv.simulators.xnf"
private val logger = Logger(PACKAGE_NAME)
@@ -38,9 +37,9 @@ const val PROGRAM_NAME = "java $PACKAGE_NAME.MainKt"
* @since June 2018
*/
fun main(args: Array<String>) =
- ArgBasedClientConfiguration().parse(args)
+ ArgConfigurationProvider().parse(args)
.mapLeft(handleWrongArgumentErrorCurried(PROGRAM_NAME))
- .map(::VesHvClient)
+ .map(::XnfSimulator)
.map(::HttpServer)
.map { it.start().void() }
.unsafeRunEitherSync(
diff --git a/hv-collector-client-simulator/src/main/resources/logback.xml b/hv-collector-xnf-simulator/src/main/resources/logback.xml
index 809f62d4..809f62d4 100644
--- a/hv-collector-client-simulator/src/main/resources/logback.xml
+++ b/hv-collector-xnf-simulator/src/main/resources/logback.xml
diff --git a/hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgBasedClientConfigurationTest.kt b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt
index 3b1836eb..f2f92fff 100644
--- a/hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgBasedClientConfigurationTest.kt
+++ b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt
@@ -19,8 +19,6 @@
*/
package org.onap.dcae.collectors.veshv.main.config
-import arrow.core.Failure
-import arrow.core.Success
import arrow.core.identity
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
@@ -29,14 +27,14 @@ 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.dcae.collectors.veshv.simulators.xnf.config.ArgBasedClientConfiguration
-import org.onap.dcae.collectors.veshv.simulators.xnf.config.ClientConfiguration
-import org.onap.dcae.collectors.veshv.simulators.xnf.config.DefaultValues
+import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgConfigurationProvider
+import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgConfigurationProvider.*
+import org.onap.dcae.collectors.veshv.simulators.xnf.config.SimulatorConfiguration
import java.nio.file.Paths
-object ArgBasedClientConfigurationTest : Spek({
- lateinit var cut: ArgBasedClientConfiguration
+object ArgConfigurationProviderTest : Spek({
+ lateinit var cut: ArgConfigurationProvider
val messagesAmount = 3L
val vesHost = "localhosting"
val pk = Paths.get("/", "etc", "ves", "pk.pem")
@@ -44,17 +42,17 @@ object ArgBasedClientConfigurationTest : Spek({
val trustCert = Paths.get("/", "etc", "ves", "trusted.crt")
beforeEachTest {
- cut = ArgBasedClientConfiguration()
+ cut = ArgConfigurationProvider()
}
- fun parse(vararg cmdLine: String): ClientConfiguration =
+ fun parse(vararg cmdLine: String): SimulatorConfiguration =
cut.parse(cmdLine).fold(
{throw AssertionError("Parsing result should be present")},
::identity
)
describe("parsing arguments") {
- lateinit var result: ClientConfiguration
+ lateinit var result: SimulatorConfiguration
given("all parameters are present in the long form") {
diff --git a/hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageFactoryTest.kt b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageFactoryTest.kt
index 6f8a95a4..6f8a95a4 100644
--- a/hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageFactoryTest.kt
+++ b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/MessageFactoryTest.kt
diff --git a/hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGeneratorTest.kt b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGeneratorTest.kt
index 73129a7f..73129a7f 100644
--- a/hv-collector-client-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGeneratorTest.kt
+++ b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/PayloadGeneratorTest.kt
diff --git a/pom.xml b/pom.xml
index 7fcd54c5..033b25ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
<modules>
<module>hv-collector-analysis</module>
- <module>hv-collector-client-simulator</module>
+ <module>hv-collector-xnf-simulator</module>
<module>hv-collector-core</module>
<module>hv-collector-coverage</module>
<module>hv-collector-ct</module>
diff --git a/public/index.html b/public/index.html
index fd179195..26b0b13c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -53,7 +53,7 @@
<li><a href="./analysis/main/detekt-report.html">Main</a></li>
<li><a href="./analysis/utils/detekt-report.html">Utils</a></li>
<li><a href="./analysis/dcae-app-simulator/detekt-report.html">DCAE APP simulator</a></li>
- <li><a href="./analysis/client-simulator/detekt-report.html">xNF simulator</a></li>
+ <li><a href="./analysis/xnf-simulator/detekt-report.html">xNF simulator</a></li>
</ul>
</li>
<li><a href="./coverage">Coverage</a> (please note that Jacoco support for Kotlin is currently very problematic so the values are invalid)