summaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-main
diff options
context:
space:
mode:
authorkjaniak <kornel.janiak@nokia.com>2019-03-22 12:42:11 +0100
committerkjaniak <kornel.janiak@nokia.com>2019-03-25 16:49:12 +0100
commitf3d3e6745328b9ec8bb68dfbfb3d3d57aa47b36f (patch)
treed20b35091f1ffa7348bca6aaf5b690e17605d62f /sources/hv-collector-main
parentc979ea3bd6059cb067a84ba8e6f8d1cf96d61ba2 (diff)
Read HV-VES healtcheck api port from cmd line
Issue-ID: DCAEGEN2-1364 Change-Id: I17c38d7397174fadc7d382cfa3dd0b3a7f4d97ff Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Diffstat (limited to 'sources/hv-collector-main')
-rw-r--r--sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt2
-rw-r--r--sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt3
2 files changed, 2 insertions, 3 deletions
diff --git a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt
index c8a3c013..511f5ee3 100644
--- a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt
+++ b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt
@@ -40,7 +40,7 @@ private val logger = Logger("$VES_HV_PACKAGE.main")
private val hvVesServer = AtomicReference<ServerHandle>()
fun main(args: Array<String>) {
- HealthCheckServer.start()
+ HealthCheckServer.start(ConfigurationModule().healthCheckPort(args))
ConfigurationModule()
.hvVesConfigurationUpdates(args)
.publishOn(Schedulers.single(Schedulers.elastic()))
diff --git a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt
index bc284d08..9b58dcc9 100644
--- a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt
+++ b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt
@@ -34,10 +34,9 @@ import java.net.InetSocketAddress
*/
object HealthCheckServer {
- private const val DEFAULT_HEALTHCHECK_PORT = 6060
private val logger = Logger(HealthCheckServer::class)
- fun start(port: Int = DEFAULT_HEALTHCHECK_PORT) =
+ fun start(port: Int) =
createHealthCheckServer(port)
.start()
.then(::logServerStarted)