aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-utils/src/main
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-02-15 12:59:26 +0100
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-02-19 12:51:46 +0100
commit82b27ff5bccc925fe03d05f259cf881fafc8a1ce (patch)
treed128931c70c19184d7b259d295ce39deeec370c3 /sources/hv-collector-utils/src/main
parentdc47bd1847a46fe0ad0ca6c10a4d61f829f4c0c6 (diff)
Use SDK/SSL in HV-VES
Issue-ID: DCAEGEN2-1226 Change-Id: I7cfc09001f7315c1b6f4fcf150ad631630c810ef Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'sources/hv-collector-utils/src/main')
-rw-r--r--sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt6
-rw-r--r--sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt10
2 files changed, 10 insertions, 6 deletions
diff --git a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt
index cb1c6222..bedc2fcd 100644
--- a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt
+++ b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt
@@ -52,4 +52,8 @@ fun <A, B> Either<A, B>.doOnLeft(action: () -> Unit): Either<A, B> = apply { if
fun <A> Option<A>.doOnEmpty(action: () -> Unit): Option<A> = apply { if (isEmpty()) action() }
-fun <A> Try<A>.doOnFailure(action: () -> Unit): Try<A> = apply { if (isFailure()) action() }
+fun <A> Try<A>.doOnFailure(action: (Throwable) -> Unit): Try<A> = apply {
+ if (this is Try.Failure) {
+ action(exception)
+ }
+}
diff --git a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt
index e869901d..aaa8ff83 100644
--- a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt
+++ b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt
@@ -106,11 +106,11 @@ enum class CommandLineOption(val option: Option, val required: Boolean = false)
.build()
),
KEY_STORE_PASSWORD(
- Option.builder("kp")
- .longOpt("key-store-password")
- .hasArg()
- .desc("Key store password")
- .build()
+ Option.builder("kp")
+ .longOpt("key-store-password")
+ .hasArg()
+ .desc("Key store password")
+ .build()
),
TRUST_STORE_FILE(
Option.builder("t")