From 5f8262bf1c12a1b367e5e92fae03a44374bc43fb Mon Sep 17 00:00:00 2001 From: Oleg Mitsura Date: Thu, 11 Apr 2019 10:40:55 -0400 Subject: netconf-executor: NetconfSessionImp removed useless method Issue-ID: CCSDK-1126 Change-Id: I40fa7a5d83d14a33d8e06fe28394828f86f857fd Signed-off-by: Oleg Mitsura --- .../functions/netconf/executor/core/NetconfSessionImpl.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt index 13c1bfa37..b1121b3d4 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt @@ -257,19 +257,11 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ } val capabilityMatcher = NetconfMessageUtils.CAPABILITY_REGEX_PATTERN.matcher(serverHelloResponse) - while (capabilityMatcher.find()) { + while (capabilityMatcher.find()) { //TODO: refactor to add unit test easily for device capability accumulation. deviceCapabilities.add(capabilityMatcher.group(1)) } } - fun sessionstatus(state:String): Boolean{ - return when (state){ - "Close" -> channel.isClosed - "Open" -> channel.isOpen - else -> false - } - } - internal fun setStreamHandler(streamHandler: NetconfDeviceCommunicator) { this.streamHandler = streamHandler } @@ -279,7 +271,6 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ * Used by {@link NetconfSessionListenerImpl} */ internal fun addDeviceErrorReply(errReply: String) { - println("addDeviceErrorReply (errReply: $errReply") //TODO : get rid of this. errorReplies.add(errReply) } @@ -288,7 +279,6 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ * Used by {@link NetconfSessionListenerImpl} */ internal fun addDeviceReply(messageId: String, replyMsg: String) { - println("addDeviceReply (messageId: $messageId replyMsg: $replyMsg") //TODO : get rid of this. replies[messageId]?.complete(replyMsg) } @@ -312,7 +302,6 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ * internal function for accessing errorReplies for testing. */ internal fun getErrorReplies() = errorReplies - internal fun clearErrorReplies() = errorReplies.clear() internal fun clearReplies() = replies.clear() internal fun setClient(client: SshClient) { this.client = client } -- cgit 1.2.3-korg