summaryrefslogtreecommitdiffstats
path: root/components/core
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-11-20 12:20:30 -0500
committerDan Timoney <dtimoney@att.com>2018-11-30 20:22:00 +0000
commit358090593a21cb73668a53cfc3e69c1b4a761953 (patch)
treecc6b7a59eab116ece5d21857dc7703dbfc89c78c /components/core
parent267d1bf1dfc509da7914a4449dfe80430ca6b377 (diff)
Add Jython Component model and validation logics.
Change-Id: I2bdba0016a41e16198d60be68dff68d1ce7ad13a Issue-ID: CCSDK-696 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'components/core')
-rw-r--r--components/core/load/model_type/node_type/component-resource-assignment.json2
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt1
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintTypes.kt1
-rw-r--r--components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt8
4 files changed, 7 insertions, 5 deletions
diff --git a/components/core/load/model_type/node_type/component-resource-assignment.json b/components/core/load/model_type/node_type/component-resource-assignment.json
index 1389bc32..2a903561 100644
--- a/components/core/load/model_type/node_type/component-resource-assignment.json
+++ b/components/core/load/model_type/node_type/component-resource-assignment.json
@@ -7,7 +7,7 @@
}
},
"interfaces": {
- "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": {
+ "ResourceAssignmentComponent": {
"operations": {
"process": {
"inputs": {
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt
index 84d2befc..a4128418 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt
@@ -93,6 +93,7 @@ object BluePrintConstants {
const val MODEL_TYPE_NODES_COMPONENT_BUNDLE: String = "tosca.nodes.component.Bundle"
const val MODEL_TYPE_NODES_COMPONENT_SCRIPT: String = "tosca.nodes.component.Script"
const val MODEL_TYPE_NODES_COMPONENT_PYTHON: String = "tosca.nodes.component.Python"
+ const val MODEL_TYPE_NODES_COMPONENT_JYTHON: String = "tosca.nodes.component.Jython"
const val MODEL_TYPE_NODES_COMPONENT_JAVA_SCRIPT: String = "tosca.nodes.component.JavaScript"
const val MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION = "tosca.artifacts.Implementation"
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintTypes.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintTypes.kt
index a971898d..64797ed4 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintTypes.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintTypes.kt
@@ -37,6 +37,7 @@ object BluePrintTypes {
BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_BUNDLE,
BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_SCRIPT,
BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_PYTHON,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_JYTHON,
BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_JAVA_SCRIPT
)
diff --git a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index 19c6c2f9..2f519802 100644
--- a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
+++ b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -69,7 +69,7 @@ class BluePrintRuntimeServiceTest {
"data/default-context.json", executionContext)
val inContext: MutableMap<String, JsonNode> = bluePrintRuntimeService.resolveNodeTemplateInterfaceOperationInputs("resource-assignment",
- "DefaultComponentNode", "process")
+ "ResourceAssignmentComponent", "process")
assertNotNull(inContext, "Failed to populate interface input property values")
assertEquals(inContext["action-name"], jsonNodeFromObject("sample-action"), "Failed to populate parameter action-name")
@@ -86,14 +86,14 @@ class BluePrintRuntimeServiceTest {
bluePrintRuntimeService.setNodeTemplateAttributeValue("resource-assignment", "assignment-params", NullNode.getInstance())
bluePrintRuntimeService.resolveNodeTemplateInterfaceOperationOutputs("resource-assignment",
- "DefaultComponentNode", "process")
+ "ResourceAssignmentComponent", "process")
val outputStatus = bluePrintRuntimeService.getNodeTemplateOperationOutputValue("resource-assignment",
- "DefaultComponentNode", "process", "status")
+ "ResourceAssignmentComponent", "process", "status")
assertEquals("success".asJsonPrimitive(), outputStatus, "Failed to get operation property status")
val outputParams = bluePrintRuntimeService.getNodeTemplateOperationOutputValue("resource-assignment",
- "DefaultComponentNode", "process", "resource-assignment-params")
+ "ResourceAssignmentComponent", "process", "resource-assignment-params")
assertEquals(NullNode.getInstance(), outputParams, "Failed to get operation property resource-assignment-params")
}