aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/blueprint-core
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-core')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-bpmn-camunda.json8
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-directed-graph.json9
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-mapping-resource.json8
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-script-python.json8
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-jinja.json8
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-velocity.json8
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/tosca.artifacts.Implementation.json5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-property.json27
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-resource-assignment.json46
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-license-key.json11
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-v4-aggregate.json15
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/tosca.datatypes.Credential.json31
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/artifact-config-template.json37
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-config-generator.json72
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-netconf-executor.json79
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-resource-assignment.json68
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json52
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json51
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json56
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json51
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Artifact.json5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Component.json5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.DG.json5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Vnf.json5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.component.Python.json5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/vnf-netconf-device.json42
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt4
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt6
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt10
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt7
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt4
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json4
32 files changed, 18 insertions, 734 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-bpmn-camunda.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-bpmn-camunda.json
deleted file mode 100644
index cae06c18f..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-bpmn-camunda.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Camunda BPM File",
- "version": "1.0.0",
- "file_ext": [
- "bpmn"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-directed-graph.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-directed-graph.json
deleted file mode 100644
index 10bf7d2c4..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-directed-graph.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "description": "Directed Graph File",
- "version": "1.0.0",
- "file_ext": [
- "json",
- "xml"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-mapping-resource.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-mapping-resource.json
deleted file mode 100644
index f50562890..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-mapping-resource.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Velocity and jinja Templates Resource Mapping File used along with Configuration template",
- "version": "1.0.0",
- "file_ext": [
- "json"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-script-python.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-script-python.json
deleted file mode 100644
index 22af3b0a9..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-script-python.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Kotlin Script Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "py"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-jinja.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-jinja.json
deleted file mode 100644
index e32da5ef0..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-jinja.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": "Jinja Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "jinja"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-velocity.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-velocity.json
deleted file mode 100644
index 20f94c946..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/artifact-template-velocity.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Velocity Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "vtl"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/tosca.artifacts.Implementation.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/tosca.artifacts.Implementation.json
deleted file mode 100644
index d75f33760..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/artifact_type/tosca.artifacts.Implementation.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "TOSCA base type for implementation artifacts",
- "version": "1.0.0",
- "derived_from": "tosca.artifacts.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-property.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-property.json
deleted file mode 100644
index d3ecffd17..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-property.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "version": "1.0.0",
- "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",
- "properties": {
- "type": {
- "required": true,
- "type": "string"
- },
- "description": {
- "required": false,
- "type": "string"
- },
- "required": {
- "required": false,
- "type": "boolean"
- },
- "default": {
- "required": false,
- "type": "string"
- },
- "entry_schema": {
- "required": false,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-resource-assignment.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-resource-assignment.json
deleted file mode 100644
index 8fa595a15..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/datatype-resource-assignment.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "version": "1.0.0",
- "description": "This is Resource Assignment Data Type",
- "properties": {
- "property": {
- "required": true,
- "type": "datatype-property"
- },
- "input-param": {
- "required": true,
- "type": "boolean"
- },
- "dictionary-name": {
- "required": false,
- "type": "string"
- },
- "dictionary-source": {
- "required": false,
- "type": "string"
- },
- "dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "status": {
- "required": false,
- "type": "string"
- },
- "message": {
- "required": false,
- "type": "string"
- },
- "updated-date": {
- "required": false,
- "type": "string"
- },
- "updated-by": {
- "required": false,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-license-key.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-license-key.json
deleted file mode 100644
index 27e25fe17..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-license-key.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "version": "1.0.0",
- "description": "This is dt-plicense-key Data Type",
- "properties": {
- "license-key": {
- "required": true,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-v4-aggregate.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-v4-aggregate.json
deleted file mode 100644
index 4f7be2dba..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/dt-v4-aggregate.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "version": "1.0.0",
- "description": "This is dt-v4-aggregate Data Type",
- "properties": {
- "ipv4-address": {
- "required": true,
- "type": "string"
- },
- "ipv4-plen": {
- "required": false,
- "type": "integer"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/tosca.datatypes.Credential.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/tosca.datatypes.Credential.json
deleted file mode 100644
index 68d91652f..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/data_type/tosca.datatypes.Credential.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "version": "1.0.0",
- "description": "Credential",
- "properties": {
- "protocol": {
- "required": false,
- "type": "string"
- },
- "token_type": {
- "required": true,
- "type": "string",
- "default" : "password"
- },
- "token": {
- "required": false,
- "type": "string"
- },
- "keys": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "user": {
- "required": false,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/artifact-config-template.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/artifact-config-template.json
deleted file mode 100644
index 142066121..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/artifact-config-template.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "description": "This is Configuration Velocity and Jinja Template",
- "version": "1.0.0",
- "properties": {
- "action-names": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
- "capabilities": {
- "content": {
- "type": "tosca.capabilities.Content",
- "properties": {
- "content": {
- "required": true,
- "type": "string"
- }
- }
- },
- "mapping": {
- "type": "tosca.capabilities.Mapping",
- "properties": {
- "mapping": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-resource-assignment"
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Artifact"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-config-generator.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-config-generator.json
deleted file mode 100644
index 3d90986a0..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-config-generator.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "description": "This is Generate Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-onap-ccsdk-config-generator-service-ConfigGeneratorNode": {
- "operations": {
- "process": {
- "inputs": {
- "template-data": {
- "description": "Conditional : JSON string which is used to mash with template. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "template-content": {
- "description": "Conditional : Dynamic Template used to generate Configuration.",
- "required": false,
- "type": "string"
- },
- "resource-type": {
- "description": "Conditional : resource-type used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Conditional : Id used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "action-name": {
- "description": "Conditional : Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "template-name": {
- "description": "Conditional : Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "generated-config": {
- "description": "Generated Configuration for the Template adn Resource Data",
- "required": true,
- "type": "string"
- },
- "mask-info": {
- "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.cds.controllerblueprints.core.data.custom.MaskInfo ",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-netconf-executor.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-netconf-executor.json
deleted file mode 100644
index 22f5c9b3c..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-netconf-executor.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "description": "This is Netconf Transaction Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "netconf-connection": {
- "capability": "netconf",
- "node": "vnf-netconf-device",
- "relationship": "tosca.relationships.ConnectsTo"
- }
- },
- "interfaces": {
- "org-onap-ccsdk-netconf-adaptor-service-NetconfExecutorNode": {
- "operations": {
- "process": {
- "inputs": {
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "service-template-name": {
- "description": "Service Template Name",
- "required": true,
- "type": "string"
- },
- "service-template-version": {
- "description": "Service Template Version",
- "required": true,
- "type": "string"
- },
- "action-name": {
- "description": "Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "resource-type": {
- "description": "Resource Type to get from Database, Either (message & mask-info ) or( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "resource-id": {
- "description": "Resource Id to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "reservation-id": {
- "description": "Reservation Id used to send to NPM",
- "required": false,
- "type": "string"
- },
- "execution-script": {
- "description": "Python Script to Execute for this Component action, It should refer any one of Prython Artifact Definition for this Node Template.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "response-data": {
- "description": "Execution Response Data in JSON format.",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-resource-assignment.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-resource-assignment.json
deleted file mode 100644
index e009f8583..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/component-resource-assignment.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "description": "This is Resource Assignment Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "ResourceAssignmentComponent": {
- "operations": {
- "process": {
- "inputs": {
- "service-template-name": {
- "description": "Service Template Name.",
- "required": true,
- "type": "string"
- },
- "service-template-version": {
- "description": "Service Template Version.",
- "required": true,
- "type": "string"
- },
- "resource-type": {
- "description": "Request type.",
- "required": true,
- "type": "string"
- },
- "template-names": {
- "description": "Name of the artifact Node Templates, to get the template Content.",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "request-id": {
- "description": "Request Id, Unique Id for the request.",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Resource Id.",
- "required": true,
- "type": "string"
- },
- "action-name": {
- "description": "Action Name of the process",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "resource-assignment-params": {
- "required": true,
- "type": "string"
- },
- "status": {
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json
deleted file mode 100644
index c17a36c1b..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "description": "This is Download Netconf Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": false
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-netconf-executor",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ActivateNetconf": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
-
- "derived_from": "tosca.nodes.Workflow"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json
deleted file mode 100644
index 4d5343c3a..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "description": "This is Activate DG for Config Generator Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": false
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-config-generator",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "GenerateConfiguration": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Workflow"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json
deleted file mode 100644
index f44486416..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "description": "This is Resource Assign and Activate Netconf Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": false
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "ra-component": {
- "capability": "component-node",
- "node": "component-resource-assignment",
- "relationship": "tosca.relationships.DependsOn"
- },
- "netconf-component": {
- "capability": "component-node",
- "node": "component-netconf-executor",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignAndActivate": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Workflow"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json
deleted file mode 100644
index d13668aaf..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "description": "This is Resource Assignment Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": false
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-resource-assignment",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignment": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Workflow"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Artifact.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Artifact.json
deleted file mode 100644
index 4db3f73c8..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Artifact.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is Deprecated Artifact Node Type.",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Component.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Component.json
deleted file mode 100644
index d559216af..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Component.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is default Component Node",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.DG.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.DG.json
deleted file mode 100644
index eb8cac0ae..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.DG.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is Directed Graph Node Type",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Vnf.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Vnf.json
deleted file mode 100644
index c2f5b8687..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.Vnf.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is VNF Node Type",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.component.Python.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.component.Python.json
deleted file mode 100644
index 908e5682e..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/tosca.nodes.component.Python.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is Python Component",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/vnf-netconf-device.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/vnf-netconf-device.json
deleted file mode 100644
index b226a0cf8..000000000
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/vnf-netconf-device.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "description": "This is VNF Device with Netconf Capability",
- "version": "1.0.0",
- "capabilities": {
- "netconf": {
- "type": "tosca.capability.Netconf",
- "properties": {
- "login-key": {
- "required": true,
- "type": "string",
- "default": "sdnc"
- },
- "login-account": {
- "required": true,
- "type": "string",
- "default": "sdnc-tacacs"
- },
- "source": {
- "required": true,
- "type": "string",
- "default": "npm"
- },
- "target-ip-address": {
- "required": true,
- "type": "string"
- },
- "port-number": {
- "required": true,
- "type": "integer",
- "default": 830
- },
- "connection-time-out": {
- "required": false,
- "type": "integer",
- "default": 30
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Vnf"
-
-}
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
index 08bc6c3fd..b74b7e4cf 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
@@ -54,6 +54,10 @@ fun String.asJsonPrimitive(): TextNode {
return TextNode(this)
}
+inline fun <reified T : Any> String.jsonAsType(): T {
+ return JacksonUtils.readValue<T>(this.trim())
+}
+
// If you know the string is json content, then use the function directly
fun String.jsonAsJsonType(): JsonNode {
return JacksonUtils.jsonNode(this.trim())
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt
index 8674c4d40..9b25a5ac9 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt
@@ -1,5 +1,6 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2019 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,14 +18,11 @@
package org.onap.ccsdk.cds.controllerblueprints.core.config
-open class BluePrintPathConfiguration {
+open class BluePrintLoadConfiguration {
lateinit var blueprintDeployPath: String
lateinit var blueprintArchivePath: String
lateinit var blueprintWorkingPath: String
-}
-
-open class BluePrintLoadConfiguration : BluePrintPathConfiguration() {
var loadInitialData: Boolean = false
var loadBluePrint: Boolean = false
var loadBluePrintPaths: String? = null
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt
index a06fb99ff..78997fe52 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt
@@ -25,7 +25,7 @@ import com.hubspot.jinjava.interpret.JinjavaInterpreter
import com.hubspot.jinjava.loader.ResourceLocator
import com.hubspot.jinjava.loader.ResourceNotFoundException
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintJsonNodeFactory
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.removeNullNode
@@ -39,7 +39,7 @@ object BluePrintJinjaTemplateService {
/**
* To enable inheritance within CBA, we need Jinja runtime to know where to load the templates.
*/
- class BlueprintRelatedTemplateLocator(private val bluePrintPathConfiguration: BluePrintPathConfiguration,
+ class BlueprintRelatedTemplateLocator(private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val artifactName: String,
private val artifactVersion: String) : ResourceLocator {
@@ -47,7 +47,7 @@ object BluePrintJinjaTemplateService {
override fun getString(fullName: String, encoding: Charset, interpreter: JinjavaInterpreter): String {
try {
val deployFile =
- normalizedPathName(bluePrintPathConfiguration.blueprintDeployPath,
+ normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath,
artifactName,
artifactVersion,
fullName)
@@ -62,14 +62,14 @@ object BluePrintJinjaTemplateService {
fun generateContent(template: String, json: String, ignoreJsonNull: Boolean,
additionalContext: MutableMap<String, Any>,
- bluePrintPathConfiguration: BluePrintPathConfiguration, artifactName: String,
+ bluePrintLoadConfiguration: BluePrintLoadConfiguration, artifactName: String,
artifactVersion: String): String {
return generateContent(template,
json,
ignoreJsonNull,
additionalContext,
- BlueprintRelatedTemplateLocator(bluePrintPathConfiguration, artifactName, artifactVersion))
+ BlueprintRelatedTemplateLocator(bluePrintLoadConfiguration, artifactName, artifactVersion))
}
fun generateContent(template: String, json: String, ignoreJsonNull: Boolean,
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt
index af97d6691..2c928e288 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt
@@ -17,13 +17,12 @@ package org.onap.ccsdk.cds.controllerblueprints.core.service
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTemplateService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service
-class BluePrintTemplateService(private val bluePrintPathConfiguration: BluePrintPathConfiguration) :
+class BluePrintTemplateService(private val bluePrintLoadConfiguration: BluePrintLoadConfiguration) :
BlueprintTemplateService {
override suspend fun generateContent(bluePrintRuntimeService: BluePrintRuntimeService<*>,
@@ -41,7 +40,7 @@ class BluePrintTemplateService(private val bluePrintPathConfiguration: BluePrint
jsonData,
ignoreJsonNull,
additionalContext,
- bluePrintPathConfiguration,
+ bluePrintLoadConfiguration,
bluePrintRuntimeService.bluePrintContext().name(),
bluePrintRuntimeService.bluePrintContext().version())
}
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
index ac4fc6aea..47b4f2179 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
@@ -28,7 +28,7 @@ import kotlin.test.assertNotNull
*/
class BluePrintRepoFileServiceTest {
- private val basePath = "load/model_type"
+ private val basePath = "./../../../../components/model-catalog/definition-type/starter-type"
private val bluePrintRepoFileService = BluePrintRepoFileService(basePath)
@Test
@@ -39,7 +39,7 @@ class BluePrintRepoFileServiceTest {
@Test
fun testGetNodeType() {
- val nodeType = bluePrintRepoFileService.getNodeType("component-resource-assignment")
+ val nodeType = bluePrintRepoFileService.getNodeType("component-resource-resolution")
assertNotNull(nodeType, "Failed to get NodeType from repo")
}
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json
index e8394a085..b7340f336 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json
@@ -92,7 +92,7 @@
}
}
},
- "config-data": {
+ "sdnc": {
"type": "object",
"properties": {
"path": {
@@ -226,7 +226,7 @@
}
}
},
- "config-data": {
+ "sdnc": {
"type": "object",
"properties": {
"names": {