From 75b95caba1ec7e126683be1df5928a380174d428 Mon Sep 17 00:00:00 2001 From: Izabela Zawadzka Date: Wed, 20 Mar 2019 14:59:24 +0100 Subject: Remove IO monad usage from simulators Change-Id: I1c470777b91230f4a44a4960ca534e4b20c1ac43 Issue-ID: DCAEGEN2-1372 Signed-off-by: Izabela Zawadzka --- .../collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sources/hv-collector-xnf-simulator/src/main') diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt index 7df7283b..fb2c532f 100644 --- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt +++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt @@ -72,7 +72,7 @@ internal class XnfApiServer( is Either.Left -> logger.warn { "Failed to start scenario, ${id.a}" } is Either.Right -> logger.info { "Scenario started, details: ${id.b}" } } - res.sendEitherErrorOrResponse(id).then() + res.sendEitherErrorOrResponse(id) } } @@ -90,7 +90,7 @@ internal class XnfApiServer( val status = ongoingSimulations.status(id) val response = Responses.statusResponse(status.toString(), status.message) logger.info { "Task $id status: $response" } - return res.sendAndHandleErrors(IO.just(response)).then() + return res.sendAndHandleErrors(Mono.just(response)) } companion object { -- cgit 1.2.3-korg