summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-07-25 15:13:36 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-25 15:13:36 +0000
commit961f4b1e3b91ffa3821d02ac4a57cd207e8081bb (patch)
tree8035e898705fec594754244502f6d2ecb8d97244 /components
parent905f9ae5460fdf66d8923734ba0d6dba0693106a (diff)
parent88e24883c8e22711062ad451250ff7e3646485b3 (diff)
Merge "Fix attribute validation for complex type."
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())