aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service')
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt)14
2 files changed, 12 insertions, 12 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
index 46756e63a..6ee73c238 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
@@ -25,7 +25,7 @@ import org.apache.sshd.client.channel.ClientChannelEvent
import org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier
import org.apache.sshd.client.session.ClientSession
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import java.io.ByteArrayOutputStream
import java.io.IOException
@@ -76,7 +76,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
channel!!.err = ByteArrayOutputStream()
channel!!.open()
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to start Shell channel: ${e.message}")
+ throw BluePrintProcessorException("Failed to start Shell channel: ${e.message}")
}
}
@@ -97,7 +97,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
}
}
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to execute commands, below the error message : ${e.message}")
+ throw BluePrintProcessorException("Failed to execute commands, below the error message : ${e.message}")
}
return response
}
@@ -111,7 +111,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
teeOutput!!.flush()
deviceOutput = waitForPrompt(timeOut)
} catch (e: IOException) {
- throw BlueprintProcessorException("Exception during command execution: ${e.message}", e)
+ throw BluePrintProcessorException("Exception during command execution: ${e.message}", e)
}
if (detectFailure(deviceOutput)) {
@@ -130,7 +130,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
Collections.unmodifiableSet(EnumSet.of(ClientChannelEvent.CLOSED)), timeOut
)
if (channel!!.out.toString().indexOfAny(arrayListOf("$", ">", "#")) <= 0 && waitMask.contains(ClientChannelEvent.TIMEOUT)) {
- throw BlueprintProcessorException("Timeout: Failed to retrieve commands result in $timeOut ms")
+ throw BluePrintProcessorException("Timeout: Failed to retrieve commands result in $timeOut ms")
}
val outputResult = channel!!.out.toString()
channel!!.out.flush()
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
index 4803d5f52..90a1746e8 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
@@ -17,16 +17,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshLibConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
-open class BlueprintSshLibPropertyService(private var bluePrintProperties: BlueprintPropertiesService) {
+open class BluePrintSshLibPropertyService(private var bluePrintProperties: BluePrintPropertiesService) {
fun blueprintSshClientService(jsonNode: JsonNode): BlueprintSshClientService {
val restClientProperties = sshClientProperties(jsonNode)
@@ -46,14 +46,14 @@ open class BlueprintSshLibPropertyService(private var bluePrintProperties: Bluep
basicAuthSshClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("SSH adaptor($type) is not supported")
+ throw BluePrintProcessorException("SSH adaptor($type) is not supported")
}
}
}
fun sshClientProperties(jsonNode: JsonNode): SshClientProperties {
val type = jsonNode.get("type")?.textValue()
- ?: throw BlueprintProcessorException("missing type field in ssh client properties")
+ ?: throw BluePrintProcessorException("missing type field in ssh client properties")
return when (type) {
SshLibConstants.TYPE_BASIC_AUTH -> {
JacksonUtils.readValue(
@@ -62,7 +62,7 @@ open class BlueprintSshLibPropertyService(private var bluePrintProperties: Bluep
)!!
}
else -> {
- throw BlueprintProcessorException("SSH adaptor($type) is not supported")
+ throw BluePrintProcessorException("SSH adaptor($type) is not supported")
}
}
}
@@ -74,7 +74,7 @@ open class BlueprintSshLibPropertyService(private var bluePrintProperties: Bluep
return BasicAuthSshClientService(sshClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get SSH client service for")
+ throw BluePrintProcessorException("couldn't get SSH client service for")
}
}
}