summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/services
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2021-01-22 11:49:51 -0500
committerSingal, Kapil (ks220y) <ks220y@att.com>2021-01-22 12:08:19 -0500
commitadcd4f2bc695840e9ecbc05003bc52c675f22fec (patch)
tree5db58ce9b6b3e86977ca3c697ce3e8998523eb61 /ms/blueprintsprocessor/modules/services
parentdc8252f3cfa1ddd0c1c8c70513c16c738d840822 (diff)
Renaming Files having BluePrint to have Blueprint
Replacing BluePrint with Blueprint throughout Issue-ID: CCSDK-3098 Signed-off-by: KAPIL SINGAL <ks220y@att.com> Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96
Diffstat (limited to 'ms/blueprintsprocessor/modules/services')
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt34
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt26
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt4
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt24
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt14
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt34
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt2
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt38
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt8
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt22
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt10
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt24
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBlueprintProcessingServer.kt (renamed from ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBluePrintProcessingServer.kt)8
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt8
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt30
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt8
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt8
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImpl.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt)36
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt10
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt10
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt38
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt20
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt2
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt24
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImplTest.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImplTest.kt)64
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt18
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt24
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt18
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt4
29 files changed, 285 insertions, 285 deletions
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
index 94920235b..c1a898582 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
@@ -24,11 +24,11 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutp
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.core.cluster.executeWithLock
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.CDS_LOCK_GROUP
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotBlank
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
@@ -38,8 +38,8 @@ import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunction
import org.onap.ccsdk.cds.controllerblueprints.core.jsonPathParse
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.readNBLines
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
import org.slf4j.LoggerFactory
/**
@@ -53,8 +53,8 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
lateinit var executionServiceInput: ExecutionServiceInput
var executionServiceOutput = ExecutionServiceOutput()
- lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- lateinit var bluePrintClusterService: BluePrintClusterService
+ lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintClusterService: BlueprintClusterService
lateinit var implementation: Implementation
lateinit var processId: String
lateinit var workflowName: String
@@ -88,13 +88,13 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
log.info("preparing request id($processId) for workflow($workflowName) step($stepName)")
- nodeTemplateName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE)
+ nodeTemplateName = this.operationInputs.getAsString(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE)
check(nodeTemplateName.isNotEmpty()) { "couldn't get NodeTemplate name for step($stepName)" }
- interfaceName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_INTERFACE)
+ interfaceName = this.operationInputs.getAsString(BlueprintConstants.PROPERTY_CURRENT_INTERFACE)
check(interfaceName.isNotEmpty()) { "couldn't get Interface name for step($stepName)" }
- operationName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_OPERATION)
+ operationName = this.operationInputs.getAsString(BlueprintConstants.PROPERTY_CURRENT_OPERATION)
check(operationName.isNotEmpty()) { "couldn't get Operation name for step($stepName)" }
/** Get the Implementation Details */
@@ -105,7 +105,7 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
/** Resolve and validate lock properties */
implementation.lock?.apply {
val resolvedValues = bluePrintRuntimeService.resolvePropertyAssignments(
- BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
interfaceName,
mutableMapOf("key" to this.key, "acquireTimeout" to this.acquireTimeout)
)
@@ -146,7 +146,7 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
// Set the Default Step Status
status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
} catch (e: Exception) {
- status.message = BluePrintConstants.STATUS_FAILURE
+ status.message = BlueprintConstants.STATUS_FAILURE
status.eventType = EventType.EVENT_COMPONENT_FAILURE.name
}
executionServiceOutput.status = status
@@ -180,7 +180,7 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
fun getOperationInput(key: String): JsonNode {
return operationInputs[key]
- ?: throw BluePrintProcessorException("couldn't get the operation input($key) value.")
+ ?: throw BlueprintProcessorException("couldn't get the operation input($key) value.")
}
fun getOptionalOperationInput(key: String): JsonNode? {
@@ -192,11 +192,11 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
}
fun addError(type: String, name: String, error: String) {
- bluePrintRuntimeService.getBluePrintError().addError(type, name, error)
+ bluePrintRuntimeService.getBlueprintError().addError(type, name, error)
}
fun addError(error: String) {
- bluePrintRuntimeService.getBluePrintError().addError(error)
+ bluePrintRuntimeService.getBlueprintError().addError(error)
}
/**
@@ -225,12 +225,12 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
suspend fun relationshipProperty(relationshipName: String, propertyName: String): JsonNode {
return bluePrintRuntimeService.resolveRelationshipTemplateProperties(relationshipName).get(propertyName)
- ?: throw BluePrintProcessorException("failed to get relationship($relationshipName) property($propertyName)")
+ ?: throw BlueprintProcessorException("failed to get relationship($relationshipName) property($propertyName)")
}
suspend fun mashTemplateNData(artifactName: String, json: String): String {
val content = artifactContent(artifactName)
- return BluePrintVelocityTemplateService.generateContent(content, json)
+ return BlueprintVelocityTemplateService.generateContent(content, json)
}
suspend fun readLinesFromArtifact(artifactName: String): List<String> {
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt
index 8b46ae693..3cb46ed44 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt
@@ -19,9 +19,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
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
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.slf4j.LoggerFactory
abstract class AbstractScriptComponentFunction : AbstractComponentFunction() {
@@ -47,7 +47,7 @@ abstract class AbstractScriptComponentFunction : AbstractComponentFunction() {
@Deprecated("Dependencies will be resolved dynamically")
open fun <T> functionDependencyInstanceAsType(name: String): T {
return functionDependencyInstances[name] as? T
- ?: throw BluePrintProcessorException("couldn't get script property instance ($name)")
+ ?: throw BlueprintProcessorException("couldn't get script property instance ($name)")
}
fun checkDynamicProperties(key: String): Boolean {
@@ -60,7 +60,7 @@ abstract class AbstractScriptComponentFunction : AbstractComponentFunction() {
suspend fun executeScript(executionServiceInput: ExecutionServiceInput) {
return when (scriptType) {
- BluePrintConstants.SCRIPT_JYTHON -> {
+ BlueprintConstants.SCRIPT_JYTHON -> {
executeScriptBlocking(executionServiceInput)
}
else -> {
@@ -97,34 +97,34 @@ abstract class AbstractScriptComponentFunction : AbstractComponentFunction() {
*/
final override fun apply(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
- throw BluePrintException("Not Implemented, use applyNB method")
+ throw BlueprintException("Not Implemented, use applyNB method")
}
final override fun prepareRequest(executionRequest: ExecutionServiceInput): ExecutionServiceInput {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override fun prepareResponse(): ExecutionServiceOutput {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override suspend fun applyNB(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override suspend fun prepareRequestNB(executionRequest: ExecutionServiceInput): ExecutionServiceInput {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override suspend fun prepareResponseNB(): ExecutionServiceOutput {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
override fun process(executionRequest: ExecutionServiceInput) {
- throw BluePrintException("Not Implemented, child class will implement this")
+ throw BlueprintException("Not Implemented, child class will implement this")
}
override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- throw BluePrintException("Not Implemented, child class will implement this")
+ throw BlueprintException("Not Implemented, child class will implement this")
}
}
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 33f5d749f..41e26e4ab 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
@@ -21,7 +21,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInpu
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.onap.ccsdk.cds.controllerblueprints.core.jsonPathParse
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -79,7 +79,7 @@ abstract class AbstractServiceFunction : BlueprintFunctionNode<ExecutionServiceI
// Set the Default Step Status
status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
} catch (e: Exception) {
- status.message = BluePrintConstants.STATUS_FAILURE
+ status.message = BlueprintConstants.STATUS_FAILURE
status.eventType = EventType.EVENT_COMPONENT_FAILURE.name
}
executionServiceOutput.status = status
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
index 3483ce1d7..b798f0083 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
@@ -17,12 +17,12 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintScriptsService
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
@@ -74,29 +74,29 @@ class ComponentFunctionScriptingService(
}
suspend fun <T : BlueprintFunctionNode<*, *>> scriptInstance(
- bluePrintContext: BluePrintContext,
+ bluePrintContext: BlueprintContext,
scriptType: String,
scriptClassReference: String
): T {
var scriptComponent: T? = null
when (scriptType) {
- BluePrintConstants.SCRIPT_INTERNAL -> {
- val bluePrintScriptsService: BluePrintScriptsService = BluePrintScriptsServiceImpl()
+ BlueprintConstants.SCRIPT_INTERNAL -> {
+ val bluePrintScriptsService: BlueprintScriptsService = BlueprintScriptsServiceImpl()
scriptComponent = bluePrintScriptsService.scriptInstance<T>(scriptClassReference)
}
- BluePrintConstants.SCRIPT_KOTLIN -> {
- val bluePrintScriptsService: BluePrintScriptsService = BluePrintScriptsServiceImpl()
+ BlueprintConstants.SCRIPT_KOTLIN -> {
+ val bluePrintScriptsService: BlueprintScriptsService = BlueprintScriptsServiceImpl()
scriptComponent = bluePrintScriptsService.scriptInstance<T>(
bluePrintContext.rootPath,
bluePrintContext.name(), bluePrintContext.version(), scriptClassReference, false
)
}
- BluePrintConstants.SCRIPT_JYTHON -> {
+ BlueprintConstants.SCRIPT_JYTHON -> {
scriptComponent = blueprintJythonService.jythonComponentInstance(bluePrintContext, scriptClassReference) as T
}
else -> {
- throw BluePrintProcessorException("script type($scriptType) is not supported")
+ throw BlueprintProcessorException("script type($scriptType) is not supported")
}
}
return scriptComponent
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt
index 43ad183c0..815b190dd 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt
@@ -22,8 +22,8 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.PayloadUtils
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createActionIdentifiersProto
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createCommonHeaderProto
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createExecutionServiceInputProto
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -70,7 +70,7 @@ open class ComponentRemoteScriptExecutor(
val txId = UUID.randomUUID().toString()
val commonHeader = createCommonHeaderProto(
executionRequest.commonHeader.subRequestId,
- txId, BluePrintConstants.APP_NAME
+ txId, BlueprintConstants.APP_NAME
)
val actionIdentifier = createActionIdentifiersProto(blueprintName, blueprintVersion, blueprintAction)
@@ -92,16 +92,16 @@ open class ComponentRemoteScriptExecutor(
/** set node template attribute */
val statusMessage = executionServiceOutputProto.status.message
- if (statusMessage == BluePrintConstants.STATUS_SUCCESS) {
- setAttribute(ATTRIBUTE_STATUS, BluePrintConstants.STATUS_SUCCESS.asJsonPrimitive())
+ if (statusMessage == BlueprintConstants.STATUS_SUCCESS) {
+ setAttribute(ATTRIBUTE_STATUS, BlueprintConstants.STATUS_SUCCESS.asJsonPrimitive())
} else {
val errorMessage = executionServiceOutputProto.status.errorMessage ?: "failed in remote execution"
- throw BluePrintProcessorException(errorMessage)
+ throw BlueprintProcessorException(errorMessage)
}
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError()
+ bluePrintRuntimeService.getBlueprintError()
.addError("Failed in ComponentRemoteScriptExecutor : ${runtimeException.message}")
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt
index 7bb071501..4263768b9 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
@@ -31,24 +31,24 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.nodeType
/** Component Extensions **/
fun ServiceTemplateBuilder.nodeTypeComponentRemoteScriptExecutor() {
- val nodeType = BluePrintTypes.nodeTypeComponentRemoteScriptExecutor()
+ val nodeType = BlueprintTypes.nodeTypeComponentRemoteScriptExecutor()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BluePrintTypes.nodeTypeComponentRemoteScriptExecutor(): NodeType {
+fun BlueprintTypes.nodeTypeComponentRemoteScriptExecutor(): NodeType {
return nodeType(
- id = "component-remote-script-executor", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-remote-script-executor", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "Generic Remote Script Component Executor"
) {
/** Attribute definitions */
attribute(
- ComponentRemoteScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON, false,
+ ComponentRemoteScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON, false,
"Remote executed response data."
)
attribute(
- ComponentRemoteScriptExecutor.ATTRIBUTE_STATUS, BluePrintConstants.DATA_TYPE_STRING, true,
+ ComponentRemoteScriptExecutor.ATTRIBUTE_STATUS, BlueprintConstants.DATA_TYPE_STRING, true,
"Remote execution status."
)
@@ -56,35 +56,35 @@ fun BluePrintTypes.nodeTypeComponentRemoteScriptExecutor(): NodeType {
operation("ComponentRemoteScriptExecutor", "ComponentRemoteScriptExecutor Operation") {
inputs {
property(
- ComponentRemoteScriptExecutor.INPUT_SELECTOR, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentRemoteScriptExecutor.INPUT_SELECTOR, BlueprintConstants.DATA_TYPE_JSON,
true, "Remote GRPC selector or DSL reference or GRPC Json config."
)
property(
- ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_NAME, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_NAME, BlueprintConstants.DATA_TYPE_STRING,
true, "Blueprint name."
)
property(
- ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_VERSION, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_VERSION, BlueprintConstants.DATA_TYPE_STRING,
true, "Blueprint version."
)
property(
- ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_ACTION, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_ACTION, BlueprintConstants.DATA_TYPE_STRING,
true, "Blueprint action name."
)
property(
- ComponentRemoteScriptExecutor.INPUT_TIMEOUT, BluePrintConstants.DATA_TYPE_INTEGER,
+ ComponentRemoteScriptExecutor.INPUT_TIMEOUT, BlueprintConstants.DATA_TYPE_INTEGER,
true, "Remote execution timeout in sec."
) {
defaultValue(180)
}
property(
- ComponentRemoteScriptExecutor.INPUT_REQUEST_DATA, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentRemoteScriptExecutor.INPUT_REQUEST_DATA, BlueprintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
}
outputs {
property(
- ComponentRemoteScriptExecutor.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.OUTPUT_STATUS, BlueprintConstants.DATA_TYPE_STRING,
true, "Status of the Component Execution ( success or failure )"
)
}
@@ -98,7 +98,7 @@ fun TopologyTemplateBuilder.nodeTemplateComponentRemoteScriptExecutor(
description: String,
block: ComponentRemoteScriptExecutorNodeTemplateBuilder.() -> Unit
) {
- val nodeTemplate = BluePrintTypes.nodeTemplateComponentRemoteScriptExecutor(
+ val nodeTemplate = BlueprintTypes.nodeTemplateComponentRemoteScriptExecutor(
id, description,
block
)
@@ -106,7 +106,7 @@ fun TopologyTemplateBuilder.nodeTemplateComponentRemoteScriptExecutor(
nodeTemplates!![nodeTemplate.id!!] = nodeTemplate
}
-fun BluePrintTypes.nodeTemplateComponentRemoteScriptExecutor(
+fun BlueprintTypes.nodeTemplateComponentRemoteScriptExecutor(
id: String,
description: String,
block: ComponentRemoteScriptExecutorNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt
index a7ef0a8a0..597426a5f 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt
@@ -64,7 +64,7 @@ open class ComponentScriptExecutor(private var componentFunctionScriptingService
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError()
+ bluePrintRuntimeService.getBlueprintError()
.addError("Failed in ComponentScriptExecutor : ${runtimeException.message}")
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt
index 8592ce62b..08a964b55 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
@@ -32,53 +32,53 @@ import kotlin.reflect.KClass
/** Component Extensions **/
fun ServiceTemplateBuilder.nodeTypeComponentScriptExecutor() {
- val nodeType = BluePrintTypes.nodeTypeComponentScriptExecutor()
+ val nodeType = BlueprintTypes.nodeTypeComponentScriptExecutor()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BluePrintTypes.nodeTypeComponentScriptExecutor(): NodeType {
+fun BlueprintTypes.nodeTypeComponentScriptExecutor(): NodeType {
return nodeType(
- id = "component-script-executor", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-script-executor", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "Generic Script Component Executor"
) {
- attribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON, false)
- attribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BluePrintConstants.DATA_TYPE_STRING, true)
+ attribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON, false)
+ attribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BlueprintConstants.DATA_TYPE_STRING, true)
operation("ComponentScriptExecutor", "ComponentScriptExecutor Operation") {
inputs {
property(
- ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BlueprintConstants.DATA_TYPE_STRING,
true, "Script Type"
) {
- defaultValue(BluePrintConstants.SCRIPT_INTERNAL)
+ defaultValue(BlueprintConstants.SCRIPT_INTERNAL)
constrain {
validValues(
listOf(
- BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
- BluePrintConstants.SCRIPT_JYTHON.asJsonPrimitive(),
- BluePrintConstants.SCRIPT_KOTLIN.asJsonPrimitive()
+ BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
+ BlueprintConstants.SCRIPT_JYTHON.asJsonPrimitive(),
+ BlueprintConstants.SCRIPT_KOTLIN.asJsonPrimitive()
)
)
}
}
property(
- ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE, BlueprintConstants.DATA_TYPE_STRING,
true, "Kotlin Script class name or jython script name."
)
property(
- ComponentScriptExecutor.INPUT_DYNAMIC_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentScriptExecutor.INPUT_DYNAMIC_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
}
outputs {
property(
- ComponentScriptExecutor.OUTPUT_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentScriptExecutor.OUTPUT_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON,
false, "Output Response"
)
property(
- ComponentScriptExecutor.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.OUTPUT_STATUS, BlueprintConstants.DATA_TYPE_STRING,
true, "Status of the Component Execution ( success or failure )"
)
}
@@ -92,7 +92,7 @@ fun TopologyTemplateBuilder.nodeTemplateComponentScriptExecutor(
description: String,
block: ComponentScriptExecutorNodeTemplateBuilder.() -> Unit
) {
- val nodeTemplate = BluePrintTypes.nodeTemplateComponentScriptExecutor(
+ val nodeTemplate = BlueprintTypes.nodeTemplateComponentScriptExecutor(
id, description,
block
)
@@ -100,7 +100,7 @@ fun TopologyTemplateBuilder.nodeTemplateComponentScriptExecutor(
nodeTemplates!![nodeTemplate.id!!] = nodeTemplate
}
-fun BluePrintTypes.nodeTemplateComponentScriptExecutor(
+fun BlueprintTypes.nodeTemplateComponentScriptExecutor(
id: String,
description: String,
block: ComponentScriptExecutorNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
index a0cd7fce6..4f3f60110 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
@@ -27,8 +27,8 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteIdentifier
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutionInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutionOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StatusType
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.command.api.CommandExecutorServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.command.api.ExecutionInput
import org.onap.ccsdk.cds.controllerblueprints.command.api.ExecutionOutput
@@ -58,7 +58,7 @@ interface RemoteScriptExecutionService {
havingValue = "true", matchIfMissing = false
)
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-class GrpcRemoteScriptExecutionService(private val bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService) :
+class GrpcRemoteScriptExecutionService(private val bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService) :
RemoteScriptExecutionService {
private val log = LoggerFactory.getLogger(GrpcRemoteScriptExecutionService::class.java)!!
@@ -68,7 +68,7 @@ class GrpcRemoteScriptExecutionService(private val bluePrintGrpcLibPropertyServi
override suspend fun init(selector: Any) {
// Get the GRPC Client Service based on selector
- val grpcClientService: BluePrintGrpcClientService = if (selector is JsonNode) {
+ val grpcClientService: BlueprintGrpcClientService = if (selector is JsonNode) {
bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector)
} else {
bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector.toString())
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt
index fc37b488f..dadf72e04 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt
@@ -29,12 +29,12 @@ import kotlinx.coroutines.flow.consumeAsFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.withTimeout
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
@@ -58,7 +58,7 @@ interface StreamingRemoteExecutionService<ReqT, ResT> {
prefix = "blueprintsprocessor.streamingRemoteExecution", name = ["enabled"],
havingValue = "true", matchIfMissing = false
)
-class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService) :
+class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService) :
StreamingRemoteExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
private val log = logger(StreamingRemoteExecutionServiceImpl::class)
@@ -84,12 +84,12 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
val grpcChannel = grpcChannel(selector)
/** Get Send and Receive Channel for bidirectional process method*/
- val channels = clientCallBidiStreaming(BluePrintProcessingServiceGrpc.getProcessMethod(), grpcChannel)
+ val channels = clientCallBidiStreaming(BlueprintProcessingServiceGrpc.getProcessMethod(), grpcChannel)
commChannels[txId] = channels
}
val commChannel = commChannels[txId]
- ?: throw BluePrintException("failed to create response subscription for transactionId($txId) channel")
+ ?: throw BlueprintException("failed to create response subscription for transactionId($txId) channel")
log.info("created subscription for transactionId($txId)")
@@ -102,7 +102,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
*/
override suspend fun send(txId: String, input: ExecutionServiceInput) {
val sendChannel = commChannels[txId]?.requestChannel
- ?: throw BluePrintException("failed to get transactionId($txId) send channel")
+ ?: throw BlueprintException("failed to get transactionId($txId) send channel")
coroutineScope {
launch {
sendChannel.send(input)
@@ -127,7 +127,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
/** Send the request */
val sendChannel = commChannels[txId]?.requestChannel
- ?: throw BluePrintException("failed to get transactionId($txId) send channel")
+ ?: throw BlueprintException("failed to get transactionId($txId) send channel")
sendChannel.send(input)
/** Receive the response with timeout */
@@ -186,7 +186,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
}
suspend fun createGrpcChannel(grpcProperties: GrpcClientProperties): ManagedChannel {
- val grpcClientService: BluePrintGrpcClientService = bluePrintGrpcLibPropertyService
+ val grpcClientService: BlueprintGrpcClientService = bluePrintGrpcLibPropertyService
.blueprintGrpcClientService(grpcProperties)
return grpcClientService.channel()
}
@@ -203,7 +203,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
selector
}
else -> {
- throw BluePrintException("couldn't process selector($selector)")
+ throw BlueprintException("couldn't process selector($selector)")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
index 2f1ae2fc5..69cb0b6eb 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
@@ -16,9 +16,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
import org.springframework.stereotype.Service
// TODO("After Jython depreciation, this interface will be removed")
@@ -26,15 +26,15 @@ import org.springframework.stereotype.Service
@Deprecated("CDS won's support Jython services")
interface BlueprintJythonService {
- fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
+ fun jythonComponentInstance(bluePrintContext: BlueprintContext, scriptClassReference: String):
BlueprintFunctionNode<*, *>
}
@Service
open class DeprecatedBlueprintJythonService : BlueprintJythonService {
- override fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
+ override fun jythonComponentInstance(bluePrintContext: BlueprintContext, scriptClassReference: String):
BlueprintFunctionNode<*, *> {
- throw BluePrintProcessorException("Include python-executor module for Jython support")
+ throw BlueprintProcessorException("Include python-executor module for Jython support")
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt
index b3a0a5892..5ef62d0bc 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt
@@ -32,15 +32,15 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createExecutionServiceOutputProto
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createStatus
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.toProto
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import kotlin.test.assertNotNull
@@ -48,7 +48,7 @@ class ComponentRemoteScriptExecutorTest {
@Test
fun testNodeComponentRemoteScriptExecutorType() {
- val nodeType = BluePrintTypes.nodeTypeComponentRemoteScriptExecutor()
+ val nodeType = BlueprintTypes.nodeTypeComponentRemoteScriptExecutor()
assertNotNull(nodeType, "failed to generate nodeType Component Remote Script Executor")
}
@@ -96,7 +96,7 @@ class ComponentRemoteScriptExecutorTest {
fun testComponentRemoteScriptExecutor() {
runBlocking {
/** Mock blueprint context */
- val blueprintContext = mockk<BluePrintContext>()
+ val blueprintContext = mockk<BlueprintContext>()
every { blueprintContext.rootPath } returns normalizedPathName("target")
every {
blueprintContext.nodeTemplateOperationImplementation(
@@ -104,7 +104,7 @@ class ComponentRemoteScriptExecutorTest {
)
} returns Implementation()
- val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
val mockExecutionServiceInput = mockExecutionServiceInput(bluePrintRuntime)
@@ -130,7 +130,7 @@ class ComponentRemoteScriptExecutorTest {
}
}
- private fun mockExecutionServiceInput(bluePrintRuntime: DefaultBluePrintRuntimeService): ExecutionServiceInput {
+ private fun mockExecutionServiceInput(bluePrintRuntime: DefaultBlueprintRuntimeService): ExecutionServiceInput {
val mapper = ObjectMapper()
val requestNode = mapper.createObjectNode()
@@ -138,10 +138,10 @@ class ComponentRemoteScriptExecutorTest {
requestNode.put("type", "grpc")
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "remote-execute".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] =
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "remote-execute".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] =
"ComponentRemoteScriptExecutor".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "process".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "process".asJsonPrimitive()
operationInputs[ComponentRemoteScriptExecutor.INPUT_SELECTOR] = "remote-script-executor".asJsonPrimitive()
operationInputs[ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_NAME] = "sample-blueprint".asJsonPrimitive()
@@ -205,7 +205,7 @@ class ComponentRemoteScriptExecutorTest {
return createExecutionServiceOutputProto(
executionServiceInput.commonHeader.toProto(),
executionServiceInput.actionIdentifiers.toProto(),
- createStatus(BluePrintConstants.STATUS_SUCCESS, 200),
+ createStatus(BlueprintConstants.STATUS_SUCCESS, 200),
responsePayload
)
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBluePrintProcessingServer.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBlueprintProcessingServer.kt
index 8edea46f6..7ac6134d9 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBluePrintProcessingServer.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBlueprintProcessingServer.kt
@@ -25,13 +25,13 @@ import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
-private val log = logger(MockBluePrintProcessingServer::class)
+private val log = logger(MockBlueprintProcessingServer::class)
-class MockBluePrintProcessingServer : BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
+class MockBlueprintProcessingServer : BlueprintProcessingServiceGrpc.BlueprintProcessingServiceImplBase() {
override fun process(responseObserver: StreamObserver<ExecutionServiceOutput>): StreamObserver<ExecutionServiceInput> {
@@ -96,7 +96,7 @@ fun main() {
val server = ServerBuilder
.forPort(50052)
.intercept(GrpcServerLoggingInterceptor())
- .addService(MockBluePrintProcessingServer())
+ .addService(MockBlueprintProcessingServer())
.build()
server.start()
log.info("GRPC Serve started(${server.isShutdown}) on port(${server.port})...")
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt
index 28e2b11b2..0d3e42a5e 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt
@@ -35,8 +35,8 @@ import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ACTION_MODE_SYNC
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GRPCLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.MockBluePrintProcessingServer
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.MockBlueprintProcessingServer
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
@@ -67,11 +67,11 @@ class StreamingRemoteExecutionServiceTest {
@ExperimentalCoroutinesApi
@FlowPreview
fun testStreamingChannel() {
- grpcCleanup.register(serverBuilder.addService(MockBluePrintProcessingServer()).build().start())
+ grpcCleanup.register(serverBuilder.addService(MockBlueprintProcessingServer()).build().start())
val channel = grpcCleanup.register(channelBuilder.maxInboundMessageSize(1024).build())
runBlocking {
- val bluePrintGrpcLibPropertyService = BluePrintGrpcLibPropertyService(mockk())
+ val bluePrintGrpcLibPropertyService = BlueprintGrpcLibPropertyService(mockk())
val streamingRemoteExecutionService = StreamingRemoteExecutionServiceImpl(bluePrintGrpcLibPropertyService)
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt
index 377b95010..8440e5faa 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt
@@ -34,22 +34,22 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.CDS_LOCK_GROUP
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTypeComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
import org.onap.ccsdk.cds.controllerblueprints.core.data.LockAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -65,14 +65,14 @@ import kotlin.test.assertNotNull
@ContextConfiguration(
classes = [
ComponentFunctionScriptingService::class,
- BluePrintScriptsServiceImpl::class, DeprecatedBlueprintJythonService::class
+ BlueprintScriptsServiceImpl::class, DeprecatedBlueprintJythonService::class
]
)
class AbstractComponentFunctionTest {
- lateinit var bluePrintRuntimeService: DefaultBluePrintRuntimeService
- lateinit var blueprintContext: BluePrintContext
- lateinit var blueprintClusterService: BluePrintClusterService
+ lateinit var bluePrintRuntimeService: DefaultBlueprintRuntimeService
+ lateinit var blueprintContext: BlueprintContext
+ lateinit var blueprintClusterService: BlueprintClusterService
@Autowired
lateinit var compSvc: ComponentFunctionScriptingService
@@ -149,7 +149,7 @@ class AbstractComponentFunctionTest {
@Test
fun testComponentScriptExecutorNodeType() {
- val componentScriptExecutor = BluePrintTypes.nodeTypeComponentScriptExecutor()
+ val componentScriptExecutor = BlueprintTypes.nodeTypeComponentScriptExecutor()
assertNotNull(componentScriptExecutor.interfaces, "failed to get interface operations")
}
@@ -274,7 +274,7 @@ class AbstractComponentFunctionTest {
/**
* Mocked input for abstract function test.
*/
- private fun getMockedInput(bluePrintRuntime: DefaultBluePrintRuntimeService):
+ private fun getMockedInput(bluePrintRuntime: DefaultBlueprintRuntimeService):
ExecutionServiceInput {
val mapper = ObjectMapper()
@@ -283,11 +283,11 @@ class AbstractComponentFunctionTest {
rootNode.put("type", "rest")
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] =
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] =
"activate-restconf".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] =
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] =
"interfaceName".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] =
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] =
"operationName".asJsonPrimitive()
operationInputs["dynamic-properties"] = rootNode
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
index 044e8cf53..64bb70e63 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
@@ -16,20 +16,20 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.onap.ccsdk.sli.core.sli.SvcLogicContext
class BlueprintSvcLogicContext : SvcLogicContext() {
- private var bluePrintRuntimeService: BluePrintRuntimeService<*>? = null
+ private var bluePrintRuntimeService: BlueprintRuntimeService<*>? = null
private var request: Any? = null
private var response: Any? = null
- fun getBluePrintService(): BluePrintRuntimeService<*> {
+ fun getBlueprintService(): BlueprintRuntimeService<*> {
return this.bluePrintRuntimeService!!
}
- fun setBluePrintRuntimeService(bluePrintRuntimeService: BluePrintRuntimeService<*>) {
+ fun setBlueprintRuntimeService(bluePrintRuntimeService: BlueprintRuntimeService<*>) {
this.bluePrintRuntimeService = bluePrintRuntimeService
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
index 4efe9f12d..ebad1501b 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.onap.ccsdk.sli.core.sli.ExitNodeException
import org.onap.ccsdk.sli.core.sli.SvcLogicContext
import org.onap.ccsdk.sli.core.sli.SvcLogicException
@@ -47,7 +47,7 @@ interface BlueprintSvcLogicService : SvcLogicServiceBase {
fun unRegisterExecutors(name: String)
- suspend fun execute(graph: SvcLogicGraph, bluePrintRuntimeService: BluePrintRuntimeService<*>, input: Any): Any
+ suspend fun execute(graph: SvcLogicGraph, bluePrintRuntimeService: BlueprintRuntimeService<*>, input: Any): Any
override fun execute(module: String, rpc: String, version: String, mode: String, ctx: SvcLogicContext): SvcLogicContext {
TODO("not implemented")
@@ -104,12 +104,12 @@ class DefaultBlueprintSvcLogicService : BlueprintSvcLogicService {
override suspend fun execute(
graph: SvcLogicGraph,
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
input: Any
): Any {
// Initialise BlueprintSvcLogic Context with Blueprint Runtime Service and Input Request
val blueprintSvcLogicContext = BlueprintSvcLogicContext()
- blueprintSvcLogicContext.setBluePrintRuntimeService(bluePrintRuntimeService)
+ blueprintSvcLogicContext.setBlueprintRuntimeService(bluePrintRuntimeService)
blueprintSvcLogicContext.setRequest(input)
// Execute the Graph
execute(graph, blueprintSvcLogicContext)
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 c35e86cc6..d690235e9 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
@@ -19,26 +19,26 @@ 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
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asObjectNode
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service("bluePrintWorkflowExecutionService")
-open class BluePrintWorkflowExecutionServiceImpl(
+open class BlueprintWorkflowExecutionServiceImpl(
private val componentWorkflowExecutionService: ComponentWorkflowExecutionService,
private val dgWorkflowExecutionService: DGWorkflowExecutionService,
private val imperativeWorkflowExecutionService: ImperativeWorkflowExecutionService
-) : BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+) : BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
- private val log = LoggerFactory.getLogger(BluePrintWorkflowExecutionServiceImpl::class.java)!!
+ private val log = LoggerFactory.getLogger(BlueprintWorkflowExecutionServiceImpl::class.java)!!
- override suspend fun executeBluePrintWorkflow(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ override suspend fun executeBlueprintWorkflow(
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
@@ -50,19 +50,19 @@ open class BluePrintWorkflowExecutionServiceImpl(
// Assign Workflow inputs
// check if request structure exists
if (!executionServiceInput.payload.has("$workflowName-request")) {
- throw BluePrintProcessorException("Input request missing the expected '$workflowName-request' block!")
+ throw BlueprintProcessorException("Input request missing the expected '$workflowName-request' block!")
}
val input = executionServiceInput.payload.get("$workflowName-request")
bluePrintRuntimeService.assignWorkflowInputs(workflowName, input)
val workflow = bluePrintContext.workflowByName(workflowName)
- val steps = workflow.steps ?: throw BluePrintProcessorException("could't get steps for workflow($workflowName)")
+ val steps = workflow.steps ?: throw BlueprintProcessorException("could't get steps for workflow($workflowName)")
/** If workflow has multiple steps, then it is imperative workflow */
val executionServiceOutput: ExecutionServiceOutput = if (steps.size > 1) {
imperativeWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
} else {
// Get the DG Node Template
val nodeTemplateName = bluePrintContext.workflowFirstStepNodeTemplate(workflowName)
@@ -72,16 +72,16 @@ open class BluePrintWorkflowExecutionServiceImpl(
log.info("Executing workflow($workflowName) NodeTemplate($nodeTemplateName), derived from($derivedFrom)")
/** Return ExecutionServiceOutput based on DG node or Component Node */
when {
- derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
+ derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
componentWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
- derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
+ derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
dgWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
else -> {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"couldn't execute workflow($workflowName) step mapped " +
"to node template($nodeTemplateName) derived from($derivedFrom)"
)
@@ -97,7 +97,7 @@ open class BluePrintWorkflowExecutionServiceImpl(
workflowOutputs = bluePrintRuntimeService.resolveWorkflowOutputs(workflowName)
} catch (e: RuntimeException) {
log.error("Failed to resolve outputs for workflow: $workflowName", e)
- e.message?.let { bluePrintRuntimeService.getBluePrintError().errors.add(it) }
+ e.message?.let { bluePrintRuntimeService.getBlueprintError().errors.add(it) }
}
// Set the Response Payload
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
index 70910e15c..330d297c2 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
@@ -18,16 +18,16 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
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.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.springframework.stereotype.Service
@Service("componentWorkflowExecutionService")
open class ComponentWorkflowExecutionService(private val nodeTemplateExecutionService: NodeTemplateExecutionService) :
- BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+ BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
- override suspend fun executeBluePrintWorkflow(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ override suspend fun executeBlueprintWorkflow(
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
index b1847df43..c8d72a1a4 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
@@ -20,20 +20,20 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
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.blueprintsprocessor.services.workflow.utils.SvcGraphUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service("dgWorkflowExecutionService")
open class DGWorkflowExecutionService(private val blueprintSvcLogicService: BlueprintSvcLogicService) :
- BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+ BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
private val log = LoggerFactory.getLogger(DGWorkflowExecutionService::class.java)
- override suspend fun executeBluePrintWorkflow(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ override suspend fun executeBlueprintWorkflow(
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
index 464ae8ddc..2278dbfb4 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
@@ -22,17 +22,17 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInpu
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.asGraph
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeLabel
import org.onap.ccsdk.cds.controllerblueprints.core.data.Graph
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.AbstractBluePrintWorkFlowService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.AbstractBlueprintWorkFlowService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.service.NodeExecuteMessage
import org.onap.ccsdk.cds.controllerblueprints.core.service.NodeSkipMessage
import org.onap.ccsdk.cds.controllerblueprints.core.service.WorkflowExecuteMessage
@@ -43,10 +43,10 @@ import kotlin.coroutines.CoroutineContext
class ImperativeWorkflowExecutionService(
private val nodeTemplateExecutionService: NodeTemplateExecutionService
) :
- BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+ BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
- override suspend fun executeBluePrintWorkflow(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ override suspend fun executeBlueprintWorkflow(
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
@@ -58,7 +58,7 @@ class ImperativeWorkflowExecutionService(
val graph = bluePrintContext.workflowByName(workflowName).asGraph()
return coroutineScope {
- ImperativeBluePrintWorkflowService(
+ ImperativeBlueprintWorkflowService(
nodeTemplateExecutionService,
this.coroutineContext[MDCContext]
)
@@ -66,21 +66,21 @@ class ImperativeWorkflowExecutionService(
}
}
-open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionService: NodeTemplateExecutionService, private val mdcContext: CoroutineContext?) :
- AbstractBluePrintWorkFlowService<ExecutionServiceInput, ExecutionServiceOutput>() {
+open class ImperativeBlueprintWorkflowService(private val nodeTemplateExecutionService: NodeTemplateExecutionService, private val mdcContext: CoroutineContext?) :
+ AbstractBlueprintWorkFlowService<ExecutionServiceInput, ExecutionServiceOutput>() {
final override val coroutineContext: CoroutineContext
get() = mdcContext?.let { super.coroutineContext + it } ?: super.coroutineContext
- val log = logger(ImperativeBluePrintWorkflowService::class)
+ val log = logger(ImperativeBlueprintWorkflowService::class)
- lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
lateinit var executionServiceInput: ExecutionServiceInput
lateinit var workflowName: String
override suspend fun executeWorkflow(
graph: Graph,
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
input: ExecutionServiceInput
): ExecutionServiceOutput {
this.graph = graph
@@ -94,7 +94,7 @@ open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionS
if (!workflowActor.isClosedForSend) {
workflowActor.send(startMessage)
} else {
- throw BluePrintProcessorException("workflow($workflowActor) actor is closed")
+ throw BlueprintProcessorException("workflow($workflowActor) actor is closed")
}
return output.await()
}
@@ -108,12 +108,12 @@ open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionS
if (exceptions.isNotEmpty()) {
exceptions.forEach {
val errorMessage = it.message ?: ""
- bluePrintRuntimeService.getBluePrintError().addError(errorMessage)
+ bluePrintRuntimeService.getBlueprintError().addError(errorMessage)
log.error("workflow($workflowId) exception :", it)
}
- message = BluePrintConstants.STATUS_FAILURE
+ message = BlueprintConstants.STATUS_FAILURE
} else {
- message = BluePrintConstants.STATUS_SUCCESS
+ message = BlueprintConstants.STATUS_SUCCESS
}
eventType = EventType.EVENT_COMPONENT_EXECUTED.name
}
@@ -157,7 +157,7 @@ open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionS
.executeNodeTemplate(bluePrintRuntimeService, nodeTemplateName, nodeInput)
return when (executionServiceOutput.status.message) {
- BluePrintConstants.STATUS_FAILURE -> EdgeLabel.FAILURE
+ BlueprintConstants.STATUS_FAILURE -> EdgeLabel.FAILURE
else -> EdgeLabel.SUCCESS
}
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
index c703deb37..1d179a1b7 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
@@ -20,23 +20,23 @@ 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.blueprintsprocessor.core.api.data.StepData
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service
-open class NodeTemplateExecutionService(private val bluePrintClusterService: BluePrintClusterService) {
+open class NodeTemplateExecutionService(private val bluePrintClusterService: BlueprintClusterService) {
private val log = LoggerFactory.getLogger(NodeTemplateExecutionService::class.java)!!
suspend fun executeNodeTemplate(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
nodeTemplateName: String,
executionServiceInput: ExecutionServiceInput
): ExecutionServiceOutput {
@@ -62,7 +62,7 @@ open class NodeTemplateExecutionService(private val bluePrintClusterService: Blu
)
// Get the Component Instance
- val plugin = BluePrintDependencyService.instance<AbstractComponentFunction>(componentName)
+ val plugin = BlueprintDependencyService.instance<AbstractComponentFunction>(componentName)
// Set the Blueprint Services
plugin.bluePrintRuntimeService = bluePrintRuntimeService
plugin.bluePrintClusterService = bluePrintClusterService
@@ -77,9 +77,9 @@ open class NodeTemplateExecutionService(private val bluePrintClusterService: Blu
// Populate Step Meta Data
val stepInputs: MutableMap<String, JsonNode> = hashMapOf()
- stepInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = nodeTemplateName.asJsonPrimitive()
- stepInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = interfaceName.asJsonPrimitive()
- stepInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = operationName.asJsonPrimitive()
+ stepInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = nodeTemplateName.asJsonPrimitive()
+ stepInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = interfaceName.asJsonPrimitive()
+ stepInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = operationName.asJsonPrimitive()
val stepInputData = StepData().apply {
name = nodeTemplateName
properties = stepInputs
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
index 2ff06061a..cf5955e33 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
@@ -50,7 +50,7 @@ open class ComponentExecuteNodeExecutor(private val nodeTemplateExecutionService
try { // Get the Request from the Context and Set to the Function Input and Invoke the function
val executionOutput = nodeTemplateExecutionService.executeNodeTemplate(
- ctx.getBluePrintService(),
+ ctx.getBlueprintService(),
nodeTemplateName, executionInput
)
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt
index d391050a6..e7dd9dedb 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt
@@ -22,13 +22,13 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.PrototypeComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.SingletonComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -49,17 +49,17 @@ class BlueprintServiceLogicTest {
lateinit var dgWorkflowExecutionService: DGWorkflowExecutionService
@MockBean
- lateinit var bluePrintClusterService: BluePrintClusterService
+ lateinit var bluePrintClusterService: BlueprintClusterService
@Before
fun init() {
- BluePrintDependencyService.inject(applicationContext)
+ BlueprintDependencyService.inject(applicationContext)
}
@Test
fun testExecuteGraphWithSingleComponent() {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -72,10 +72,10 @@ class BlueprintServiceLogicTest {
bluePrintRuntimeService.assignWorkflowInputs("resource-assignment", input)
val executionServiceOutput = dgWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
@@ -84,7 +84,7 @@ class BlueprintServiceLogicTest {
@Test
fun testExecuteGraphWithMultipleComponents() {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -97,10 +97,10 @@ class BlueprintServiceLogicTest {
bluePrintRuntimeService.assignWorkflowInputs("assign-activate", input)
val executionServiceOutput = dgWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImplTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImplTest.kt
index b661e73a5..0bd1c33c9 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImplTest.kt
@@ -31,19 +31,19 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
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.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.MockComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.Step
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -55,18 +55,18 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@ContextConfiguration(classes = [WorkflowServiceConfiguration::class])
-class BluePrintWorkflowExecutionServiceImplTest {
+class BlueprintWorkflowExecutionServiceImplTest {
@Autowired
- lateinit var bluePrintWorkflowExecutionService: BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>
+ lateinit var bluePrintWorkflowExecutionService: BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>
@MockBean
- lateinit var bluePrintClusterService: BluePrintClusterService
+ lateinit var bluePrintClusterService: BlueprintClusterService
@Before
fun init() {
- mockkObject(BluePrintDependencyService)
- every { BluePrintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
+ mockkObject(BlueprintDependencyService)
+ every { BlueprintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
}
@After
@@ -75,9 +75,9 @@ class BluePrintWorkflowExecutionServiceImplTest {
}
@Test
- fun testBluePrintWorkflowExecutionService() {
+ fun testBlueprintWorkflowExecutionService() {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -88,20 +88,20 @@ class BluePrintWorkflowExecutionServiceImplTest {
)!!
val executionServiceOutput = bluePrintWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
}
@Test
- fun testImperativeBluePrintWorkflowExecutionService() {
+ fun testImperativeBlueprintWorkflowExecutionService() {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -112,11 +112,11 @@ class BluePrintWorkflowExecutionServiceImplTest {
)!!
val executionServiceOutput = bluePrintWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
@@ -124,9 +124,9 @@ class BluePrintWorkflowExecutionServiceImplTest {
@Test
fun `Blueprint fails on missing workflowName-parameters with a useful message`() {
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -138,7 +138,7 @@ class BluePrintWorkflowExecutionServiceImplTest {
)!!
val executionServiceOutput = bluePrintWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
}
}
}
@@ -146,11 +146,11 @@ class BluePrintWorkflowExecutionServiceImplTest {
@Test
fun `Should handle errors from resolve workflow output`() {
val imperativeWorkflowExecutionService: ImperativeWorkflowExecutionService = mockk()
- val bluePrintWorkflowExecutionServiceImpl = BluePrintWorkflowExecutionServiceImpl(
+ val bluePrintWorkflowExecutionServiceImpl = BlueprintWorkflowExecutionServiceImpl(
mockk(), mockk(), imperativeWorkflowExecutionService
)
- val bluePrintRuntimeService: BluePrintRuntimeService<MutableMap<String, JsonNode>> = mockk()
- val bluePrintContext: BluePrintContext = mockk()
+ val bluePrintRuntimeService: BlueprintRuntimeService<MutableMap<String, JsonNode>> = mockk()
+ val bluePrintContext: BlueprintContext = mockk()
val executionServiceInput = ExecutionServiceInput().apply {
this.actionIdentifiers = ActionIdentifiers().apply { this.actionName = "config-assign" }
this.commonHeader = CommonHeader()
@@ -159,7 +159,7 @@ class BluePrintWorkflowExecutionServiceImplTest {
val workflow = Workflow().apply {
this.steps = mutableMapOf("one" to Step(), "two" to Step())
}
- val blueprintError = BluePrintError()
+ val blueprintError = BlueprintError()
every { bluePrintRuntimeService.bluePrintContext() } returns bluePrintContext
every { bluePrintRuntimeService.assignWorkflowInputs(any(), any()) } returns Unit
@@ -169,13 +169,13 @@ class BluePrintWorkflowExecutionServiceImplTest {
} throws RuntimeException("failed to resolve property...")
every {
runBlocking {
- imperativeWorkflowExecutionService.executeBluePrintWorkflow(any(), any(), any())
+ imperativeWorkflowExecutionService.executeBlueprintWorkflow(any(), any(), any())
}
} returns ExecutionServiceOutput()
- every { bluePrintRuntimeService.getBluePrintError() } returns blueprintError
+ every { bluePrintRuntimeService.getBlueprintError() } returns blueprintError
runBlocking {
- val output = bluePrintWorkflowExecutionServiceImpl.executeBluePrintWorkflow(
+ val output = bluePrintWorkflowExecutionServiceImpl.executeBlueprintWorkflow(
bluePrintRuntimeService, executionServiceInput, mutableMapOf()
)
assertEquals("failed to resolve property...", blueprintError.errors[0])
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt
index cc1bfee7f..355939cdd 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt
@@ -22,11 +22,11 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -47,18 +47,18 @@ class DGWorkflowExecutionServiceTest {
lateinit var dgWorkflowExecutionService: DGWorkflowExecutionService
@MockBean
- lateinit var bluePrintClusterService: BluePrintClusterService
+ lateinit var bluePrintClusterService: BlueprintClusterService
@Before
fun init() {
- BluePrintDependencyService.inject(applicationContext)
+ BlueprintDependencyService.inject(applicationContext)
}
@Test
fun testExecuteDirectedGraph() {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -70,14 +70,14 @@ class DGWorkflowExecutionServiceTest {
val input = executionServiceInput.payload.get("resource-assignment-request")
bluePrintRuntimeService.assignWorkflowInputs("resource-assignment", input)
- val executionServiceOutput = dgWorkflowExecutionService.executeBluePrintWorkflow(
+ val executionServiceOutput = dgWorkflowExecutionService.executeBlueprintWorkflow(
bluePrintRuntimeService,
executionServiceInput, mutableMapOf()
)
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt
index 2367422a7..9ba607cd4 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt
@@ -28,15 +28,15 @@ import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTypeCompone
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.MockComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.mockNodeTemplateComponentScriptExecutor
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -48,8 +48,8 @@ class ImperativeWorkflowExecutionServiceTest {
@Before
fun init() {
- mockkObject(BluePrintDependencyService)
- every { BluePrintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
+ mockkObject(BlueprintDependencyService)
+ every { BlueprintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
}
@After
@@ -101,7 +101,7 @@ class ImperativeWorkflowExecutionServiceTest {
step("activate-licence", "activate-licence", "")
}
}
- nodeType(BluePrintTypes.nodeTypeComponentScriptExecutor())
+ nodeType(BlueprintTypes.nodeTypeComponentScriptExecutor())
}
}
@@ -109,10 +109,10 @@ class ImperativeWorkflowExecutionServiceTest {
fun testImperativeExecutionService() {
runBlocking {
val serviceTemplate = mockServiceTemplate()
- val bluePrintContext = BluePrintContext(serviceTemplate)
+ val bluePrintContext = BlueprintContext(serviceTemplate)
bluePrintContext.rootPath = normalizedPathName(".")
bluePrintContext.entryDefinition = "cba.imperative.test.ImperativeTestDefinitions.kt"
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("12345", bluePrintContext)
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime("12345", bluePrintContext)
val executionServiceInput = JacksonUtils
.readValueFromClassPathFile(
@@ -122,10 +122,10 @@ class ImperativeWorkflowExecutionServiceTest {
val imperativeWorkflowExecutionService = ImperativeWorkflowExecutionService(NodeTemplateExecutionService(mockk()))
val output = imperativeWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
assertNotNull(output, "failed to get imperative workflow output")
assertNotNull(output.status, "failed to get imperative workflow output status")
- assertEquals(output.status.message, BluePrintConstants.STATUS_SUCCESS)
+ assertEquals(output.status.message, BlueprintConstants.STATUS_SUCCESS)
assertEquals(output.status.eventType, EventType.EVENT_COMPONENT_EXECUTED.name)
}
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt
index f30086596..70b52d053 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt
@@ -24,11 +24,11 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.MockComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.test.context.ContextConfiguration
@@ -42,12 +42,12 @@ import kotlin.test.assertNotNull
class NodeTemplateExecutionServiceTest {
@MockBean
- lateinit var bluePrintClusterService: BluePrintClusterService
+ lateinit var bluePrintClusterService: BlueprintClusterService
@Before
fun init() {
- mockkObject(BluePrintDependencyService)
- every { BluePrintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
+ mockkObject(BlueprintDependencyService)
+ every { BlueprintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
}
@After
@@ -58,7 +58,7 @@ class NodeTemplateExecutionServiceTest {
@Test
fun testExecuteNodeTemplate() {
runBlocking {
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -79,7 +79,7 @@ class NodeTemplateExecutionServiceTest {
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt
index 9c3727288..e2bc0f131 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt
@@ -20,7 +20,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTemplateComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -29,7 +29,7 @@ import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
-fun mockNodeTemplateComponentScriptExecutor(id: String, script: String) = BluePrintTypes.nodeTemplateComponentScriptExecutor(
+fun mockNodeTemplateComponentScriptExecutor(id: String, script: String) = BlueprintTypes.nodeTemplateComponentScriptExecutor(
id,
"mock($id) component function"
) {