diff options
Diffstat (limited to 'sources')
25 files changed, 37 insertions, 33 deletions
diff --git a/sources/hv-collector-commandline/pom.xml b/sources/hv-collector-commandline/pom.xml index 6762e896..ceb1de48 100644 --- a/sources/hv-collector-commandline/pom.xml +++ b/sources/hv-collector-commandline/pom.xml @@ -7,7 +7,7 @@ <parent> <artifactId>hv-collector-sources</artifactId> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> </parent> <artifactId>hv-collector-commandline</artifactId> diff --git a/sources/hv-collector-configuration/pom.xml b/sources/hv-collector-configuration/pom.xml index 3e839195..be74a0ed 100644 --- a/sources/hv-collector-configuration/pom.xml +++ b/sources/hv-collector-configuration/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> </parent> <artifactId>hv-collector-configuration</artifactId> diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt index 905c737e..1f5c0c23 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2019 NOKIA + * Copyright (C) 2019-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsRequest import org.onap.dcaegen2.services.sdk.rest.services.model.logging.RequestDiagnosticContext import reactor.core.publisher.Mono import reactor.retry.Retry +import reactor.util.retry.Retry.withThrowable import java.time.Duration import java.util.concurrent.atomic.AtomicReference @@ -53,7 +54,7 @@ internal class CbsClientAdapter(private val cbsClientMono: Mono<CbsClient>, "CBS client successfully created, first request will be sent in ${firstRequestDelay.seconds} s" } } - .retryWhen(retry) + .retryWhen(withThrowable(retry)) .delayElement(firstRequestDelay) .flatMapMany(::toPeriodicalConfigurations) .distinctUntilChanged() diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt index 6f16b3d1..8e774f9d 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2018-2019 NOKIA + * Copyright (C) 2018-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.streams.Strea import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.streams.StreamPredicates.streamOfType import reactor.core.publisher.Flux import reactor.retry.Retry +import reactor.util.retry.Retry.withThrowable /** * @author Jakub Dudycz <jakub.dudycz@nokia.com> @@ -60,7 +61,7 @@ internal class CbsConfigurationProvider(private val cbsClientAdapter: CbsClientA .map(::parseConfiguration) .doOnNext { logger.info(mdc) { "Successfully parsed configuration json to:\n$it" } } .onErrorLog(logger, mdc) { "Error while creating configuration" } - .retryWhen(retry) + .retryWhen(withThrowable(retry)) private fun parseConfiguration(json: JsonObject) = configParser diff --git a/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt b/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt index 1f6a2538..42d1a111 100644 --- a/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt +++ b/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2018-2019 NOKIA + * Copyright (C) 2018-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -106,6 +106,7 @@ internal object CbsClientAdapterTest : Spek({ .withVirtualTime { cut.configurationUpdates().take(1) } .expectSubscription() .expectNoEvent(firstRequestDelay) + .thenAwait(firstRequestDelay) .expectNext(configuration()) .verifyComplete() } diff --git a/sources/hv-collector-core/pom.xml b/sources/hv-collector-core/pom.xml index 37be0670..50c89182 100644 --- a/sources/hv-collector-core/pom.xml +++ b/sources/hv-collector-core/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt index 91e6fde5..663fbb12 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2018-2019 NOKIA + * Copyright (C) 2018-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ internal class KafkaPublisher(private val sender: KafkaSender<CommonEventHeader, override fun send(messages: Flux<RoutedMessage>): Flux<ConsumedMessage> = messages.map(::vesToKafkaRecord) - .compose { sender.send(it) } + .`as` { sender.send(it) } .map { val msg = it.correlationMetadata() if (it.exception() == null) { diff --git a/sources/hv-collector-ct/pom.xml b/sources/hv-collector-ct/pom.xml index ba163a87..a17055df 100644 --- a/sources/hv-collector-ct/pom.xml +++ b/sources/hv-collector-ct/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-dcae-app-simulator/pom.xml b/sources/hv-collector-dcae-app-simulator/pom.xml index 9bcc9724..932ac73c 100644 --- a/sources/hv-collector-dcae-app-simulator/pom.xml +++ b/sources/hv-collector-dcae-app-simulator/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-domain/pom.xml b/sources/hv-collector-domain/pom.xml index 3d9e9c6e..55a6fb6f 100644 --- a/sources/hv-collector-domain/pom.xml +++ b/sources/hv-collector-domain/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> </parent> <artifactId>hv-collector-domain</artifactId> diff --git a/sources/hv-collector-health-check/pom.xml b/sources/hv-collector-health-check/pom.xml index 14a3535b..d420316e 100644 --- a/sources/hv-collector-health-check/pom.xml +++ b/sources/hv-collector-health-check/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> </parent> <artifactId>hv-collector-health-check</artifactId> diff --git a/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt b/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt index cff8160c..c2f5e798 100644 --- a/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt +++ b/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2018-2019 NOKIA + * Copyright (C) 2018-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ class HealthCheckApiServer(private val healthState: HealthState, healthState().subscribe(healthDescription::set) HttpServer.create() .tcpConfiguration { - it.addressSupplier { listenAddress } + it.bindAddress { listenAddress } .doOnUnbound { logClose() } } .route { routes -> diff --git a/sources/hv-collector-kafka-consumer/pom.xml b/sources/hv-collector-kafka-consumer/pom.xml index 57b301c8..8cb34784 100644 --- a/sources/hv-collector-kafka-consumer/pom.xml +++ b/sources/hv-collector-kafka-consumer/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt b/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt index 29a17fc1..f772727e 100644 --- a/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt +++ b/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2019 NOKIA + * Copyright (C) 2019-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ internal class PrometheusApiServer(private val listenAddress: InetSocketAddress, fun start(): Mono<NettyServerHandle> = HttpServer.create() - .tcpConfiguration { it.addressSupplier { listenAddress } } + .tcpConfiguration { it.bindAddress { listenAddress } } .route { it.get("/monitoring/prometheus", ::metricsHandler) } .bind() .map { NettyServerHandle(it) } diff --git a/sources/hv-collector-kafka/pom.xml b/sources/hv-collector-kafka/pom.xml index ddd94238..a738bd16 100644 --- a/sources/hv-collector-kafka/pom.xml +++ b/sources/hv-collector-kafka/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-main/pom.xml b/sources/hv-collector-main/pom.xml index a39fc7b9..f9d74c67 100644 --- a/sources/hv-collector-main/pom.xml +++ b/sources/hv-collector-main/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> </parent> <artifactId>hv-collector-main</artifactId> diff --git a/sources/hv-collector-server/pom.xml b/sources/hv-collector-server/pom.xml index cce03f12..6a4c60cb 100644 --- a/sources/hv-collector-server/pom.xml +++ b/sources/hv-collector-server/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt index d19b7f49..7f6ad658 100644 --- a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt +++ b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2018-2019 NOKIA + * Copyright (C) 2018-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ internal class NettyTcpServer(private val serverConfiguration: ServerConfigurati override fun start(): Mono<ServerHandle> = Mono.defer { TcpServer.create() - .addressSupplier { InetSocketAddress(serverConfiguration.listenPort) } + .bindAddress { InetSocketAddress(serverConfiguration.listenPort) } .configureSsl() .handle(this::handleConnection) .bind() diff --git a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt index eb51cf4b..6bbe08f0 100644 --- a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt +++ b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2019 NOKIA + * Copyright (C) 2019-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import reactor.netty.Connection import reactor.netty.NettyInbound import reactor.netty.NettyOutbound import java.net.InetAddress +import java.net.InetSocketAddress import java.security.cert.X509Certificate import javax.net.ssl.SSLSession @@ -76,6 +77,6 @@ internal inline fun withNewClientContextFrom(nettyInbound: NettyInbound, internal fun populateClientContextFromInbound(clientContext: ClientContext, nettyInbound: NettyInbound) = withConnectionFrom(nettyInbound) { connection -> - clientContext.clientAddress = Try { connection.address().address }.toOption() + clientContext.clientAddress = Try { (connection.address() as InetSocketAddress).address }.toOption() clientContext.clientCert = connection.getSslSession().flatMap { it.findClientCert() } } diff --git a/sources/hv-collector-ssl/pom.xml b/sources/hv-collector-ssl/pom.xml index f73d3cfb..0212c8d7 100644 --- a/sources/hv-collector-ssl/pom.xml +++ b/sources/hv-collector-ssl/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-test-utils/pom.xml b/sources/hv-collector-test-utils/pom.xml index 8b2a6d74..8e6a2fad 100644 --- a/sources/hv-collector-test-utils/pom.xml +++ b/sources/hv-collector-test-utils/pom.xml @@ -14,7 +14,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-utils/pom.xml b/sources/hv-collector-utils/pom.xml index a236a43a..fcef0bfc 100644 --- a/sources/hv-collector-utils/pom.xml +++ b/sources/hv-collector-utils/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-ves-message-generator/pom.xml b/sources/hv-collector-ves-message-generator/pom.xml index b3eec0e4..7cbc2d16 100644 --- a/sources/hv-collector-ves-message-generator/pom.xml +++ b/sources/hv-collector-ves-message-generator/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/hv-collector-xnf-simulator/pom.xml b/sources/hv-collector-xnf-simulator/pom.xml index 49ceab9d..0de7f3d7 100644 --- a/sources/hv-collector-xnf-simulator/pom.xml +++ b/sources/hv-collector-xnf-simulator/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>hv-collector-sources</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/sources/pom.xml b/sources/pom.xml index be03114f..6914682b 100644 --- a/sources/pom.xml +++ b/sources/pom.xml @@ -33,7 +33,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId> <artifactId>ves-hv-collector</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> @@ -125,7 +125,7 @@ <dependency> <groupId>${project.groupId}</groupId> <artifactId>hv-collector-analysis</artifactId> - <version>1.5.1-SNAPSHOT</version> + <version>1.6.0-SNAPSHOT</version> </dependency> </dependencies> </plugin> |