aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json88
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json54
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json1
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta5
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json5
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json45
-rw-r--r--components/model-catalog/proto-definition/pom.xml5
-rw-r--r--components/parent/pom.xml3
-rw-r--r--components/pom.xml3
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml3
-rwxr-xr-xms/blueprintsprocessor/distribution/pom.xml7
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/pom.xml3
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/pom.xml3
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/pom.xml7
-rwxr-xr-xms/blueprintsprocessor/modules/commons/pom.xml3
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml3
-rwxr-xr-xms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml3
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/pom.xml3
-rwxr-xr-xms/blueprintsprocessor/parent/pom.xml3
-rw-r--r--ms/cds-sdc-listener/application/pom.xml9
-rw-r--r--ms/cds-sdc-listener/distribution/pom.xml7
-rw-r--r--ms/cds-sdc-listener/pom.xml7
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/pom.xml7
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt38
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-scripts/pom.xml7
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt7
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt4
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt23
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceDefinitionEnhancerService.kt2
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt28
-rw-r--r--ms/controllerblueprints/parent/pom.xml3
-rw-r--r--ms/neng/pom.xml2
-rw-r--r--ms/vlantag-api/pom.xml8
-rwxr-xr-xpom.xml2
41 files changed, 308 insertions, 111 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json
new file mode 100644
index 00000000..eadc848b
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json
@@ -0,0 +1,3 @@
+{
+ "artifact_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json
new file mode 100644
index 00000000..eeb9815f
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json
@@ -0,0 +1,88 @@
+{
+ "tosca_definitions_version": "controller_blueprint_1_0_0",
+ "metadata": {
+ "template_author": "Brinda Santh <brindasanth@in.ibm.com>",
+ "template_name": "component_invoke",
+ "template_version": "1.0.0",
+ "template_tags": "brinda, component_invoke"
+ },
+ "imports": [
+ {
+ "file": "Definitions/data_types.json"
+ },
+ {
+ "file": "Definitions/relationship_types.json"
+ },
+ {
+ "file": "Definitions/artifact_types.json"
+ },
+ {
+ "file": "Definitions/node_types.json"
+ },
+ {
+ "file": "Definitions/policy_types.json"
+ }
+ ],
+ "topology_template": {
+ "workflows": {
+ "component-invoke": {
+ "steps": {
+ "activate-process": {
+ "description": "Sample Component Invocation flow",
+ "target": "sample-component",
+ "activities": [
+ {
+ "call_operation": "sample-component"
+ }
+ ]
+ }
+ },
+ "inputs": {
+ "request-id": {
+ "required": true,
+ "type": "string"
+ },
+ "action-name": {
+ "required": true,
+ "type": "string"
+ },
+ "scope-type": {
+ "required": true,
+ "type": "string"
+ },
+ "hostname": {
+ "required": true,
+ "type": "string"
+ }
+ }
+ }
+ },
+ "node_templates": {
+ "sample-component": {
+ "type": "component-sample-executor",
+ "interfaces": {
+ "ComponentSampleExecutor": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "sample-property": "sample-value",
+ "sample-list-property": [
+ "json-parser-service"
+ ],
+ "dynamic-properties": {
+ "prop1": "prop1-value",
+ "prop2": "prop2-value"
+ }
+ },
+ "outputs": {
+ "response-data": "",
+ "status": ""
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json
new file mode 100644
index 00000000..8c304c40
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json
@@ -0,0 +1,3 @@
+{
+ "data_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json
new file mode 100644
index 00000000..1e02cef4
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json
@@ -0,0 +1,54 @@
+{
+ "node_types": {
+ "component-sample-executor": {
+ "description": "This is Sample Component API",
+ "version": "1.0.0",
+ "interfaces": {
+ "ComponentSampleExecutor": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "sample-property": {
+ "description": "Sample Property.",
+ "required": true,
+ "type": "string"
+ },
+ "sample-list-property": {
+ "description": "Dependent Step Components NodeTemplate name.",
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "dynamic-properties": {
+ "description": "Dynamic Json Content or DSL Json reference.",
+ "required": false,
+ "type": "json"
+ }
+ },
+ "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"
+ },
+ "tosca.nodes.Component": {
+ "description": "This is default Component Node",
+ "version": "1.0.0",
+ "derived_from": "tosca.nodes.Root"
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json
new file mode 100644
index 00000000..1e44cc70
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json
@@ -0,0 +1,3 @@
+{
+ "policy_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json
new file mode 100644
index 00000000..4ddd7a57
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json
@@ -0,0 +1,3 @@
+{
+ "relationship_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json
new file mode 100644
index 00000000..6f31cf5a
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json
@@ -0,0 +1 @@
+{ } \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta
new file mode 100644
index 00000000..a7c130a2
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta
@@ -0,0 +1,5 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Brinda Santh <brindasanth@in.ibm.com>
+Entry-Definitions: Definitions/component_invoke.json
+Template-Tags: Brinda Santh, component_invoke \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json
index 7e429c01..3233d212 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json
@@ -33,11 +33,6 @@
}
]
},
- "dynamic-properties": {
- "description": "Resolvable dynamic property.",
- "required": false,
- "type": "string"
- },
"script-class-reference": {
"description": "Kotlin Script class name or jython script name.",
"required": true,
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json
new file mode 100644
index 00000000..68b3ebde
--- /dev/null
+++ b/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json
@@ -0,0 +1,45 @@
+{
+ "description": "This is Sample Component API",
+ "version": "1.0.0",
+ "interfaces": {
+ "ComponentSampleExecutor": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "sample-property": {
+ "description": "Sample Property.",
+ "required": true,
+ "type": "string"
+ },
+ "sample-list-property": {
+ "required": true,
+ "description": "Dependent Step Components NodeTemplate name.",
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "dynamic-properties": {
+ "description": "Dynamic Json Content or DSL Json reference.",
+ "required": false,
+ "type": "json"
+ }
+ },
+ "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/components/model-catalog/proto-definition/pom.xml b/components/model-catalog/proto-definition/pom.xml
index 4680f629..35fc9a9a 100644
--- a/components/model-catalog/proto-definition/pom.xml
+++ b/components/model-catalog/proto-definition/pom.xml
@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps</groupId>
@@ -84,4 +83,4 @@
</plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/components/parent/pom.xml b/components/parent/pom.xml
index 1d633efe..dd74622d 100644
--- a/components/parent/pom.xml
+++ b/components/parent/pom.xml
@@ -16,8 +16,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps</groupId>
diff --git a/components/pom.xml b/components/pom.xml
index c18e968f..1915fecf 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -15,8 +15,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.onap.ccsdk.apps</groupId>
<artifactId>ccsdk-apps</artifactId>
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index c96bd086..ff7680d5 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -17,8 +17,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/distribution/pom.xml b/ms/blueprintsprocessor/distribution/pom.xml
index 97d4271d..8fcad07b 100755
--- a/ms/blueprintsprocessor/distribution/pom.xml
+++ b/ms/blueprintsprocessor/distribution/pom.xml
@@ -14,9 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
@@ -81,8 +79,7 @@
<phase>package</phase>
<configuration>
<tasks>
- <fixcrlf srcdir="${basedir}" eol="unix"
- includes="**/*.sh, **/*.source" />
+ <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
</tasks>
</configuration>
<goals>
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml
index 99c3994e..3041132d 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml
@@ -14,8 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
<artifactId>functions</artifactId>
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml
index 9d56829a..840124fa 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml
+++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml
@@ -14,8 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/pom.xml b/ms/blueprintsprocessor/functions/restconf-executor/pom.xml
index b87b2948..e81c5276 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/restconf-executor/pom.xml
@@ -14,10 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>functions</artifactId>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
@@ -42,4 +39,4 @@
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml
index e1c07ddb..07d7551f 100755
--- a/ms/blueprintsprocessor/modules/commons/pom.xml
+++ b/ms/blueprintsprocessor/modules/commons/pom.xml
@@ -17,8 +17,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
index 625297bf..0c8e163f 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
@@ -15,8 +15,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml
index f538a152..abd76dc1 100755
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml
@@ -17,8 +17,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml
index f5e3b3d0..42d2e074 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml
+++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml
@@ -15,8 +15,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml
index 9d570768..48f18eff 100755
--- a/ms/blueprintsprocessor/parent/pom.xml
+++ b/ms/blueprintsprocessor/parent/pom.xml
@@ -17,8 +17,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps</groupId>
diff --git a/ms/cds-sdc-listener/application/pom.xml b/ms/cds-sdc-listener/application/pom.xml
index daa9f0a6..54f59b7c 100644
--- a/ms/cds-sdc-listener/application/pom.xml
+++ b/ms/cds-sdc-listener/application/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2019 Bell Canada. All rights reserved.
~
@@ -5,15 +6,13 @@
~ proprietary to Bell Canada and are protected by trade secret or copyright law.
~ Unauthorized copying of this file, via any medium is strictly prohibited.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>spring-boot-1-starter-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
- <relativePath />
+ <version>1.2.1</version>
+ <relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/ms/cds-sdc-listener/distribution/pom.xml b/ms/cds-sdc-listener/distribution/pom.xml
index f2280783..60711f69 100644
--- a/ms/cds-sdc-listener/distribution/pom.xml
+++ b/ms/cds-sdc-listener/distribution/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2019 Bell Canada. All rights reserved.
~
@@ -5,9 +6,7 @@
~ proprietary to Bell Canada and are protected by trade secret or copyright law.
~ Unauthorized copying of this file, via any medium is strictly prohibited.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cds-sdc-listener</artifactId>
<groupId>org.onap.ccsdk.apps</groupId>
@@ -104,4 +103,4 @@
</profile>
</profiles>
-</project> \ No newline at end of file
+</project>
diff --git a/ms/cds-sdc-listener/pom.xml b/ms/cds-sdc-listener/pom.xml
index 0c393db7..0f2a4613 100644
--- a/ms/cds-sdc-listener/pom.xml
+++ b/ms/cds-sdc-listener/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2019 Bell Canada. All rights reserved.
~
@@ -5,9 +6,7 @@
~ proprietary to Bell Canada and are protected by trade secret or copyright law.
~ Unauthorized copying of this file, via any medium is strictly prohibited.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ccsdk-apps-ms</artifactId>
<groupId>org.onap.ccsdk.apps</groupId>
@@ -27,4 +26,4 @@
-->
</modules>
-</project> \ No newline at end of file
+</project>
diff --git a/ms/controllerblueprints/modules/blueprint-core/pom.xml b/ms/controllerblueprints/modules/blueprint-core/pom.xml
index 9461b2ca..ca47b59a 100644
--- a/ms/controllerblueprints/modules/blueprint-core/pom.xml
+++ b/ms/controllerblueprints/modules/blueprint-core/pom.xml
@@ -15,11 +15,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
@@ -73,4 +69,3 @@
</dependencies>
</project>
-
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
index e2211f7e..ca86c964 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
@@ -44,15 +44,15 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) {
*/
var entryDefinition = ""
- val imports: List<ImportDefinition>? = serviceTemplate.imports
+ fun imports(): List<ImportDefinition>? = serviceTemplate.imports
- val dslDefinitions = serviceTemplate.dslDefinitions
+ fun dslDefinitions() = serviceTemplate.dslDefinitions
val metadata: MutableMap<String, String>? = serviceTemplate.metadata
- val dataTypes: MutableMap<String, DataType>? = serviceTemplate.dataTypes
+ fun dataTypes(): MutableMap<String, DataType>? = serviceTemplate.dataTypes
- val inputs: MutableMap<String, PropertyDefinition>? = serviceTemplate.topologyTemplate?.inputs
+ fun inputs(): MutableMap<String, PropertyDefinition>? = serviceTemplate.topologyTemplate?.inputs
fun blueprintJson(pretty: Boolean = false): String = print("json", pretty)
@@ -70,9 +70,9 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) {
?: throw BluePrintException("could't get template author from meta data")
// Workflow
- val workflows: MutableMap<String, Workflow>? = serviceTemplate.topologyTemplate?.workflows
+ fun workflows(): MutableMap<String, Workflow>? = serviceTemplate.topologyTemplate?.workflows
- fun workflowByName(workFlowName: String): Workflow = workflows?.get(workFlowName)
+ fun workflowByName(workFlowName: String): Workflow = workflows()?.get(workFlowName)
?: throw BluePrintException("could't get workflow($workFlowName)")
fun workflowInputs(workFlowName: String) = workflowByName(workFlowName).inputs
@@ -99,27 +99,27 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) {
}
// DSL
- fun dslPropertiesByName(name: String): JsonNode = dslDefinitions?.get(name)
+ fun dslPropertiesByName(name: String): JsonNode = dslDefinitions()?.get(name)
?: throw BluePrintException("could't get policy type for the dsl($name)")
// Data Type
- fun dataTypeByName(name: String): DataType? = dataTypes?.get(name)
+ fun dataTypeByName(name: String): DataType? = dataTypes()?.get(name)
// Artifact Type
- val artifactTypes: MutableMap<String, ArtifactType>? = serviceTemplate.artifactTypes
+ fun artifactTypes(): MutableMap<String, ArtifactType>? = serviceTemplate.artifactTypes
// Policy Types
- val policyTypes: MutableMap<String, PolicyType>? = serviceTemplate.policyTypes
+ fun policyTypes(): MutableMap<String, PolicyType>? = serviceTemplate.policyTypes
- fun policyTypeByName(policyName: String) = policyTypes?.get(policyName)
+ fun policyTypeByName(policyName: String) = policyTypes()?.get(policyName)
?: throw BluePrintException("could't get policy type for the name($policyName)")
fun policyTypesDerivedFrom(name: String): MutableMap<String, PolicyType>? {
- return policyTypes?.filterValues { policyType -> policyType.derivedFrom == name }?.toMutableMap()
+ return policyTypes()?.filterValues { policyType -> policyType.derivedFrom == name }?.toMutableMap()
}
fun policyTypesTarget(target: String): MutableMap<String, PolicyType>? {
- return policyTypes?.filterValues { it.targets.contains(target) }?.toMutableMap()
+ return policyTypes()?.filterValues { it.targets.contains(target) }?.toMutableMap()
}
fun policyTypesTargetNDerivedFrom(target: String, derivedFrom: String): MutableMap<String, PolicyType>? {
@@ -129,14 +129,14 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) {
}
// Node Type Methods
- val nodeTypes: MutableMap<String, NodeType>? = serviceTemplate.nodeTypes
+ fun nodeTypes(): MutableMap<String, NodeType>? = serviceTemplate.nodeTypes
fun nodeTypeByName(name: String): NodeType =
- nodeTypes?.get(name)
+ nodeTypes()?.get(name)
?: throw BluePrintException("could't get node type for the name($name)")
fun nodeTypeDerivedFrom(name: String): MutableMap<String, NodeType>? {
- return nodeTypes?.filterValues { nodeType -> nodeType.derivedFrom == name }?.toMutableMap()
+ return nodeTypes()?.filterValues { nodeType -> nodeType.derivedFrom == name }?.toMutableMap()
}
fun nodeTypeInterface(nodeTypeName: String, interfaceName: String): InterfaceDefinition {
@@ -163,13 +163,13 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) {
}
// Node Template Methods
- val nodeTemplates: MutableMap<String, NodeTemplate>? = serviceTemplate.topologyTemplate?.nodeTemplates
+ fun nodeTemplates(): MutableMap<String, NodeTemplate>? = serviceTemplate.topologyTemplate?.nodeTemplates
fun nodeTemplateByName(name: String): NodeTemplate =
- nodeTemplates?.get(name) ?: throw BluePrintException("could't get node template for the name($name)")
+ nodeTemplates()?.get(name) ?: throw BluePrintException("could't get node template for the name($name)")
fun nodeTemplateForNodeType(name: String): MutableMap<String, NodeTemplate>? {
- return nodeTemplates?.filterValues { nodeTemplate -> nodeTemplate.type == name }?.toMutableMap()
+ return nodeTemplates()?.filterValues { nodeTemplate -> nodeTemplate.type == name }?.toMutableMap()
}
fun nodeTemplateNodeType(nodeTemplateName: String): NodeType {
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
index c5828073..c16d1ecc 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -488,7 +488,7 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
override fun assignInputs(jsonNode: JsonNode) {
log.info("assignInputs from input JSON ({})", jsonNode.toString())
- bluePrintContext.inputs?.forEach { propertyName, property ->
+ bluePrintContext.inputs()?.forEach { propertyName, property ->
val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)
?: NullNode.getInstance()
setInputValue(propertyName, property, valueNode)
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
index c37d8eea..d20fc553 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
@@ -49,7 +49,7 @@ object BluePrintRuntimeUtils {
fun assignInputs(bluePrintContext: BluePrintContext, jsonNode: JsonNode, context: MutableMap<String, JsonNode>) {
log.info("assignInputs from input JSON ({})", jsonNode.toString())
- bluePrintContext.inputs?.forEach { propertyName, _ ->
+ bluePrintContext.inputs()?.forEach { propertyName, _ ->
val valueNode: JsonNode = jsonNode.at("/".plus(propertyName)) ?: NullNode.getInstance()
val path = BluePrintConstants.PATH_INPUTS.plus(BluePrintConstants.PATH_DIVIDER).plus(propertyName)
diff --git a/ms/controllerblueprints/modules/blueprint-scripts/pom.xml b/ms/controllerblueprints/modules/blueprint-scripts/pom.xml
index e0858d20..cb2c33ed 100644
--- a/ms/controllerblueprints/modules/blueprint-scripts/pom.xml
+++ b/ms/controllerblueprints/modules/blueprint-scripts/pom.xml
@@ -14,10 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>modules</artifactId>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
@@ -60,4 +57,4 @@
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
index ded1f384..601ba4f5 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
@@ -247,6 +247,8 @@ open class BluePrintNodeTemplateValidatorImpl(private val bluePrintTypeValidator
if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
isValid = JacksonUtils.checkJsonNodeValueOfPrimitiveType(propertyType, propertyAssignment)
+ } else if (BluePrintTypes.validComplexTypes().contains(propertyType)) {
+ isValid = true
} else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchemaType = propertyDefinition.entrySchema?.type
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
index 851a7c60..519358b1 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
@@ -58,9 +58,10 @@ open class BluePrintWorkflowValidatorImpl(private val bluePrintTypeValidatorServ
val nodeTypeDerivedFrom = bluePrintRuntimeService.bluePrintContext().nodeTemplateNodeType(it).derivedFrom
- check(nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_DG) {
- "NodeType(${nodeTemplate.type}) derived from is '$nodeTypeDerivedFrom', Expected is " +
- "'${BluePrintConstants.MODEL_TYPE_NODE_DG}'"
+ check(nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_DG
+ || nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_COMPONENT) {
+ "NodeType(${nodeTemplate.type}) derived from is '$nodeTypeDerivedFrom', Expected " +
+ "'${BluePrintConstants.MODEL_TYPE_NODE_DG}' or '${BluePrintConstants.MODEL_TYPE_NODE_COMPONENT}'"
}
} catch (e: Exception) {
bluePrintRuntimeService.getBluePrintError()
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
index 3fc918e6..d844d1ec 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
@@ -90,7 +90,9 @@ class BluePrintDesignTimeValidatorServiceTest {
workflowValidator.validate(bluePrintRuntime, workflowName, workflow)
assertEquals(1, bluePrintRuntime.getBluePrintError().errors.size)
- assertEquals("Failed to validate Workflow(resource-assignment)'s step(test)'s definition : resource-assignment/steps/test : NodeType(TestNodeType) derived from is 'tosca.nodes.TEST', Expected is 'tosca.nodes.DG'", bluePrintRuntime.getBluePrintError().errors[0])
+ assertEquals("Failed to validate Workflow(resource-assignment)'s step(test)'s definition : " +
+ "resource-assignment/steps/test : NodeType(TestNodeType) derived from is 'tosca.nodes.TEST', " +
+ "Expected 'tosca.nodes.DG' or 'tosca.nodes.Component'", bluePrintRuntime.getBluePrintError().errors[0])
}
@Test
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
index 9fbf0916..fc9ee504 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
@@ -82,8 +82,27 @@ open class BluePrintWorkflowEnhancerImpl(private val bluePrintRepoService: BlueP
private fun enhanceStepTargets(name: String, workflow: Workflow) {
- // Get the first Step Target NodeTemplate name( Since that is the DG Node Template)
- val dgNodeTemplateName = bluePrintContext.workflowFirstStepNodeTemplate(name)
+ // Get the first Step Target NodeTemplate name( It may be Component or DG Node Template)
+ val firstNodeTemplateName = bluePrintContext.workflowFirstStepNodeTemplate(name)
+
+ val derivedFrom = bluePrintContext.nodeTemplateNodeType(firstNodeTemplateName).derivedFrom
+
+ when {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
+ // DO Nothing
+ }
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_DG, true) -> {
+ enhanceDGStepTargets(name, workflow, firstNodeTemplateName)
+ }
+ else -> {
+ throw BluePrintProcessorException("couldn't execute workflow($name) step mapped " +
+ "to node template($firstNodeTemplateName) derived from($derivedFrom)")
+ }
+ }
+
+ }
+
+ private fun enhanceDGStepTargets(name: String, workflow: Workflow, dgNodeTemplateName: String) {
val dgNodeTemplate = bluePrintContext.nodeTemplateByName(dgNodeTemplateName)
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceDefinitionEnhancerService.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceDefinitionEnhancerService.kt
index 6171687f..816b3566 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceDefinitionEnhancerService.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceDefinitionEnhancerService.kt
@@ -75,7 +75,7 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
// Get all the Mapping files from all node templates.
private fun getAllResourceMappingFiles(blueprintContext: BluePrintContext): List<String>? {
- return blueprintContext.nodeTemplates?.mapNotNull { nodeTemplateMap ->
+ return blueprintContext.nodeTemplates()?.mapNotNull { nodeTemplateMap ->
// Return only Mapping Artifact File Names
nodeTemplateMap.value.artifacts?.filter { artifactDefinitionMap ->
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
index 919d202f..48183f4c 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -64,30 +64,34 @@ class BluePrintEnhancerServiceImplTest {
fun testEnhancementAndValidation() {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
-
- val targetPath = Paths.get("target", "bp-enhance").toUri().path
-
- val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
- Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
-
- // Validate the Generated BluePrints
- val valid = bluePrintValidatorService.validateBluePrints(targetPath)
- Assert.assertTrue("blueprint validation failed ", valid)
+ testComponentInvokeEnhancementAndValidation(basePath, "base-enhance")
}
@Test
@Throws(Exception::class)
- fun testEnhancementAndValidation2() {
+ fun testComponentInvokeEnhancementAndValidation() {
+ val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/component_invoke"
+ testComponentInvokeEnhancementAndValidation(basePath, "component-enhance")
+ }
+ @Test
+ @Throws(Exception::class)
+ fun testGoldenEnhancementAndValidation() {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/golden"
+ testComponentInvokeEnhancementAndValidation(basePath, "golden-enhance")
+ }
- val targetPath = Paths.get("target", "bp-enhance").toUri().path
+
+ private fun testComponentInvokeEnhancementAndValidation(basePath: String, targetDirName: String) {
+
+ val targetPath = Paths.get("target", targetDirName).toUri().path
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
// Validate the Generated BluePrints
val valid = bluePrintValidatorService.validateBluePrints(targetPath)
- Assert.assertTrue("blueprint validation failed ", valid)
+ Assert.assertTrue("blueprint($basePath) validation failed ", valid)
}
+
} \ No newline at end of file
diff --git a/ms/controllerblueprints/parent/pom.xml b/ms/controllerblueprints/parent/pom.xml
index f59effc4..9ba4a2d4 100644
--- a/ms/controllerblueprints/parent/pom.xml
+++ b/ms/controllerblueprints/parent/pom.xml
@@ -16,8 +16,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps</groupId>
diff --git a/ms/neng/pom.xml b/ms/neng/pom.xml
index fcd3f3d2..e9477f9e 100644
--- a/ms/neng/pom.xml
+++ b/ms/neng/pom.xml
@@ -243,7 +243,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>spring-boot-1-starter-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.1</version>
<relativePath/>
</parent>
diff --git a/ms/vlantag-api/pom.xml b/ms/vlantag-api/pom.xml
index e2734703..c033e858 100644
--- a/ms/vlantag-api/pom.xml
+++ b/ms/vlantag-api/pom.xml
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
@@ -42,8 +40,8 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
- <relativePath />
+ <version>1.2.1</version>
+ <relativePath/>
</parent>
diff --git a/pom.xml b/pom.xml
index be2a417c..764ff01d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.1</version>
<relativePath/>
</parent>