summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions')
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml12
-rw-r--r--ms/blueprintsprocessor/functions/cli-executor/pom.xml6
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/pom.xml4
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/pom.xml6
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt23
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritizaion/pom.xml6
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/pom.xml4
-rwxr-xr-xms/blueprintsprocessor/functions/pom.xml9
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/pom.xml4
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/pom.xml6
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/pom.xml4
-rw-r--r--ms/blueprintsprocessor/functions/restful-executor/pom.xml8
12 files changed, 51 insertions, 41 deletions
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml b/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml
index 7be13dece..43f4598b5 100644
--- a/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -28,7 +28,7 @@
<artifactId>ansible-awx-executor</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>Blueprints Processor Function - Ansible AWX Executor</name>
+ <name>MS Blueprints Processor Functions - Ansible AWX Executor</name>
<description>Blueprints Processor Function - Ansible Executor</description>
<dependencies>
@@ -37,15 +37,15 @@
<artifactId>jython-standalone</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>rest-lib</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>blueprint-core</artifactId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
+ <artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>processor-core</artifactId>
</dependency>
<dependency>
diff --git a/ms/blueprintsprocessor/functions/cli-executor/pom.xml b/ms/blueprintsprocessor/functions/cli-executor/pom.xml
index 867809479..04c78d8e0 100644
--- a/ms/blueprintsprocessor/functions/cli-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/cli-executor/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -28,7 +28,7 @@
<artifactId>cli-executor</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>Blueprints Processor Function - CLI Executor</name>
+ <name>MS Blueprints Processor Functions - CLI Executor</name>
<description>Blueprints Processor Function - CLI Executor</description>
<dependencies>
@@ -37,7 +37,7 @@
<artifactId>resource-resolution</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>ssh-lib</artifactId>
</dependency>
</dependencies>
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/pom.xml b/ms/blueprintsprocessor/functions/config-snapshots/pom.xml
index 4aa3ebbb1..35c2113a3 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/pom.xml
+++ b/ms/blueprintsprocessor/functions/config-snapshots/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -28,7 +28,7 @@
<artifactId>config-snapshots</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>Blueprints Processor Function - Config Snapshots</name>
+ <name>MS Blueprints Processor Functions - Config Snapshots</name>
<description>Blueprints Processor Function - Config Snapshots</description>
<dependencies>
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/pom.xml b/ms/blueprintsprocessor/functions/k8s-profile-upload/pom.xml
index 674882bd2..eb36fe528 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/pom.xml
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -30,7 +30,7 @@
<artifactId>k8s-profile-upload</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>Blueprints Processor Function - K8s Profile Upload</name>
+ <name>MS Blueprints Processor Functions - K8s Profile Upload</name>
<description>Blueprints Processor Function - K8s Profile Upload</description>
<dependencies>
@@ -39,7 +39,7 @@
<artifactId>resource-resolution</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>ssh-lib</artifactId>
</dependency>
</dependencies>
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
index 0ae76ea7e..337104551 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
@@ -20,6 +20,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.profile.upload
import com.fasterxml.jackson.databind.JsonNode
+import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.commons.io.FileUtils
import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
@@ -63,6 +64,7 @@ open class K8sProfileUploadComponent(
const val INPUT_K8S_PROFILE_NAMESPACE = "k8s-rb-profile-namespace"
const val INPUT_K8S_PROFILE_SOURCE = "k8s-rb-profile-source"
const val INPUT_RESOURCE_ASSIGNMENT_MAP = "resource-assignment-map"
+ const val INPUT_ARTIFACT_PREFIX_NAMES = "artifact-prefix-names"
const val OUTPUT_STATUSES = "statuses"
const val OUTPUT_SKIPPED = "skipped"
@@ -80,7 +82,8 @@ open class K8sProfileUploadComponent(
INPUT_K8S_DEFINITION_NAME,
INPUT_K8S_DEFINITION_VERSION,
INPUT_K8S_PROFILE_NAMESPACE,
- INPUT_K8S_PROFILE_SOURCE
+ INPUT_K8S_PROFILE_SOURCE,
+ INPUT_ARTIFACT_PREFIX_NAMES
)
var outputPrefixStatuses = mutableMapOf<String, String>()
var inputParamsMap = mutableMapOf<String, JsonNode?>()
@@ -90,7 +93,7 @@ open class K8sProfileUploadComponent(
}
log.info("Getting the template prefixes")
- val prefixList: ArrayList<String> = getTemplatePrefixList(executionRequest)
+ val prefixList: ArrayList<String> = getTemplatePrefixList(inputParamsMap[INPUT_ARTIFACT_PREFIX_NAMES])
log.info("Iterating over prefixes in resource assignment map.")
for (prefix in prefixList) {
@@ -175,10 +178,18 @@ open class K8sProfileUploadComponent(
bluePrintRuntimeService.getBluePrintError().addError(runtimeException.message!!)
}
- fun getTemplatePrefixList(executionRequest: ExecutionServiceInput): ArrayList<String> {
- val result = ArrayList<String>()
- for (prefix in executionRequest.payload.get("resource-assignment-request").get("template-prefix").elements())
- result.add(prefix.asText())
+ private fun getTemplatePrefixList(node: JsonNode?): ArrayList<String> {
+ var result = ArrayList<String>()
+ when (node) {
+ is ArrayNode -> {
+ val arrayNode = node.toList()
+ for (prefixNode in arrayNode)
+ result.add(prefixNode.asText())
+ }
+ is ObjectNode -> {
+ result.add(node.asText())
+ }
+ }
return result
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritizaion/pom.xml b/ms/blueprintsprocessor/functions/message-prioritizaion/pom.xml
index 4c38c53d2..26981c020 100644
--- a/ms/blueprintsprocessor/functions/message-prioritizaion/pom.xml
+++ b/ms/blueprintsprocessor/functions/message-prioritizaion/pom.xml
@@ -20,19 +20,19 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>message-prioritizaion</artifactId>
- <name>Blueprints Processor Function - Message Prioritization</name>
+ <name>MS Blueprints Processor Functions - Message Prioritization</name>
<description>Blueprints Processor Function - Message Prioritization</description>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>message-lib</artifactId>
</dependency>
<dependency>
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml
index 69b42e016..ce497548b 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -28,7 +28,7 @@
<artifactId>netconf-executor</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>Blueprints Processor Function - Netconf Executor</name>
+ <name>MS Blueprints Processor Functions - Netconf Executor</name>
<description>Blueprints Processor Function - Netconf Executor</description>
<dependencies>
diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml
index 4d886de39..5438fed62 100755
--- a/ms/blueprintsprocessor/functions/pom.xml
+++ b/ms/blueprintsprocessor/functions/pom.xml
@@ -21,16 +21,15 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>parent</artifactId>
+ <artifactId>blueprintsprocessor-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<packaging>pom</packaging>
- <name>Blueprints Processor Functions</name>
- <description>Blueprints Processor Functions</description>
+ <name>MS Blueprints Processor Functions (Root)</name>
<modules>
<module>resource-resolution</module>
@@ -47,7 +46,7 @@
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>execution-service</artifactId>
</dependency>
<!-- Test Dependencies -->
diff --git a/ms/blueprintsprocessor/functions/python-executor/pom.xml b/ms/blueprintsprocessor/functions/python-executor/pom.xml
index c6480fade..cbf989b2c 100644
--- a/ms/blueprintsprocessor/functions/python-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/python-executor/pom.xml
@@ -20,14 +20,14 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>python-executor</artifactId>
- <name>Blueprints Processor Function - Python Executor</name>
+ <name>MS Blueprints Processor Functions - Python Executor</name>
<description>Blueprints Processor Function - Python Executor</description>
<dependencies>
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml
index 8b0b7e798..a95535168 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml
+++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -29,12 +29,12 @@
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Blueprints Processor Function - Resource Resolution</name>
+ <name>MS Blueprints Processor Functions - Resource Resolution</name>
<description>Blueprints Processor Function - Resource Resolution</description>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>db-lib</artifactId>
</dependency>
<dependency>
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/pom.xml b/ms/blueprintsprocessor/functions/restconf-executor/pom.xml
index fdc72b2bd..73502b22c 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/restconf-executor/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -28,7 +28,7 @@
<artifactId>restconf-executor</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>Blueprints Processor Function - Restconf Executor</name>
+ <name>MS Blueprints Processor Functions - Restconf Executor</name>
<description>Blueprints Processor Function - Restconf Executor</description>
<dependencies>
diff --git a/ms/blueprintsprocessor/functions/restful-executor/pom.xml b/ms/blueprintsprocessor/functions/restful-executor/pom.xml
index f5dce168e..d8ef94ae9 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/restful-executor/pom.xml
@@ -20,20 +20,20 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>functions</artifactId>
+ <artifactId>blueprintsprocessor-functions</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>restful-executor</artifactId>
- <name>Blueprints Processor Function - NRM Restful executor</name>
+ <name>MS Blueprints Processor Functions - NRM Restful executor</name>
<description>Blueprints Processor Function - NRM Restful executor</description>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>processor-core</artifactId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
+ <artifactId>processor-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>