From 32aeb329986b3d6b9671c0a9e555cbff43964b3a Mon Sep 17 00:00:00 2001 From: fkrzywka Date: Wed, 13 Jun 2018 10:02:03 +0200 Subject: Refactor ArgBasedConfiguration Extracted duplicate code from Client/Server ArgBasedConfiguration, as it probably would be used third time in future work Change-Id: I581abbcd5f1dd4a1a049e1d28e68a7e4d82a84f8 Signed-off-by: fkrzywka Issue-ID: DCAEGEN2-601 --- .../collectors/veshv/impl/socket/NettyTcpServer.kt | 1 - .../veshv/impl/socket/SslContextFactory.kt | 2 +- .../veshv/model/SecurityConfiguration.kt | 31 ---------------------- .../collectors/veshv/model/ServerConfiguration.kt | 2 ++ 4 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/SecurityConfiguration.kt (limited to 'hv-collector-core/src/main/kotlin') diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt index 564aa8df..65b3b29e 100644 --- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt +++ b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt @@ -19,7 +19,6 @@ */ package org.onap.dcae.collectors.veshv.impl.socket -import io.netty.buffer.ByteBuf import org.onap.dcae.collectors.veshv.boundary.CollectorProvider import org.onap.dcae.collectors.veshv.boundary.Server import org.onap.dcae.collectors.veshv.model.ServerConfiguration diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/SslContextFactory.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/SslContextFactory.kt index 950e2c86..b6fb1cf8 100644 --- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/SslContextFactory.kt +++ b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/SslContextFactory.kt @@ -23,7 +23,7 @@ import io.netty.handler.ssl.ClientAuth import io.netty.handler.ssl.SslContext import io.netty.handler.ssl.SslContextBuilder import io.netty.handler.ssl.SslProvider -import org.onap.dcae.collectors.veshv.model.SecurityConfiguration +import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration internal open class SslContextFactory { diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/SecurityConfiguration.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/SecurityConfiguration.kt deleted file mode 100644 index 9a10801a..00000000 --- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/SecurityConfiguration.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * dcaegen2-collectors-veshv - * ================================================================================ - * Copyright (C) 2018 NOKIA - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.onap.dcae.collectors.veshv.model - -import java.nio.file.Path - -/** - * @author Piotr Jaszczyk - * @since May 2018 - */ -data class SecurityConfiguration( - val privateKey: Path, - val cert: Path, - val trustedCert: Path) diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ServerConfiguration.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ServerConfiguration.kt index f612cc75..8d01c075 100644 --- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ServerConfiguration.kt +++ b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ServerConfiguration.kt @@ -19,6 +19,8 @@ */ package org.onap.dcae.collectors.veshv.model +import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration + /** * @author Piotr Jaszczyk * @since May 2018 -- cgit 1.2.3-korg