summaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/test-blueprint
diff options
context:
space:
mode:
authorBrinda Santh <bs2796@att.com>2019-12-31 10:53:59 -0500
committerBrinda Santh <bs2796@att.com>2019-12-31 10:53:59 -0500
commitba75d2fad2b0111a510f4ee4cc87e658fb32ac4b (patch)
tree92c50b5bea79bb6c424aab6b0ac2e805a9e36e07 /components/model-catalog/blueprint-model/test-blueprint
parent1fdaf4953daf15970afe6ee10491dfa2d0a76753 (diff)
Flexible DSL Types and Templates definition.
Easy search definitions Types and Templates inside ServiceTemplate DSL builder. Unit test modifications to support this change. Issue-ID: CCSDK-1054 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: Ie944ff5f75f80c852555306e1a4e0fa7f5b803d7
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt16
1 files changed, 7 insertions, 9 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt
index a4a2ccf61..698bf330f 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt
@@ -21,8 +21,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTypeCompone
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.relationshipTemplateSshClient
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.relationshipTypeConnectsToSshClient
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.artifactTypeTemplateVelocity
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getAttribute
@@ -62,7 +60,8 @@ fun CapabilityCliDefinitions.defaultServiceTemplate() =
step(id = "check", target = "check", description = "Calling check script node")
}
- val checkComponent = BluePrintTypes.nodeTemplateComponentScriptExecutor(id = "check", description = "") {
+ /** Check component Node Template */
+ nodeTemplateComponentScriptExecutor(id = "check", description = "") {
definedOperation(description = "") {
inputs {
type(BluePrintConstants.SCRIPT_KOTLIN)
@@ -78,7 +77,6 @@ fun CapabilityCliDefinitions.defaultServiceTemplate() =
file = "Templates/check-command-template.vtl"
)
}
- nodeTemplate(checkComponent)
/** Connection Configuration through Relationship **/
relationshipTemplateSshClient("ssh-connection-config", "Device connection config") {
@@ -91,11 +89,11 @@ fun CapabilityCliDefinitions.defaultServiceTemplate() =
}
/** Artifact Types */
- artifactType(BluePrintTypes.artifactTypeTemplateVelocity())
+ artifactTypeTemplateVelocity()
/** Node Types */
- nodeType(BluePrintTypes.nodeTypeComponent())
- nodeType(BluePrintTypes.nodeTypeComponentScriptExecutor())
+ nodeTypeComponent()
+ nodeTypeComponentScriptExecutor()
/** Relationship Types */
- relationshipType(BluePrintTypes.relationshipTypeConnectsToSshClient())
- relationshipType(BluePrintTypes.relationshipTypeConnectsTo())
+ relationshipTypeConnectsToSshClient()
+ relationshipTypeConnectsTo()
}