summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/ssh-lib
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-06-21 18:21:42 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2019-06-25 18:39:24 -0400
commitd9e690caf3c1c0b6bb5d55dd21fc75508f267f5d (patch)
tree283de5502a6cef17e30d2bc7116bbc16c1305adf /ms/blueprintsprocessor/modules/commons/ssh-lib
parenta6fae85764a8dfbeba6000a060b8be0f21fb0466 (diff)
Refractor blueprint script dependency
Change-Id: I2e6b4dd278c1a4a3069a44f648129599365909d4 Issue-ID: CCSDK-1428 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/ssh-lib')
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
index 48e451f03..3c625a6d3 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
@@ -16,6 +16,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
+import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BluePrintSshLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshClientService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -25,6 +29,21 @@ import org.springframework.context.annotation.Configuration
@EnableConfigurationProperties
open class BluePrintSshLibConfiguration
+/**
+ * Exposed Dependency Service by this SSH Lib Module
+ */
+fun BluePrintDependencyService.sshLibPropertyService(): BluePrintSshLibPropertyService =
+ instance(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
+
+
+fun BluePrintDependencyService.sshClientService(selector: String): BlueprintSshClientService =
+ sshLibPropertyService().blueprintSshClientService(selector)
+
+
+fun BluePrintDependencyService.sshClientService(jsonNode: JsonNode): BlueprintSshClientService =
+ sshLibPropertyService().blueprintSshClientService(jsonNode)
+
+
class SshLibConstants {
companion object {
const val SERVICE_BLUEPRINT_SSH_LIB_PROPERTY = "blueprint-ssh-lib-property-service"