summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules
diff options
context:
space:
mode:
authorBrinda Santh <bs2796@att.com>2020-01-31 14:41:41 -0500
committerBrinda Santh <bs2796@att.com>2020-01-31 14:41:41 -0500
commit5c094c6adc53d958b2079de67d9d26242e10d7ef (patch)
tree0185fdf0018c47fa63ff4a1f83eee135e82e1de3 /ms/blueprintsprocessor/modules
parent23f898a96f7e8b3ecb0817abc61612bdc3d2e9aa (diff)
Spring boot, Kotlin version upgrades
Dependent Patch : https://gerrit.onap.org/r/c/ccsdk/parent/+/100990 Fixed Jackson set method according to latest version. Fixed Security properties issues for failed JUnit test cases. Reused maven properties from parent for Spring boot, Nats, Kafka, etc Issue-ID: CCSDK-1737 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I04bb0e535161e05897f587a0f08a2689e10c5f41
Diffstat (limited to 'ms/blueprintsprocessor/modules')
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt6
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt2
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt4
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt3
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt3
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt3
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt3
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt2
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt3
10 files changed, 13 insertions, 18 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
index d68d680dd..53af9f7cb 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -786,7 +786,7 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
val key = it.replace(path, "")
if (keys.contains(key)) {
val value = store[it] as JsonNode
- jsonNode.set(key, value)
+ jsonNode.set<JsonNode>(key, value)
}
}
return jsonNode
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt
index 089a610c9..3db1f84cd 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt
@@ -282,7 +282,7 @@ class JacksonUtils {
fun populatePrimitiveDefaultValues(key: String, primitiveType: String, objectNode: ObjectNode) {
val defaultValue = getDefaultValueOfPrimitiveAsJsonNode(primitiveType)
?: throw BluePrintException("populatePrimitiveDefaultValues expected only primitive values! Received type ($primitiveType)")
- objectNode.set(key, defaultValue)
+ objectNode.set<JsonNode>(key, defaultValue)
}
fun populatePrimitiveDefaultValuesForArrayNode(primitiveType: String, arrayNode: ArrayNode) {
@@ -304,11 +304,11 @@ class JacksonUtils {
fun populateJsonNodeValues(key: String, nodeValue: JsonNode?, type: String, objectNode: ObjectNode) {
if (nodeValue == null || nodeValue is NullNode) {
- objectNode.set(key, nodeValue)
+ objectNode.set<JsonNode>(key, nodeValue)
} else if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
populatePrimitiveValues(key, nodeValue, type, objectNode)
} else {
- objectNode.set(key, nodeValue)
+ objectNode.set<JsonNode>(key, nodeValue)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
index 426e43cda..72e5654d4 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
@@ -32,7 +32,7 @@ object PayloadUtils {
fun prepareRequestPayload(workflowName: String, jsonNode: JsonNode): JsonNode {
val objectNode = JacksonUtils.objectMapper.createObjectNode()
- objectNode["$workflowName-request"] = jsonNode
+ objectNode.set<JsonNode>("$workflowName-request", jsonNode)
return objectNode
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
index 34c7a7c7c..d55568df8 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
@@ -23,7 +23,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.security.SecurityProperties
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
import org.springframework.context.annotation.ComponentScan
import org.springframework.http.MediaType
@@ -36,8 +35,7 @@ import org.springframework.web.reactive.function.BodyInserters
@RunWith(SpringRunner::class)
@WebFluxTest
@ContextConfiguration(
- classes = [BluePrintCoreConfiguration::class,
- BluePrintCatalogService::class, SecurityProperties::class]
+ classes = [BluePrintCoreConfiguration::class, BluePrintCatalogService::class]
)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt
index 5a1999ec1..7dab8e328 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt
@@ -23,7 +23,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScript
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.security.SecurityProperties
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
import org.springframework.context.annotation.ComponentScan
import org.springframework.test.context.ContextConfiguration
@@ -41,7 +40,7 @@ import org.springframework.test.web.reactive.server.WebTestClient
@WebFluxTest
@ContextConfiguration(
classes = [BluePrintRuntimeService::class, BluePrintCoreConfiguration::class,
- BluePrintCatalogService::class, SecurityProperties::class, ComponentScriptExecutor::class]
+ BluePrintCatalogService::class, ComponentScriptExecutor::class]
)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt
index 39ff32d75..dab96527d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt
@@ -29,7 +29,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.security.SecurityProperties
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
import org.springframework.context.annotation.ComponentScan
import org.springframework.test.context.ContextConfiguration
@@ -41,7 +40,7 @@ import org.springframework.test.web.reactive.server.WebTestClient
@WebFluxTest
@ContextConfiguration(
classes = [TestDatabaseConfiguration::class,
- ResourceController::class, ResourceResolutionDBService::class, SecurityProperties::class]
+ ResourceController::class, ResourceResolutionDBService::class]
)
@ComponentScan(
basePackages = ["org.onap.ccsdk.cds.controllerblueprints.core.service",
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt
index d91792d01..09b2c5bf7 100644
--- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt
@@ -24,7 +24,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.security.SecurityProperties
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
import org.springframework.context.annotation.ComponentScan
import org.springframework.http.MediaType
@@ -39,7 +38,7 @@ import kotlin.test.AfterTest
@WebFluxTest
@ContextConfiguration(
classes = [TestDatabaseConfiguration::class, BluePrintCoreConfiguration::class,
- BluePrintCatalogService::class, SecurityProperties::class]
+ BluePrintCatalogService::class]
)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt
index 3119b803e..255220fc5 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt
@@ -28,7 +28,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogS
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.security.SecurityProperties
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
import org.springframework.context.annotation.ComponentScan
import org.springframework.test.context.ContextConfiguration
@@ -46,7 +45,7 @@ import kotlin.test.assertTrue
@WebFluxTest
@ContextConfiguration(
classes = [ExecutionServiceHandler::class, BluePrintCoreConfiguration::class,
- BluePrintCatalogService::class, SecurityProperties::class]
+ BluePrintCatalogService::class]
)
@ComponentScan(
basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor",
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt
index e573afd7a..33f5d749f 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt
@@ -75,7 +75,7 @@ abstract class AbstractServiceFunction : BlueprintFunctionNode<ExecutionServiceI
try {
// Set the Response Payload
executionServiceOutput.payload = JacksonUtils.objectMapper.createObjectNode()
- executionServiceOutput.payload.set("$actionName-response", responseActionPayload)
+ executionServiceOutput.payload.set<JsonNode>("$actionName-response", responseActionPayload)
// Set the Default Step Status
status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
} catch (e: Exception) {
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
index 492b0ba44..8a699d8d2 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
@@ -16,6 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
+import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
@@ -94,7 +95,7 @@ open class BluePrintWorkflowExecutionServiceImpl(
// Set the Response Payload
executionServiceOutput.payload = JacksonUtils.objectMapper.createObjectNode()
- executionServiceOutput.payload.set("$workflowName-response", workflowOutputs.asObjectNode())
+ executionServiceOutput.payload.set<JsonNode>("$workflowName-response", workflowOutputs.asObjectNode())
return executionServiceOutput
}
}