aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-xnf-simulator/src
diff options
context:
space:
mode:
authorIzabela Zawadzka <izabela.zawadzka@nokia.com>2019-04-15 13:03:45 +0200
committerIzabela Zawadzka <izabela.zawadzka@nokia.com>2019-04-16 09:18:12 +0200
commit482ff719edbb728827976622cef63c876cb6676e (patch)
tree151630129e37fbc751e54cea1922c5432f0125bf /sources/hv-collector-xnf-simulator/src
parent1b4aebbfeb932de091cad98ea66210f472fc2420 (diff)
Add internal modifiers to comply with new HvVesCustomRule
Change-Id: I33ad24179d05ded58f6784544be9bbdd56210720 Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com> Issue-ID: DCAEGEN2-1438
Diffstat (limited to 'sources/hv-collector-xnf-simulator/src')
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt2
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/HvVesClient.kt2
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ClientConfiguration.kt2
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt2
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SslUtils.kt10
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/factory/ClientFactory.kt2
-rw-r--r--sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt12
7 files changed, 16 insertions, 16 deletions
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt
index 49d6a470..98f33b7f 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt
@@ -47,7 +47,7 @@ import javax.json.JsonArray
* @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
* @since August 2018
*/
-class XnfSimulator(
+internal class XnfSimulator(
private val clientFactory: ClientFactory,
private val generatorFactory: MessageGeneratorFactory,
private val messageParametersParser: MessageParametersParser = MessageParametersParser.INSTANCE) {
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/HvVesClient.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/HvVesClient.kt
index e50f1e7a..63585c66 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/HvVesClient.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/HvVesClient.kt
@@ -31,7 +31,7 @@ import java.nio.ByteBuffer
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since June 2018
*/
-class HvVesClient(private val producer: HvVesProducer) {
+internal class HvVesClient(private val producer: HvVesProducer) {
fun sendRawPayload(messages: Flux<ByteBuffer>, payloadType: PayloadType = PayloadType.UNDEFINED): Mono<Unit> =
producer.sendRaw(messages, payloadType)
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ClientConfiguration.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ClientConfiguration.kt
index 55a18310..a09a7c91 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ClientConfiguration.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ClientConfiguration.kt
@@ -27,5 +27,5 @@ import java.net.InetSocketAddress
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since February 2019
*/
-data class ClientConfiguration(val collectorAddresses: Set<InetSocketAddress>,
+internal data class ClientConfiguration(val collectorAddresses: Set<InetSocketAddress>,
val securityProvider: () -> SecurityConfiguration)
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt
index 751985c6..46e1d295 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt
@@ -26,7 +26,7 @@ import java.net.InetSocketAddress
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since June 2018
*/
-data class SimulatorConfiguration(
+internal data class SimulatorConfiguration(
val listenAddress: InetSocketAddress,
val healthCheckApiListenAddress: InetSocketAddress,
val hvVesAddress: InetSocketAddress,
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SslUtils.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SslUtils.kt
index 7678fdbb..f440da62 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SslUtils.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SslUtils.kt
@@ -38,12 +38,12 @@ import java.nio.file.Paths
* @since September 2018
*/
-const val KEY_STORE_FILE = "/etc/ves-hv/server.p12"
-const val KEY_STORE_PASSWORD_FILE = "/etc/ves-hv/server.pass"
-const val TRUST_STORE_FILE = "/etc/ves-hv/trust.p12"
-const val TRUST_STORE_PASSWORD_FILE = "/etc/ves-hv/trust.pass"
+internal const val KEY_STORE_FILE = "/etc/ves-hv/server.p12"
+internal const val KEY_STORE_PASSWORD_FILE = "/etc/ves-hv/server.pass"
+internal const val TRUST_STORE_FILE = "/etc/ves-hv/trust.p12"
+internal const val TRUST_STORE_PASSWORD_FILE = "/etc/ves-hv/trust.pass"
-fun createSecurityConfigurationProvider(cmdLine: CommandLine): Try<() -> SecurityConfiguration> =
+internal fun createSecurityConfigurationProvider(cmdLine: CommandLine): Try<() -> SecurityConfiguration> =
if (shouldDisableSsl(cmdLine))
Try { { disabledSecurityConfiguration() } }
else
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/factory/ClientFactory.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/factory/ClientFactory.kt
index 72a1165e..94334c09 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/factory/ClientFactory.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/factory/ClientFactory.kt
@@ -29,7 +29,7 @@ import org.onap.dcaegen2.services.sdk.services.hvves.client.producer.api.options
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
* @since February 2019
*/
-class ClientFactory(private val configuration: ClientConfiguration) {
+internal class ClientFactory(private val configuration: ClientConfiguration) {
fun create() = hvVesClient(partialConfiguration().build())
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt
index 3f43ebe0..e36cfc8b 100644
--- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt
+++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt
@@ -34,7 +34,7 @@ import java.util.concurrent.ConcurrentHashMap
* @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
* @since August 2018
*/
-class OngoingSimulations(private val scheduler: Scheduler = Schedulers.elastic(),
+internal class OngoingSimulations(private val scheduler: Scheduler = Schedulers.elastic(),
private val healthState: HealthState = HealthState.INSTANCE) {
private val simulations = ConcurrentHashMap<UUID, Status>()
@@ -76,11 +76,11 @@ class OngoingSimulations(private val scheduler: Scheduler = Schedulers.elastic()
}
}
-sealed class Status(val message: String) {
+internal sealed class Status(val message: String) {
override fun toString() = this::class.simpleName ?: "null"
}
-object StatusNotFound : Status("not found")
-object StatusOngoing : Status("ongoing")
-object StatusSuccess : Status("success")
-data class StatusFailure(val cause: Throwable) : Status("Error ${cause.message}")
+internal object StatusNotFound : Status("not found")
+internal object StatusOngoing : Status("ongoing")
+internal object StatusSuccess : Status("success")
+internal data class StatusFailure(val cause: Throwable) : Status("Error ${cause.message}")