summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-07-24 22:34:39 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2019-07-24 22:34:39 -0400
commit88e24883c8e22711062ad451250ff7e3646485b3 (patch)
treedfc52871d9a5884e321ac6e32e239169dfff2603 /components
parentef03bd490adb4483fc0dd0f8726f33ba6187804a (diff)
Fix attribute validation for complex type.
Change-Id: I7a3365c4c26fd44ed0b54bff115b64c52ee7b81e Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'components')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/CapabilityCliDefinitions.kt35
1 files changed, 16 insertions, 19 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/CapabilityCliDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/CapabilityCliDefinitions.kt
index 057030b22..3bf07e79d 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/CapabilityCliDefinitions.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/CapabilityCliDefinitions.kt
@@ -37,14 +37,12 @@ fun CapabilityCliDefinitions.defaultServiceTemplate() =
author = "Brinda Santh Muthuramalingam",
tags = "brinda, tosca") {
- dsl("device-properties", """"
- {
+ dsl("device-properties", """{
"type": "basic-auth",
"host": { "get_input": "hostname" },
"username": { "get_input": "username" },
"password": { "get_input": "password" }
- }
- """.trimIndent())
+ }""".trimIndent())
topologyTemplate {
@@ -56,27 +54,26 @@ fun CapabilityCliDefinitions.defaultServiceTemplate() =
property(id = "data", type = "json", required = true, description = "")
}
outputs {
- property(id = "status", required = true, type = "string", description = "")
+ property(id = "status", required = true, type = "string", description = "") {
+ value("success")
+ }
}
step(id = "check", target = "check", description = "Calling check script node")
-
}
- nodeTemplate(id = "check",
- type = "component-script-executor",
- description = "") {
- operation(interfaceName = "process", description = "") {
- inputs {
- property(id = "script-type", value = "kotlin")
- property(id = "script-class-reference", value = "cba.scripts.capability.cli.Check")
- }
- outputs {
- property(id = "response-data", value = "")
- property(id = "status", value = "success")
- }
+ val checkComponent = componentScriptExecutor(id = "check", description = "") {
+ inputs {
+ type("kotlin")
+ scriptClassReference("cba.scripts.capability.cli.Check")
+ }
+ outputs {
+ status("success")
+ responseData("""{ "data" : "Here I am "}""")
}
- artifact(id = "command-template", type = "artifact-template-velocity", file = "Templates/check-command-template.vtl")
+ artifact(id = "command-template", type = "artifact-template-velocity",
+ file = "Templates/check-command-template.vtl")
}
+ nodeTemplate(checkComponent)
}
artifactType(BluePrintTypes.artifactTypeTemplateVelocity())