summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/resource-resolution
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions/resource-resolution')
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt14
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt10
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt10
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt48
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt12
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt54
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt104
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt14
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt14
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt30
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt20
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt6
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt22
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt8
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt12
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt36
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt24
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt72
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt6
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt6
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt18
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt32
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt22
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt4
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt16
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt24
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt18
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt14
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintRestLibPropertyService.kt (renamed from ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBluePrintRestLibPropertyService.kt)8
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt18
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt20
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt16
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt8
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt4
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt4
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt20
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt4
38 files changed, 391 insertions, 391 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
index 8087f7e3f..69db6cf8e 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
@@ -1,12 +1,12 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-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.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
-class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext) :
- DefaultBluePrintRuntimeService(id, bluePrintContext) {
+class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BlueprintContext) :
+ DefaultBlueprintRuntimeService(id, bluePrintContext) {
private lateinit var resolutionId: String
private var resourceStore: MutableMap<String, JsonNode> = hashMapOf()
@@ -29,7 +29,7 @@ class ResourceAssignmentRuntimeService(private var id: String, private var blueP
fun getResolutionStore(key: String): JsonNode {
return resourceStore[key]
- ?: throw BluePrintProcessorException("failed to get execution property ($key)")
+ ?: throw BlueprintProcessorException("failed to get execution property ($key)")
}
fun checkResolutionStore(key: String): Boolean {
@@ -62,7 +62,7 @@ class ResourceAssignmentRuntimeService(private var id: String, private var blueP
fun getDictionaryStore(key: String): JsonNode {
return resourceStore["dictionary-$key"]
- ?: throw BluePrintProcessorException("failed to get execution property (dictionary-$key)")
+ ?: throw BlueprintProcessorException("failed to get execution property (dictionary-$key)")
}
fun checkDictionaryStore(key: String): Boolean {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt
index c755e89bf..66077c4ed 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.PropertyDefinitionBuilder
@@ -24,12 +24,12 @@ import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
/** Resource Definition DSL **/
-fun BluePrintTypes.resourceDefinitions(block: ResourceDefinitionsBuilder.() -> Unit):
+fun BlueprintTypes.resourceDefinitions(block: ResourceDefinitionsBuilder.() -> Unit):
MutableMap<String, ResourceDefinition> {
return ResourceDefinitionsBuilder().apply(block).build()
}
-fun BluePrintTypes.resourceDefinition(
+fun BlueprintTypes.resourceDefinition(
name: String,
description: String,
block: ResourceDefinitionBuilder.() -> Unit
@@ -38,12 +38,12 @@ fun BluePrintTypes.resourceDefinition(
}
/** Resource Mapping DSL **/
-fun BluePrintTypes.resourceAssignments(block: ResourceAssignmentsBuilder.() -> Unit):
+fun BlueprintTypes.resourceAssignments(block: ResourceAssignmentsBuilder.() -> Unit):
MutableMap<String, ResourceAssignment> {
return ResourceAssignmentsBuilder().apply(block).build()
}
-fun BluePrintTypes.resourceAssignment(
+fun BlueprintTypes.resourceAssignment(
name: String,
dictionaryName: String,
dictionarySource: String,
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
index dac237fc5..6a2e128e2 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.node.JsonNodeFactory
import com.fasterxml.jackson.databind.node.ObjectNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asObjectNode
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
@@ -94,11 +94,11 @@ open class ResourceResolutionComponent(private val resourceResolutionService: Re
// validate inputs if we need to store the resource and template resolution.
if (storeResult) {
if (resolutionKey.isNotEmpty() && (resourceId.isNotEmpty() || resourceType.isNotEmpty())) {
- throw BluePrintProcessorException("Can't proceed with the resolution: either provide resolution-key OR combination of resource-id and resource-type.")
+ throw BlueprintProcessorException("Can't proceed with the resolution: either provide resolution-key OR combination of resource-id and resource-type.")
} else if ((resourceType.isNotEmpty() && resourceId.isEmpty()) || (resourceType.isEmpty() && resourceId.isNotEmpty())) {
- throw BluePrintProcessorException("Can't proceed with the resolution: both resource-id and resource-type should be provided, one of them is missing.")
+ throw BlueprintProcessorException("Can't proceed with the resolution: both resource-id and resource-type should be provided, one of them is missing.")
} else if (resourceType.isEmpty() && resourceId.isEmpty() && resolutionKey.isEmpty()) {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Can't proceed with the resolution: can't persist resolution without a correlation key. " +
"Either provide a resolution-key OR combination of resource-id and resource-type OR set `storeResult` to false."
)
@@ -140,6 +140,6 @@ open class ResourceResolutionComponent(private val resourceResolutionService: Re
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ bluePrintRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt
index 774873a43..c8b9e2c87 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
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.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
@@ -33,94 +33,94 @@ import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
/** Component Extensions **/
fun ServiceTemplateBuilder.nodeTypeComponentResourceResolution() {
- val nodeType = BluePrintTypes.nodeTypeComponentResourceResolution()
+ val nodeType = BlueprintTypes.nodeTypeComponentResourceResolution()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BluePrintTypes.nodeTypeComponentResourceResolution(): NodeType {
+fun BlueprintTypes.nodeTypeComponentResourceResolution(): NodeType {
return nodeType(
- id = "component-resource-resolution", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-resource-resolution", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "Resource Assignment Component"
) {
attribute(
- ResourceResolutionComponent.ATTRIBUTE_ASSIGNMENT_PARAM, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.ATTRIBUTE_ASSIGNMENT_PARAM, BlueprintConstants.DATA_TYPE_STRING,
true
)
attribute(
- ResourceResolutionComponent.ATTRIBUTE_STATUS, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.ATTRIBUTE_STATUS, BlueprintConstants.DATA_TYPE_STRING,
true
)
operation("ResourceResolutionComponent", "ResourceResolutionComponent Operation") {
inputs {
property(
- ResourceResolutionComponent.INPUT_REQUEST_ID, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_REQUEST_ID, BlueprintConstants.DATA_TYPE_STRING,
true, "Request Id, Unique Id for the request."
)
property(
- ResourceResolutionComponent.INPUT_RESOURCE_ID, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_RESOURCE_ID, BlueprintConstants.DATA_TYPE_STRING,
false, "Resource Id."
)
property(
- ResourceResolutionComponent.INPUT_ACTION_NAME, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_ACTION_NAME, BlueprintConstants.DATA_TYPE_STRING,
false, "Action Name of the process"
)
property(
- ResourceResolutionComponent.INPUT_DYNAMIC_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
+ ResourceResolutionComponent.INPUT_DYNAMIC_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
property(
- ResourceResolutionComponent.INPUT_RESOLUTION_KEY, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_RESOLUTION_KEY, BlueprintConstants.DATA_TYPE_STRING,
false, "Key for service instance related correlation."
)
property(
- ResourceResolutionComponent.INPUT_RESOLUTION_SUMMARY, BluePrintConstants.DATA_TYPE_BOOLEAN,
+ ResourceResolutionComponent.INPUT_RESOLUTION_SUMMARY, BlueprintConstants.DATA_TYPE_BOOLEAN,
false, "Enables ResolutionSummary output"
)
property(
- ResourceResolutionComponent.INPUT_OCCURRENCE, BluePrintConstants.DATA_TYPE_INTEGER,
+ ResourceResolutionComponent.INPUT_OCCURRENCE, BlueprintConstants.DATA_TYPE_INTEGER,
false, "Number of time to perform the resolution."
) {
defaultValue(1)
}
property(
- ResourceResolutionComponent.INPUT_STORE_RESULT, BluePrintConstants.DATA_TYPE_BOOLEAN,
+ ResourceResolutionComponent.INPUT_STORE_RESULT, BlueprintConstants.DATA_TYPE_BOOLEAN,
false, "Whether or not to store the output."
)
property(
- ResourceResolutionComponent.INPUT_RESOURCE_TYPE, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_RESOURCE_TYPE, BlueprintConstants.DATA_TYPE_STRING,
false, "Request type."
)
property(
- ResourceResolutionComponent.INPUT_ARTIFACT_PREFIX_NAMES, BluePrintConstants.DATA_TYPE_LIST,
+ ResourceResolutionComponent.INPUT_ARTIFACT_PREFIX_NAMES, BlueprintConstants.DATA_TYPE_LIST,
true, "Template , Resource Assignment Artifact Prefix names"
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
}
outputs {
property(
- ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_PARAMS, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_PARAMS, BlueprintConstants.DATA_TYPE_STRING,
true, "Output Response"
)
property(
- ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_MAP, BluePrintConstants.DATA_TYPE_MAP,
+ ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_MAP, BlueprintConstants.DATA_TYPE_MAP,
true, "Output Resolved Values"
)
property(
- ResourceResolutionComponent.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.OUTPUT_STATUS, BlueprintConstants.DATA_TYPE_STRING,
true, "Status of the Component Execution ( success or failure )"
)
}
@@ -134,7 +134,7 @@ fun TopologyTemplateBuilder.nodeTemplateComponentResourceResolution(
description: String,
block: ComponentResourceResolutionNodeTemplateBuilder.() -> Unit
) {
- val nodeTemplate = BluePrintTypes.nodeTemplateComponentResourceResolution(
+ val nodeTemplate = BlueprintTypes.nodeTemplateComponentResourceResolution(
id, description,
block
)
@@ -142,7 +142,7 @@ fun TopologyTemplateBuilder.nodeTemplateComponentResourceResolution(
nodeTemplates!![nodeTemplate.id!!] = nodeTemplate
}
-fun BluePrintTypes.nodeTemplateComponentResourceResolution(
+fun BlueprintTypes.nodeTemplateComponentResourceResolution(
id: String,
description: String,
block: ComponentResourceResolutionNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt
index 4774ad57a..a3cc1ef18 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt
@@ -20,22 +20,22 @@ import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolution
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolutionDBService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
/**
* Register the Resolution module exposed dependency
*/
-fun BluePrintDependencyService.resourceResolutionService(): ResourceResolutionService =
+fun BlueprintDependencyService.resourceResolutionService(): ResourceResolutionService =
instance(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
-fun BluePrintDependencyService.resourceResolutionDBService(): ResourceResolutionDBService =
+fun BlueprintDependencyService.resourceResolutionDBService(): ResourceResolutionDBService =
instance(ResourceResolutionDBService::class.java)
suspend fun AbstractComponentFunction.storedContentFromResolvedArtifactNB(
resolutionKey: String,
artifactName: String
): String {
- return BluePrintDependencyService.resourceResolutionService()
+ return BlueprintDependencyService.resourceResolutionService()
.resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
}
@@ -44,7 +44,7 @@ suspend fun AbstractComponentFunction.storedResourceResolutionsNB(
artifactName: String,
occurrence: Int = 1
): List<ResourceResolution> {
- return BluePrintDependencyService.resourceResolutionDBService()
+ return BlueprintDependencyService.resourceResolutionDBService()
.findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKeyAndOccurrence(
bluePrintRuntimeService,
resolutionKey,
@@ -57,7 +57,7 @@ suspend fun AbstractComponentFunction.storedResourceResolutionsNB(
* Return resolved and mashed artifact content for artifact prefix [artifactPrefix]
*/
suspend fun AbstractComponentFunction.contentFromResolvedArtifactNB(artifactPrefix: String): String {
- return BluePrintDependencyService.resourceResolutionService()
+ return BlueprintDependencyService.resourceResolutionService()
.resolveResources(bluePrintRuntimeService, nodeTemplateName, artifactPrefix, mapOf())
.first
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
index 79a00b1f0..46410a859 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
@@ -27,15 +27,15 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.T
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceDefinitionUtils.createResourceAssignments
-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.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants.LOG_REDACTED
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils.Companion.hasLogProtect
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -56,20 +56,20 @@ interface ResourceResolutionService {
fun registeredResourceSources(): List<String>
suspend fun resolveFromDatabase(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
artifactTemplate: String,
resolutionKey: String
): String
suspend fun resolveResources(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
nodeTemplateName: String,
artifactNames: List<String>,
properties: Map<String, Any>
): ResourceResolutionResult
suspend fun resolveResources(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
nodeTemplateName: String,
artifactPrefix: String,
properties: Map<String, Any>
@@ -79,7 +79,7 @@ interface ResourceResolutionService {
* with other [resourceDefinitions] dependencies for the sources [sources]
* Used to get the same resource values from multiple sources. **/
suspend fun resolveResourceDefinition(
- blueprintRuntimeService: BluePrintRuntimeService<*>,
+ blueprintRuntimeService: BlueprintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resolveDefinition: String,
sources: List<String>
@@ -87,7 +87,7 @@ interface ResourceResolutionService {
MutableMap<String, JsonNode>
suspend fun resolveResourceAssignments(
- blueprintRuntimeService: BluePrintRuntimeService<*>,
+ blueprintRuntimeService: BlueprintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resourceAssignments: MutableList<ResourceAssignment>,
artifactPrefix: String,
@@ -99,7 +99,7 @@ interface ResourceResolutionService {
open class ResourceResolutionServiceImpl(
private var applicationContext: ApplicationContext,
private var templateResolutionDBService: TemplateResolutionService,
- private var blueprintTemplateService: BluePrintTemplateService,
+ private var blueprintTemplateService: BlueprintTemplateService,
private var resourceResolutionDBService: ResourceResolutionDBService
) :
ResourceResolutionService {
@@ -113,7 +113,7 @@ open class ResourceResolutionServiceImpl(
}
override suspend fun resolveFromDatabase(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
artifactTemplate: String,
resolutionKey: String
): String {
@@ -125,7 +125,7 @@ open class ResourceResolutionServiceImpl(
}
override suspend fun resolveResources(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
nodeTemplateName: String,
artifactNames: List<String>,
properties: Map<String, Any>
@@ -153,15 +153,15 @@ open class ResourceResolutionServiceImpl(
// The following error message is returned by default to handle a scenario when
// error message comes empty even when resolution has actually failed.
// Example: input-source type resolution seems to fail with no error code.
- bluePrintRuntimeService.getBluePrintError().errors.add("Failed to resolve required resources($failedResolution)")
- bluePrintRuntimeService.getBluePrintError().errors.addAll(resourceAssignmentRuntimeService.getBluePrintError().errors)
+ bluePrintRuntimeService.getBlueprintError().errors.add("Failed to resolve required resources($failedResolution)")
+ bluePrintRuntimeService.getBlueprintError().errors.addAll(resourceAssignmentRuntimeService.getBlueprintError().errors)
}
}
return ResourceResolutionResult(templateMap, assignmentMap)
}
override suspend fun resolveResources(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
nodeTemplateName: String,
artifactPrefix: String,
properties: Map<String, Any>
@@ -180,7 +180,7 @@ open class ResourceResolutionServiceImpl(
val resourceAssignments: MutableList<ResourceAssignment> =
JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment::class.java)
as? MutableList<ResourceAssignment>
- ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
+ ?: throw BlueprintProcessorException("couldn't get Dictionary Definitions")
if (isToStore(properties)) {
val existingResourceResolution = isNewResolution(bluePrintRuntimeService, properties, artifactPrefix)
@@ -244,7 +244,7 @@ open class ResourceResolutionServiceImpl(
}
override suspend fun resolveResourceDefinition(
- blueprintRuntimeService: BluePrintRuntimeService<*>,
+ blueprintRuntimeService: BlueprintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resolveDefinition: String,
sources: List<String>
@@ -268,7 +268,7 @@ open class ResourceResolutionServiceImpl(
* request.
*/
override suspend fun resolveResourceAssignments(
- blueprintRuntimeService: BluePrintRuntimeService<*>,
+ blueprintRuntimeService: BlueprintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resourceAssignments: MutableList<ResourceAssignment>,
artifactPrefix: String,
@@ -291,7 +291,7 @@ open class ResourceResolutionServiceImpl(
// Execute Non Dependent Assignments in parallel ( ie asynchronously )
val deferred = batchResourceAssignments
.filter { it.name != "*" && it.name != "start" }
- .filter { it.status != BluePrintConstants.STATUS_SUCCESS }
+ .filter { it.status != BlueprintConstants.STATUS_SUCCESS }
.map { resourceAssignment ->
async {
val dictionaryName = resourceAssignment.dictionaryName
@@ -301,12 +301,12 @@ open class ResourceResolutionServiceImpl(
val resourceAssignmentProcessor =
applicationContext.getBean(processorName) as? ResourceAssignmentProcessor
- ?: throw BluePrintProcessorException(
+ ?: throw BlueprintProcessorException(
"failed to get resource processor ($processorName) " +
"for resource assignment(${resourceAssignment.name})"
)
try {
- // Set BluePrint Runtime Service
+ // Set Blueprint Runtime Service
resourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
// Set Resource Dictionaries
resourceAssignmentProcessor.resourceDictionaries = resourceDefinitions
@@ -327,10 +327,10 @@ open class ResourceResolutionServiceImpl(
}
// Set errors from RA
- blueprintRuntimeService.setBluePrintError(resourceAssignmentRuntimeService.getBluePrintError())
+ blueprintRuntimeService.setBlueprintError(resourceAssignmentRuntimeService.getBlueprintError())
} catch (e: RuntimeException) {
log.error("Fail in processing ${resourceAssignment.name}", e)
- throw BluePrintProcessorException(e)
+ throw BlueprintProcessorException(e)
}
}
}
@@ -358,10 +358,10 @@ open class ResourceResolutionServiceImpl(
}
else -> {
val resourceDefinition = resourceDefinitions[dictionaryName]
- ?: throw BluePrintProcessorException("couldn't get resource dictionary definition for $dictionaryName")
+ ?: throw BlueprintProcessorException("couldn't get resource dictionary definition for $dictionaryName")
val resourceSource = resourceDefinition.sources[dictionarySource]
- ?: throw BluePrintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR.plus(resourceSource.type)
}
@@ -381,7 +381,7 @@ open class ResourceResolutionServiceImpl(
// Check whether resolution already exist in the database for the specified resolution-key or resourceId/resourceType
private suspend fun isNewResolution(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
properties: Map<String, Any>,
artifactPrefix: String
): List<ResourceResolution> {
@@ -433,7 +433,7 @@ open class ResourceResolutionServiceImpl(
resourceAssignmentList: MutableList<ResourceAssignment>
) {
resourceResolutionList.forEach { resourceResolution ->
- if (resourceResolution.status == BluePrintConstants.STATUS_SUCCESS) {
+ if (resourceResolution.status == BlueprintConstants.STATUS_SUCCESS) {
resourceAssignmentList.forEach {
if (compareOne(resourceResolution, it)) {
log.info(
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt
index 62ec2bdf4..a681b4f68 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt
@@ -18,8 +18,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-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.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
@@ -30,30 +30,30 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.PropertiesAssignmentBuil
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.nodeType
import kotlin.reflect.KClass
-fun BluePrintTypes.nodeTypeSourceInput(): NodeType {
+fun BlueprintTypes.nodeTypeSourceInput(): NodeType {
return nodeType(
- id = "source-input", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-input", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Input Resource Source Node Type"
) {}
}
-fun BluePrintTypes.nodeTypeSourceDefault(): NodeType {
+fun BlueprintTypes.nodeTypeSourceDefault(): NodeType {
return nodeType(
- id = "source-default", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-default", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Default Resource Source Node Type"
) {}
}
-fun BluePrintTypes.nodeTypeSourceDb(): NodeType {
+fun BlueprintTypes.nodeTypeSourceDb(): NodeType {
return nodeType(
- id = "source-db", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-db", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Database Resource Source Node Type"
) {
property(
- "type", BluePrintConstants.DATA_TYPE_STRING,
+ "type", BlueprintConstants.DATA_TYPE_STRING,
true, ""
) {
defaultValue("SQL".asJsonPrimitive())
@@ -62,42 +62,42 @@ fun BluePrintTypes.nodeTypeSourceDb(): NodeType {
}
}
property(
- "endpoint-selector", BluePrintConstants.DATA_TYPE_STRING,
+ "endpoint-selector", BlueprintConstants.DATA_TYPE_STRING,
false, ""
)
property(
- "query", BluePrintConstants.DATA_TYPE_STRING,
+ "query", BlueprintConstants.DATA_TYPE_STRING,
true, ""
)
property(
- "input-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
+ "input-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
true, ""
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
property(
- "output-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
+ "output-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
false, ""
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
property(
- "key-dependencies", BluePrintConstants.DATA_TYPE_LIST,
+ "key-dependencies", BlueprintConstants.DATA_TYPE_LIST,
true, "Resource Resolution dependency dictionary names."
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
}
}
-fun BluePrintTypes.nodeTypeSourceRest(): NodeType {
+fun BlueprintTypes.nodeTypeSourceRest(): NodeType {
return nodeType(
- id = "source-rest", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-rest", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Rest Resource Source Node Type"
) {
property(
- "type", BluePrintConstants.DATA_TYPE_STRING,
+ "type", BlueprintConstants.DATA_TYPE_STRING,
true, ""
) {
defaultValue("JSON".asJsonPrimitive())
@@ -106,7 +106,7 @@ fun BluePrintTypes.nodeTypeSourceRest(): NodeType {
}
}
property(
- "verb", BluePrintConstants.DATA_TYPE_STRING,
+ "verb", BlueprintConstants.DATA_TYPE_STRING,
true, ""
) {
defaultValue("GET".asJsonPrimitive())
@@ -120,25 +120,25 @@ fun BluePrintTypes.nodeTypeSourceRest(): NodeType {
}
}
property(
- "payload", BluePrintConstants.DATA_TYPE_STRING,
+ "payload", BlueprintConstants.DATA_TYPE_STRING,
false, ""
) {
defaultValue("".asJsonPrimitive())
}
property(
- "endpoint-selector", BluePrintConstants.DATA_TYPE_STRING,
+ "endpoint-selector", BlueprintConstants.DATA_TYPE_STRING,
false, ""
)
property(
- "url-path", BluePrintConstants.DATA_TYPE_STRING,
+ "url-path", BlueprintConstants.DATA_TYPE_STRING,
true, ""
)
property(
- "path", BluePrintConstants.DATA_TYPE_STRING,
+ "path", BlueprintConstants.DATA_TYPE_STRING,
true, ""
)
property(
- "expression-type", BluePrintConstants.DATA_TYPE_STRING,
+ "expression-type", BlueprintConstants.DATA_TYPE_STRING,
false, ""
) {
defaultValue("JSON_PATH".asJsonPrimitive())
@@ -147,62 +147,62 @@ fun BluePrintTypes.nodeTypeSourceRest(): NodeType {
}
}
property(
- "input-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
+ "input-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
true, ""
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
property(
- "output-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
+ "output-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
false, ""
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
property(
- "key-dependencies", BluePrintConstants.DATA_TYPE_LIST,
+ "key-dependencies", BlueprintConstants.DATA_TYPE_LIST,
true, "Resource Resolution dependency dictionary names."
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
}
}
-fun BluePrintTypes.nodeTypeSourceCapability(): NodeType {
+fun BlueprintTypes.nodeTypeSourceCapability(): NodeType {
return nodeType(
- id = "source-capability", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-capability", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Component Resource Source Node Type"
) {
property(
- ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BlueprintConstants.DATA_TYPE_STRING,
true, "Request Id, Unique Id for the request."
) {
- defaultValue(BluePrintConstants.SCRIPT_KOTLIN)
+ defaultValue(BlueprintConstants.SCRIPT_KOTLIN)
constrain {
validValues(
arrayListOf(
- BluePrintConstants.SCRIPT_KOTLIN.asJsonPrimitive(),
- BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
- BluePrintConstants.SCRIPT_JYTHON.asJsonPrimitive()
+ BlueprintConstants.SCRIPT_KOTLIN.asJsonPrimitive(),
+ BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
+ BlueprintConstants.SCRIPT_JYTHON.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(
- "key-dependencies", BluePrintConstants.DATA_TYPE_LIST,
+ "key-dependencies", BlueprintConstants.DATA_TYPE_LIST,
true, "Resource Resolution dependency dictionary names."
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
}
}
/** Node Template Source Input **/
-fun BluePrintTypes.nodeTemplateSourceInput(
+fun BlueprintTypes.nodeTemplateSourceInput(
id: String,
description: String,
block: SourceInputNodeTemplateBuilder.() -> Unit
@@ -217,7 +217,7 @@ class SourceInputNodeTemplateBuilder(id: String, description: String) :
)
/** Node Template Source Default **/
-fun BluePrintTypes.nodeTemplateSourceDefault(
+fun BlueprintTypes.nodeTemplateSourceDefault(
id: String,
description: String,
block: SourceDefaultNodeTemplateBuilder.() -> Unit
@@ -232,7 +232,7 @@ class SourceDefaultNodeTemplateBuilder(id: String, description: String) :
)
/** Node Template Source DB **/
-fun BluePrintTypes.nodeTemplateSourceDb(
+fun BlueprintTypes.nodeTemplateSourceDb(
id: String,
description: String,
block: SourceDbNodeTemplateBuilder.() -> Unit
@@ -299,7 +299,7 @@ class KeyMappingBuilder() {
}
/** Node Template Source Rest **/
-fun BluePrintTypes.nodeTemplateSourceRest(
+fun BlueprintTypes.nodeTemplateSourceRest(
id: String,
description: String,
block: SourceRestNodeTemplateBuilder.() -> Unit
@@ -378,7 +378,7 @@ class SourceRestNodeTemplateBuilder(id: String, description: String) :
}
/** Node Template Source Rest **/
-fun BluePrintTypes.nodeTemplateSourceCapability(
+fun BlueprintTypes.nodeTemplateSourceCapability(
id: String,
description: String,
block: SourceCapabilityNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt
index 03a90d134..d9a5ba0d1 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt
@@ -20,10 +20,10 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.Reso
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.KeyIdentifier
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -51,7 +51,7 @@ open class IpAssignResolutionCapability : ResourceAssignmentProcessor() {
/** Check Resource Assignment has the source definitions, If not get from Resource Definitions **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties =
checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
@@ -81,7 +81,7 @@ open class IpAssignResolutionCapability : ResourceAssignmentProcessor() {
resourceSourceProperties["resolved-payload"] = JacksonUtils.jsonNode(generatedPayload)
// Get the Rest Client service, selector will be included in application.properties
- val restClientService = BluePrintDependencyService.restClientService(
+ val restClientService = BlueprintDependencyService.restClientService(
"ipassign-ms"
)
@@ -100,7 +100,7 @@ open class IpAssignResolutionCapability : ResourceAssignmentProcessor() {
"Failed to dictionary name ($dName), dictionary source($($dName) " +
"response_code: ($responseStatusCode)"
log.warn(errMsg)
- throw BluePrintProcessorException(errMsg)
+ throw BlueprintProcessorException(errMsg)
}
// Parse the error Body and assign the property value
}
@@ -108,7 +108,7 @@ open class IpAssignResolutionCapability : ResourceAssignmentProcessor() {
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Failed in template key ($resourceAssignment) assignments with: ${e.message}",
e
)
@@ -116,7 +116,7 @@ open class IpAssignResolutionCapability : ResourceAssignmentProcessor() {
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
/** Generates aggregated request payload for Ip Assign mS. Parses the resourceassignments of
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt
index 7a5986aa6..903c1b3fa 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt
@@ -20,10 +20,10 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.Reso
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.KeyIdentifier
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -51,7 +51,7 @@ open class NamingResolutionCapability : ResourceAssignmentProcessor() {
/** Check Resource Assignment has the source definitions, If not get from Resource Definitions **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties =
checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
@@ -82,7 +82,7 @@ open class NamingResolutionCapability : ResourceAssignmentProcessor() {
resourceSourceProperties["resolved-payload"] = JacksonUtils.jsonNode(generatedPayload)
// Get the Rest Client service, selector will be included in application.properties
- val restClientService = BluePrintDependencyService.restClientService(
+ val restClientService = BlueprintDependencyService.restClientService(
"naming-ms"
)
@@ -102,7 +102,7 @@ open class NamingResolutionCapability : ResourceAssignmentProcessor() {
"Failed to dictionary name ($dName), dictionary source($($dName) " +
"response_code: ($responseStatusCode)"
log.warn(errMsg)
- throw BluePrintProcessorException(errMsg)
+ throw BlueprintProcessorException(errMsg)
}
// Parse the error Body and assign the property value
}
@@ -110,7 +110,7 @@ open class NamingResolutionCapability : ResourceAssignmentProcessor() {
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Failed in template key ($resourceAssignment) assignments with: ${e.message}",
e
)
@@ -118,7 +118,7 @@ open class NamingResolutionCapability : ResourceAssignmentProcessor() {
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
/** Generates aggregated request payload for Naming mS. Parses the resourceassignments of
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
index 5958c7899..592408b67 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
@@ -18,9 +18,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -34,7 +34,7 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
private val log = LoggerFactory.getLogger(ResourceResolutionDBService::class.toString())
suspend fun findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKeyAndOccurrence(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
key: String,
occurrence: Int,
artifactPrefix: String
@@ -42,8 +42,8 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
return try {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
resourceResolutionRepository.findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKeyAndOccurrence(
blueprintName,
@@ -58,7 +58,7 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
}
suspend fun findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResourceIdAndResourceTypeAndOccurrence(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
resourceId: String,
resourceType: String,
occurrence: Int,
@@ -68,8 +68,8 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
resourceResolutionRepository.findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResourceIdAndResourceTypeAndOccurrence(
blueprintName,
@@ -134,15 +134,15 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
suspend fun write(
properties: Map<String, Any>,
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
artifactPrefix: String,
resourceAssignment: ResourceAssignment
): ResourceResolution = withContext(Dispatchers.IO) {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
val resolutionKey = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] as String
val resourceId = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] as String
@@ -182,7 +182,7 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
resourceResolution.resourceType = resourceType
resourceResolution.resourceId = resourceId
resourceResolution.value = resourceAssignment.property?.value?.let {
- if (BluePrintConstants.STATUS_SUCCESS == resourceAssignment.status)
+ if (BlueprintConstants.STATUS_SUCCESS == resourceAssignment.status)
JacksonUtils.getValue(it).toString()
else ""
} ?: ""
@@ -190,12 +190,12 @@ class ResourceResolutionDBService(private val resourceResolutionRepository: Reso
resourceResolution.dictionaryName = resourceAssignment.dictionaryName
resourceResolution.dictionaryVersion = resourceAssignment.version
resourceResolution.dictionarySource = resourceAssignment.dictionarySource
- resourceResolution.status = resourceAssignment.status ?: BluePrintConstants.STATUS_FAILURE
+ resourceResolution.status = resourceAssignment.status ?: BlueprintConstants.STATUS_FAILURE
try {
resourceResolutionRepository.saveAndFlush(resourceResolution)
} catch (ex: Exception) {
- throw BluePrintException("Failed to store resource resolution result.", ex)
+ throw BlueprintException("Failed to store resource resolution result.", ex)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
index 4bdd5d985..cbd8b8310 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
@@ -18,9 +18,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.dao.EmptyResultDataAccessException
@@ -33,7 +33,7 @@ class TemplateResolutionService(private val templateResolutionRepository: Templa
private val log = LoggerFactory.getLogger(TemplateResolutionService::class.toString())
suspend fun findByResolutionKeyAndBlueprintNameAndBlueprintVersionAndArtifactName(
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
artifactPrefix: String,
resolutionKey: String
): String =
@@ -41,8 +41,8 @@ class TemplateResolutionService(private val templateResolutionRepository: Templa
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
findByResolutionKeyAndBlueprintNameAndBlueprintVersionAndArtifactName(
blueprintName,
@@ -93,14 +93,14 @@ class TemplateResolutionService(private val templateResolutionRepository: Templa
suspend fun write(
properties: Map<String, Any>,
result: String,
- bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ bluePrintRuntimeService: BlueprintRuntimeService<*>,
artifactPrefix: String
): TemplateResolution = withContext(Dispatchers.IO) {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
val resolutionKey = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] as String
val resourceId = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] as String
val resourceType = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_TYPE] as String
@@ -187,7 +187,7 @@ class TemplateResolutionService(private val templateResolutionRepository: Templa
" (resourceId: $resourceId resourceType: $resourceType) occurrence:$occurrence error: {}",
ex.message
)
- throw BluePrintException("Failed to store resource api result.", ex)
+ throw BlueprintException("Failed to store resource api result.", ex)
}
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
index 1a557f5bc..4f33c8252 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
@@ -22,7 +22,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.Capa
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -53,7 +53,7 @@ open class CapabilityResourceResolutionProcessor(private var componentFunctionSc
/** Check Resource Assignment has the source definitions, If not get from Resource Definition **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProps =
checkNotNull(resourceSource.properties) { "failed to get $resourceSource properties" }
@@ -87,7 +87,7 @@ open class CapabilityResourceResolutionProcessor(private var componentFunctionSc
}
override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- raRuntimeService.getBluePrintError()
+ raRuntimeService.getBlueprintError()
.addError("Failed in CapabilityResourceResolutionProcessor : ${runtimeException.message}")
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, runtimeException.message)
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
index 829af8425..640b0f5fe 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
@@ -17,14 +17,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDBLibGenericService
-import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BlueprintDBLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
@@ -47,7 +47,7 @@ import java.util.HashMap
@Service("${PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-db")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class DatabaseResourceAssignmentProcessor(
- private val bluePrintDBLibPropertyService: BluePrintDBLibPropertyService,
+ private val bluePrintDBLibPropertyService: BlueprintDBLibPropertyService,
private val primaryDBLibGenericService: PrimaryDBLibGenericService
) : ResourceAssignmentProcessor() {
@@ -66,7 +66,7 @@ open class DatabaseResourceAssignmentProcessor(
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
val errorMsg = "Failed to process Database resource resolution in template key ($resourceAssignment) assignments."
throw e.updateErrorMessage(
ExecutionServiceDomains.RESOURCE_RESOLUTION, errorMsg,
@@ -74,7 +74,7 @@ open class DatabaseResourceAssignmentProcessor(
)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
}
}
@@ -86,7 +86,7 @@ open class DatabaseResourceAssignmentProcessor(
/** Check Resource Assignment has the source definitions, If not get from Resource Definition **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties = checkNotNull(resourceSource.properties) {
"failed to get source properties for $dName "
}
@@ -119,7 +119,7 @@ open class DatabaseResourceAssignmentProcessor(
}
}
- private fun blueprintDBLibService(sourceProperties: DatabaseResourceSource, selector: String): BluePrintDBLibGenericService {
+ private fun blueprintDBLibService(sourceProperties: DatabaseResourceSource, selector: String): BlueprintDBLibGenericService {
return if (isNotEmpty(sourceProperties.endpointSelector)) {
val dbPropertiesJson = raRuntimeService.resolveDSLExpression(sourceProperties.endpointSelector!!)
bluePrintDBLibPropertyService.JdbcTemplate(dbPropertiesJson)
@@ -128,7 +128,7 @@ open class DatabaseResourceAssignmentProcessor(
}
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
private fun validate(resourceAssignment: ResourceAssignment) {
checkNotEmpty(resourceAssignment.name) { "resource assignment template key is not defined" }
checkNotEmpty(resourceAssignment.dictionaryName) {
@@ -156,7 +156,7 @@ open class DatabaseResourceAssignmentProcessor(
return namedParameters
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
private fun populateResource(
resourceAssignment: ResourceAssignment,
sourceProperties: DatabaseResourceSource,
@@ -183,6 +183,6 @@ open class DatabaseResourceAssignmentProcessor(
}
override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt
index 892d8fbc9..f90a8b5fa 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt
@@ -20,7 +20,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.pro
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -51,7 +51,7 @@ open class DefaultResourceResolutionProcessor : ResourceAssignmentProcessor() {
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
val errorMsg = "Failed to process default resource resolution in template key ($resourceAssignment) assignments."
throw e.updateErrorMessage(
ExecutionServiceDomains.RESOURCE_RESOLUTION, errorMsg,
@@ -59,11 +59,11 @@ open class DefaultResourceResolutionProcessor : ResourceAssignmentProcessor() {
)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
}
}
override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt
index 21098797b..d85449b19 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt
@@ -20,7 +20,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.pro
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -52,13 +52,13 @@ open class InputResourceResolutionProcessor : ResourceAssignmentProcessor() {
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
val errorMsg = "Failed to process input resource resolution in template key ($resourceAssignment) assignments."
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
logger.error(errorMsg)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with : (${e.message})", e)
+ throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with : (${e.message})", e)
}
}
@@ -71,7 +71,7 @@ open class InputResourceResolutionProcessor : ResourceAssignmentProcessor() {
/** Check Resource Assignment has the source definitions, If not get from Resource Definition **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
try {
val resourceSourceProperties = checkNotNull(resourceSource.properties) {
@@ -86,11 +86,11 @@ open class InputResourceResolutionProcessor : ResourceAssignmentProcessor() {
// keyDependency = service-instance.service-instance-id
setFromInputKeyDependencies(keyDependency, resourceAssignment); // New API which picks attribute from Input
} catch (e: IllegalStateException) {
- throw BluePrintProcessorException(e)
+ throw BlueprintProcessorException(e)
}
}
override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
index cffc5e3bf..b5bafad59 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
@@ -22,13 +22,13 @@ import com.fasterxml.jackson.databind.JsonNode
import org.apache.commons.collections.MapUtils
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-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.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.onap.ccsdk.cds.controllerblueprints.core.isNullOrMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.slf4j.LoggerFactory
@@ -50,7 +50,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
*/
open fun <T> scriptPropertyInstanceType(name: String): T {
return scriptPropertyInstances as? T
- ?: throw BluePrintProcessorException("couldn't get script property instance ($name)")
+ ?: throw BlueprintProcessorException("couldn't get script property instance ($name)")
}
open fun setFromInput(resourceAssignment: ResourceAssignment): Boolean {
@@ -64,7 +64,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, value)
return true
}
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
// NoOp - couldn't find value from input
}
return false
@@ -83,7 +83,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
return true
}
}
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
// NoOp - couldn't find value from input
}
return false
@@ -110,7 +110,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
return valueToResolve
}
// TODO("Optimize to JSON Node directly without velocity").asJsonNode().toString()
- return BluePrintVelocityTemplateService.generateContent(valueToResolve, keyMapping.asJsonNode().toString())
+ return BlueprintVelocityTemplateService.generateContent(valueToResolve, keyMapping.asJsonNode().toString())
}
final override suspend fun applyNB(resourceAssignment: ResourceAssignment): Boolean {
@@ -126,7 +126,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
suspend fun executeScript(resourceAssignment: ResourceAssignment) {
return when (scriptType) {
- BluePrintConstants.SCRIPT_JYTHON -> {
+ BlueprintConstants.SCRIPT_JYTHON -> {
executeScriptBlocking(resourceAssignment)
}
else -> {
@@ -163,39 +163,39 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
*/
final override fun apply(resourceAssignment: ResourceAssignment): Boolean {
- throw BluePrintException("Not Implemented, use applyNB method")
+ throw BlueprintException("Not Implemented, use applyNB method")
}
final override fun prepareRequest(resourceAssignment: ResourceAssignment): ResourceAssignment {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override fun prepareResponse(): Boolean {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override suspend fun prepareRequestNB(resourceAssignment: ResourceAssignment): ResourceAssignment {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
final override suspend fun prepareResponseNB(): Boolean {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
override fun process(resourceAssignment: ResourceAssignment) {
- throw BluePrintException("Not Implemented, child class will implement this")
+ throw BlueprintException("Not Implemented, child class will implement this")
}
override fun recover(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- throw BluePrintException("Not Implemented, child class will implement this")
+ throw BlueprintException("Not Implemented, child class will implement this")
}
fun addError(type: String, name: String, error: String) {
- raRuntimeService.getBluePrintError().addError(type, name, error)
+ raRuntimeService.getBlueprintError().addError(type, name, error)
}
fun addError(error: String) {
- raRuntimeService.getBluePrintError().addError(error)
+ raRuntimeService.getBlueprintError().addError(error)
}
fun isTemplateKeyValueNull(resourceAssignment: ResourceAssignment): Boolean {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
index 92a8533cb..0085b1624 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
@@ -20,11 +20,11 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.pro
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.RestResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-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.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
@@ -44,7 +44,7 @@ import org.springframework.stereotype.Service
*/
@Service("${PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-rest")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyService: BluePrintRestLibPropertyService) :
+open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyService: BlueprintRestLibPropertyService) :
ResourceAssignmentProcessor() {
private val logger = LoggerFactory.getLogger(RestResourceResolutionProcessor::class.java)
@@ -66,7 +66,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
/** Check Resource Assignment has the source definitions, If not get from Resource Definitions **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties =
checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
@@ -104,7 +104,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
val responseBody = response.body
val outputKeyMapping = sourceProperties.outputKeyMapping
if (responseStatusCode in 200..299 && outputKeyMapping.isNullOrEmpty()) {
- resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
+ resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
logger.info("AS>> outputKeyMapping==null, will not populateResource")
} else if (responseStatusCode in 200..299 && !responseBody.isBlank()) {
populateResource(resourceAssignment, sourceProperties, responseBody, path)
@@ -112,12 +112,12 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
val errMsg =
"Failed to get $dSource result for dictionary name ($dName) using urlPath ($urlPath) response_code: ($responseStatusCode)"
logger.warn(errMsg)
- throw BluePrintProcessorException(errMsg)
+ throw BlueprintProcessorException(errMsg)
}
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
val errorMsg = "Failed to process REST resource resolution in template key ($resourceAssignment) assignments."
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, errorMsg)
throw e.updateErrorMessage(
@@ -126,7 +126,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
}
}
@@ -142,7 +142,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
}
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
private fun populateResource(
resourceAssignment: ResourceAssignment,
sourceProperties: RestResourceSource,
@@ -175,7 +175,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, parsedResponseNode)
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
private fun validate(resourceAssignment: ResourceAssignment) {
checkNotEmpty(resourceAssignment.name) { "resource assignment template key is not defined" }
checkNotEmpty(resourceAssignment.dictionaryName) {
@@ -187,6 +187,6 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
}
override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
index 54231da61..3440e3860 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
@@ -26,9 +26,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.databind.node.TextNode
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkFileExists
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
@@ -39,8 +39,8 @@ import org.onap.ccsdk.cds.controllerblueprints.core.isNullOrMissing
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.rootFieldsToMap
-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.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils.Companion.hasLogProtect
@@ -59,14 +59,14 @@ class ResourceAssignmentUtils {
suspend fun resourceDefinitions(blueprintBasePath: String): MutableMap<String, ResourceDefinition> {
val dictionaryFile = normalizedFile(
- blueprintBasePath, BluePrintConstants.TOSCA_DEFINITIONS_DIR,
+ blueprintBasePath, BlueprintConstants.TOSCA_DEFINITIONS_DIR,
ResourceResolutionConstants.FILE_NAME_RESOURCE_DEFINITION_TYPES
)
checkFileExists(dictionaryFile) { "resource definition file(${dictionaryFile.absolutePath}) is missing" }
return JacksonReactorUtils.getMapFromFile(dictionaryFile, ResourceDefinition::class.java)
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun setResourceDataValue(
resourceAssignment: ResourceAssignment,
raRuntimeService: ResourceAssignmentRuntimeService,
@@ -76,7 +76,7 @@ class ResourceAssignmentUtils {
return setResourceDataValue(resourceAssignment, raRuntimeService, value.asJsonType())
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun setResourceDataValue(
resourceAssignment: ResourceAssignment,
raRuntimeService: ResourceAssignmentRuntimeService,
@@ -108,11 +108,11 @@ class ResourceAssignmentUtils {
)
setResourceValue(resourceAssignment, raRuntimeService, value)
resourceAssignment.updatedDate = Date()
- resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
- resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
+ resourceAssignment.updatedBy = BlueprintConstants.USER_SYSTEM
+ resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
}
} catch (e: Exception) {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Failed in setting value for template key " +
"(${resourceAssignment.name}) and dictionary key (${resourceAssignment.dictionaryName}) of " +
"type (${resourceProp.type}) with error message (${e.message})",
@@ -139,7 +139,7 @@ class ResourceAssignmentUtils {
.mapValues { e -> e.value.asText() } as MutableMap<String, Any>
val newValue: JsonNode
try {
- newValue = BluePrintVelocityTemplateService
+ newValue = BlueprintVelocityTemplateService
.generateContent(template, null, true, resolutionStore)
.also {
if (hasLogProtect(metadata))
@@ -149,7 +149,7 @@ class ResourceAssignmentUtils {
}
.let { v -> v.asJsonType() }
} catch (e: Exception) {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"transform-template failed: $template", e
)
}
@@ -164,24 +164,24 @@ class ResourceAssignmentUtils {
fun setFailedResourceDataValue(resourceAssignment: ResourceAssignment, message: String?) {
if (isNotEmpty(resourceAssignment.name)) {
resourceAssignment.updatedDate = Date()
- resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
- resourceAssignment.status = BluePrintConstants.STATUS_FAILURE
+ resourceAssignment.updatedBy = BlueprintConstants.USER_SYSTEM
+ resourceAssignment.status = BlueprintConstants.STATUS_FAILURE
resourceAssignment.message = message
}
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun assertTemplateKeyValueNotNull(resourceAssignment: ResourceAssignment) {
val resourceProp = checkNotNull(resourceAssignment.property) {
"Failed to populate mandatory resource resource mapping $resourceAssignment"
}
if (resourceProp.required != null && resourceProp.required!! && resourceProp.value.isNullOrMissing()) {
logger.error("failed to populate mandatory resource mapping ($resourceAssignment)")
- throw BluePrintProcessorException("failed to populate mandatory resource mapping ($resourceAssignment)")
+ throw BlueprintProcessorException("failed to populate mandatory resource mapping ($resourceAssignment)")
}
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun generateResourceDataForAssignments(assignments: List<ResourceAssignment>): String {
val result: String
try {
@@ -209,13 +209,13 @@ class ResourceAssignmentUtils {
logger.info("Generated Resource Param Data ($result)")
}
} catch (e: Exception) {
- throw BluePrintProcessorException("Resource Assignment is failed with $e.message", e)
+ throw BlueprintProcessorException("Resource Assignment is failed with $e.message", e)
}
return result
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun generateResourceForAssignments(assignments: List<ResourceAssignment>): MutableMap<String, JsonNode> {
val data: MutableMap<String, JsonNode> = hashMapOf()
assignments.forEach {
@@ -291,7 +291,7 @@ class ResourceAssignmentUtils {
}
fun transformToRARuntimeService(
- blueprintRuntimeService: BluePrintRuntimeService<*>,
+ blueprintRuntimeService: BlueprintRuntimeService<*>,
templateArtifactName: String
): ResourceAssignmentRuntimeService {
@@ -305,7 +305,7 @@ class ResourceAssignmentUtils {
return resourceAssignmentRuntimeService
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun getPropertyType(
raRuntimeService: ResourceAssignmentRuntimeService,
dataTypeName: String,
@@ -321,12 +321,12 @@ class ResourceAssignmentUtils {
logger.trace("Data type({})'s property ({}) is ({})", dataTypeName, propertyName, type)
} catch (e: Exception) {
logger.error("couldn't get data type($dataTypeName)'s property ($propertyName), error message $e")
- throw BluePrintProcessorException("${e.message}", e)
+ throw BlueprintProcessorException("${e.message}", e)
}
return type
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
fun parseResponseNode(
responseNode: JsonNode,
resourceAssignment: ResourceAssignment,
@@ -336,18 +336,18 @@ class ResourceAssignmentUtils {
val metadata = resourceAssignment.property!!.metadata
try {
if ((resourceAssignment.property?.type).isNullOrEmpty()) {
- throw BluePrintProcessorException("Couldn't get data dictionary type for dictionary name (${resourceAssignment.name})")
+ throw BlueprintProcessorException("Couldn't get data dictionary type for dictionary name (${resourceAssignment.name})")
}
val type = resourceAssignment.property!!.type
val valueToPrint = getValueToLog(metadata, responseNode)
logger.info("For template key (${resourceAssignment.name}) trying to get value from responseNode ($valueToPrint)")
return when (type) {
- in BluePrintTypes.validPrimitiveTypes() -> {
+ in BlueprintTypes.validPrimitiveTypes() -> {
// Primitive Types
parseResponseNodeForPrimitiveTypes(responseNode, resourceAssignment, outputKeyMapping)
}
- in BluePrintTypes.validCollectionTypes() -> {
+ in BlueprintTypes.validCollectionTypes() -> {
// Array Types
parseResponseNodeForCollection(responseNode, resourceAssignment, raRuntimeService, outputKeyMapping)
}
@@ -358,7 +358,7 @@ class ResourceAssignmentUtils {
}
} catch (e: Exception) {
logger.error("Fail to parse response data, error message $e")
- throw BluePrintProcessorException("${e.message}", e)
+ throw BlueprintProcessorException("${e.message}", e)
}
}
@@ -387,7 +387,7 @@ class ResourceAssignmentUtils {
}
if (returnNode.isNullOrMissing() || returnNode!!.isComplexType() && !returnNode.has(outputKeyMapping[outputKey])) {
- throw BluePrintProcessorException("Fail to find output key mapping ($outputKey) in the responseNode.")
+ throw BlueprintProcessorException("Fail to find output key mapping ($outputKey) in the responseNode.")
}
val returnValue = if (returnNode.isComplexType()) {
@@ -411,7 +411,7 @@ class ResourceAssignmentUtils {
val metadata = resourceAssignment.property!!.metadata
var resultNode: JsonNode
if ((resourceAssignment.property?.entrySchema?.type).isNullOrEmpty()) {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Couldn't get data type for dictionary type " +
"(${resourceAssignment.property!!.type}) and dictionary name ($dName)"
)
@@ -441,7 +441,7 @@ class ResourceAssignmentUtils {
)
}
else -> {
- throw BluePrintProcessorException("Key-value response expected to match the responseNode.")
+ throw BlueprintProcessorException("Key-value response expected to match the responseNode.")
}
}
} else {
@@ -486,7 +486,7 @@ class ResourceAssignmentUtils {
): ObjectNode {
val outputKeyMappingHasOnlyOneElement = checkIfOutputKeyMappingProvideOneElement(outputKeyMapping)
when (entrySchemaType) {
- in BluePrintTypes.validPrimitiveTypes() -> {
+ in BlueprintTypes.validPrimitiveTypes() -> {
if (outputKeyMappingHasOnlyOneElement) {
val outputKeyMap = outputKeyMapping.entries.first()
if (resourceAssignment.keyIdentifiers.none { it.name == outputKeyMap.key }) {
@@ -503,7 +503,7 @@ class ResourceAssignmentUtils {
metadata
)
} else {
- throw BluePrintProcessorException("Expect one entry in output-key-mapping")
+ throw BlueprintProcessorException("Expect one entry in output-key-mapping")
}
}
else -> {
@@ -533,7 +533,7 @@ class ResourceAssignmentUtils {
)
}
else -> {
- throw BluePrintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
+ throw BlueprintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
}
}
}
@@ -557,7 +557,7 @@ class ResourceAssignmentUtils {
resourceAssignment.keyIdentifiers.add(KeyIdentifier(outputKeyMap.key, returnValue))
return returnValue
} else {
- throw BluePrintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
+ throw BlueprintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
}
}
@@ -669,7 +669,7 @@ class ResourceAssignmentUtils {
)
}
else -> {
- throw BluePrintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
+ throw BlueprintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
}
}
} else {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt
index 1bf854cbd..4b4e04e16 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asListOfString
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
@@ -48,7 +48,7 @@ object ResourceDefinitionUtils {
MutableList<ResourceAssignment> {
/** Check if resolve definition is defined in the resource definition Map */
val resourceDefinition = resourceDefinitions[resolveDefinition]
- ?: throw BluePrintProcessorException("failed to get resolve definition($resolveDefinition)")
+ ?: throw BlueprintProcessorException("failed to get resolve definition($resolveDefinition)")
val resourceAssignments: MutableList<ResourceAssignment> = arrayListOf()
@@ -56,7 +56,7 @@ object ResourceDefinitionUtils {
val definitionDependencies = definitionDependencies(resourceDefinition, sources)
definitionDependencies.forEach { definitionDependencyName ->
val definitionDependency = resourceDefinitions[definitionDependencyName]
- ?: throw BluePrintProcessorException("failed to get dependency definition($definitionDependencyName)")
+ ?: throw BlueprintProcessorException("failed to get dependency definition($definitionDependencyName)")
val resourceAssignment = ResourceAssignment().apply {
name = definitionDependency.name
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt
index 7dcaab733..bdb47e711 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@@ -25,7 +25,7 @@ class ResourceDefinitionDSLTest {
@Test
fun testResourceDefinitionDSL() {
- val testResourceDefinition = BluePrintTypes.resourceDefinition(
+ val testResourceDefinition = BlueprintTypes.resourceDefinition(
"service-instance-id",
"VFW Service Instance Name"
) {
@@ -79,7 +79,7 @@ class ResourceDefinitionDSLTest {
// println(resourceDefinition.asJsonString(true))
assertNotNull(testResourceDefinition, "failed to generate testResourceDefinition")
- val testResourceDefinitions = BluePrintTypes.resourceDefinitions {
+ val testResourceDefinitions = BlueprintTypes.resourceDefinitions {
resourceDefinition(testResourceDefinition)
}
assertNotNull(testResourceDefinitions, "failed to generate testResourceDefinitions")
@@ -88,7 +88,7 @@ class ResourceDefinitionDSLTest {
@Test
fun testResourceAssignment() {
- val testResourceAssignment = BluePrintTypes.resourceAssignment(
+ val testResourceAssignment = BlueprintTypes.resourceAssignment(
"instance-name",
"service-instance-name", "odl-mdsal"
) {
@@ -99,7 +99,7 @@ class ResourceDefinitionDSLTest {
// println(resourceAssignment.asJsonString(true))
assertNotNull(testResourceAssignment, "failed to generate resourceAssignment")
- val testResourceAssignments = BluePrintTypes.resourceAssignments {
+ val testResourceAssignments = BlueprintTypes.resourceAssignments {
resourceAssignment(testResourceAssignment)
resourceAssignment(
"instance-name1",
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt
index f7c41bdac..09eef46d4 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getAttribute
import kotlin.test.Test
import kotlin.test.assertNotNull
@@ -25,14 +25,14 @@ class ResourceResolutionComponentDSLTest {
@Test
fun testNodeTypeComponentResourceResolution() {
- val nodeType = BluePrintTypes.nodeTypeComponentResourceResolution()
+ val nodeType = BlueprintTypes.nodeTypeComponentResourceResolution()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeComponentResourceResolution")
}
@Test
fun testNodeTemplateComponentResourceResolution() {
- val nodeTemplate = BluePrintTypes.nodeTemplateComponentResourceResolution("resource-resolve", "") {
+ val nodeTemplate = BlueprintTypes.nodeTemplateComponentResourceResolution("resource-resolve", "") {
definedOperation("Resolve resources") {
inputs {
actionName("resolve")
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
index ab1efcdc8..80ba8315b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
@@ -26,10 +26,10 @@ import kotlinx.coroutines.runBlocking
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertEquals
import kotlin.test.fail
@@ -44,7 +44,7 @@ class ResourceResolutionComponentTest {
private val resourceType = "ServiceInstance"
private val occurrence = 1
private val props = mutableMapOf<String, JsonNode>()
- private val bluePrintRuntimeService = mockk<BluePrintRuntimeService<*>>()
+ private val bluePrintRuntimeService = mockk<BlueprintRuntimeService<*>>()
private val artifactNames = listOf("template")
private val nodeTemplateName = "nodeTemplateName"
@@ -79,7 +79,7 @@ class ResourceResolutionComponentTest {
runBlocking {
try {
resourceResolutionComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
assertEquals(
"Can't proceed with the resolution: either provide resolution-key OR combination of resource-id and resource-type.",
e.message
@@ -98,7 +98,7 @@ class ResourceResolutionComponentTest {
runBlocking {
try {
resourceResolutionComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
assertEquals(
"Can't proceed with the resolution: both resource-id and resource-type should be provided, one of them is missing.",
e.message
@@ -118,7 +118,7 @@ class ResourceResolutionComponentTest {
runBlocking {
try {
resourceResolutionComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
assertEquals(
"Can't proceed with the resolution: can't persist resolution without a correlation key. " +
"Either provide a resolution-key OR combination of resource-id and resource-type OR set `storeResult` to false.",
@@ -163,9 +163,9 @@ class ResourceResolutionComponentTest {
@Test
fun testRecover() {
runBlocking {
- val blueprintError = BluePrintError()
+ val blueprintError = BlueprintError()
val exception = RuntimeException("message")
- every { bluePrintRuntimeService.getBluePrintError() } returns blueprintError
+ every { bluePrintRuntimeService.getBlueprintError() } returns blueprintError
resourceResolutionComponent.recoverNB(exception, executionRequest)
assertEquals(1, blueprintError.errors.size)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
index db8ca4801..00fb39515 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
@@ -30,11 +30,11 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.PayloadUtils
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.MockCapabilityScriptRA
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResolutionSummary
import org.slf4j.LoggerFactory
@@ -106,7 +106,7 @@ class ResourceResolutionServiceTest {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -160,7 +160,7 @@ class ResourceResolutionServiceTest {
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -199,7 +199,7 @@ class ResourceResolutionServiceTest {
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -244,7 +244,7 @@ class ResourceResolutionServiceTest {
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_SUMMARY] = true
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -290,7 +290,7 @@ class ResourceResolutionServiceTest {
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -343,7 +343,7 @@ class ResourceResolutionServiceTest {
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -383,13 +383,13 @@ class ResourceResolutionServiceTest {
@Test
fun testResourceResolutionForDefinition() {
- val resourceDefinitions = BluePrintTypes.resourceDefinitions {
+ val resourceDefinitions = BlueprintTypes.resourceDefinitions {
resourceDefinition(name = "port-speed", description = "Port Speed") {
property(type = "string", required = true)
sources {
sourceCapability(id = "sdno", description = "SDNO Source") {
definedProperties {
- type(BluePrintConstants.SCRIPT_KOTLIN)
+ type(BlueprintConstants.SCRIPT_KOTLIN)
scriptClassReference(MockCapabilityScriptRA::class.qualifiedName!!)
keyDependencies(arrayListOf("device-id"))
}
@@ -416,9 +416,9 @@ class ResourceResolutionServiceTest {
}
runBlocking {
val raRuntimeService = mockk<ResourceAssignmentRuntimeService>()
- every { raRuntimeService.bluePrintContext() } returns mockk<BluePrintContext>()
- every { raRuntimeService.getBluePrintError() } returns BluePrintError()
- every { raRuntimeService.setBluePrintError(any()) } returns Unit
+ every { raRuntimeService.bluePrintContext() } returns mockk<BlueprintContext>()
+ every { raRuntimeService.getBlueprintError() } returns BlueprintError()
+ every { raRuntimeService.setBlueprintError(any()) } returns Unit
every { raRuntimeService.getInputValue("device-id") } returns "123456".asJsonPrimitive()
every { raRuntimeService.putResolutionStore(any(), any()) } returns Unit
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt
index 2e9dc9e2a..1dff814ac 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import kotlin.test.Test
import kotlin.test.assertNotNull
@@ -24,42 +24,42 @@ class ResourceSourceDSLTest {
@Test
fun testNodeTypeSourceInput() {
- val nodeType = BluePrintTypes.nodeTypeSourceInput()
+ val nodeType = BlueprintTypes.nodeTypeSourceInput()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceInput")
}
@Test
fun testNodeTypeSourceDefault() {
- val nodeType = BluePrintTypes.nodeTypeSourceDefault()
+ val nodeType = BlueprintTypes.nodeTypeSourceDefault()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceDefault")
}
@Test
fun testNodeTypeSourceDb() {
- val nodeType = BluePrintTypes.nodeTypeSourceDb()
+ val nodeType = BlueprintTypes.nodeTypeSourceDb()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceDb")
}
@Test
fun testNodeTypeSourceRest() {
- val nodeType = BluePrintTypes.nodeTypeSourceRest()
+ val nodeType = BlueprintTypes.nodeTypeSourceRest()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceRest")
}
@Test
fun testNodeTypeSourceCapability() {
- val nodeType = BluePrintTypes.nodeTypeSourceCapability()
+ val nodeType = BlueprintTypes.nodeTypeSourceCapability()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceCapability")
}
@Test
fun testNodeTemplateSourceInput() {
- val nodeTemplate = BluePrintTypes.nodeTemplateSourceInput("InputSystem", "") {
+ val nodeTemplate = BlueprintTypes.nodeTemplateSourceInput("InputSystem", "") {
}
// println(nodeTemplate.asJsonString(true))
assertNotNull(nodeTemplate, "failed to generate nodeTemplateSourceInput")
@@ -67,7 +67,7 @@ class ResourceSourceDSLTest {
@Test
fun testNodeTemplateSourceDefault() {
- val nodeTemplate = BluePrintTypes.nodeTemplateSourceDefault("DefaultSystem", "") {
+ val nodeTemplate = BlueprintTypes.nodeTemplateSourceDefault("DefaultSystem", "") {
}
// println(nodeTemplate.asJsonString(true))
assertNotNull(nodeTemplate, "failed to generate nodeTemplateSourceDefault")
@@ -75,7 +75,7 @@ class ResourceSourceDSLTest {
@Test
fun testNodeTemplateSourceDb() {
- val nodeTemplate = BluePrintTypes.nodeTemplateSourceDb("DbSystem", "") {
+ val nodeTemplate = BlueprintTypes.nodeTemplateSourceDb("DbSystem", "") {
definedProperties {
type("SQL")
query("SELECT * FROM DB WHERE name = \$name")
@@ -95,7 +95,7 @@ class ResourceSourceDSLTest {
@Test
fun testNodeTemplateSourceRest() {
- val nodeTemplate = BluePrintTypes.nodeTemplateSourceRest("restSystem", "") {
+ val nodeTemplate = BlueprintTypes.nodeTemplateSourceRest("restSystem", "") {
definedProperties {
type("JSON")
endpointSelector("rest-source-endpoint")
@@ -119,7 +119,7 @@ class ResourceSourceDSLTest {
@Test
fun testNodeTemplateSourceCapability() {
- val nodeTemplate = BluePrintTypes.nodeTemplateSourceCapability("capabiltySystem", "") {
+ val nodeTemplate = BlueprintTypes.nodeTemplateSourceCapability("capabiltySystem", "") {
definedProperties {
type("kotlin")
scriptClassReference("Scripts/Sample.kt")
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt
index 096d7ff27..d720bd836 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@ import org.springframework.transaction.PlatformTransactionManager
import javax.sql.DataSource
@Configuration
-@Import(BluePrintDBLibConfiguration::class)
+@Import(BlueprintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution",
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt
index 4ce5df18f..e48ac388d 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt
@@ -29,14 +29,14 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.proc
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceAssignments
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceDefinitions
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-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.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResolutionSummary
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -57,7 +57,7 @@ class IpAssignResolutionCapabilityTest {
@Before
fun setup() {
- mockkObject(BluePrintDependencyService)
+ mockkObject(BlueprintDependencyService)
val blueprintWebClientService = mockk<BlueprintWebClientService>()
// Create mock Response
@@ -72,9 +72,9 @@ class IpAssignResolutionCapabilityTest {
)
every { blueprintWebClientService.exchangeResource(any(), any(), any()) } returns mockResponse
- val restLibPropertyService = mockk<BluePrintRestLibPropertyService>()
+ val restLibPropertyService = mockk<BlueprintRestLibPropertyService>()
every { restLibPropertyService.blueprintWebClientService("ipassign-ms") } returns blueprintWebClientService
- every { BluePrintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
+ every { BlueprintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
}
@Test
@@ -152,7 +152,7 @@ class IpAssignResolutionCapabilityTest {
/** Test dictionaries */
private fun resourceDefinitions(): MutableMap<String, ResourceDefinition> {
- return BluePrintTypes.resourceDefinitions {
+ return BlueprintTypes.resourceDefinitions {
resourceDefinition("CloudRegionId", "Cloud Region Id Resource Definition") {
tags("CloudRegionId")
updatedBy("saurav.paira@att.com")
@@ -230,7 +230,7 @@ class IpAssignResolutionCapabilityTest {
}
private fun resourceAssignments(): MutableMap<String, ResourceAssignment> {
- return BluePrintTypes.resourceAssignments {
+ return BlueprintTypes.resourceAssignments {
resourceAssignment(
name = "CloudRegionId", dictionaryName = "CloudRegionId",
dictionarySource = "input"
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt
index 8c0aca49e..66f302f6f 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt
@@ -29,16 +29,16 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.proc
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceAssignments
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceDefinitions
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+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.logger
-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.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResolutionSummary
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -60,7 +60,7 @@ class NamingResolutionCapabilityTest {
@Before
fun setup() {
- mockkObject(BluePrintDependencyService)
+ mockkObject(BlueprintDependencyService)
val blueprintWebClientService = mockk<BlueprintWebClientService>()
// Create mock Response
@@ -74,9 +74,9 @@ class NamingResolutionCapabilityTest {
)
every { blueprintWebClientService.exchangeResource(any(), any(), any()) } returns mockResponse
- val restLibPropertyService = mockk<BluePrintRestLibPropertyService>()
+ val restLibPropertyService = mockk<BlueprintRestLibPropertyService>()
every { restLibPropertyService.blueprintWebClientService("naming-ms") } returns blueprintWebClientService
- every { BluePrintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
+ every { BlueprintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
}
@Test
@@ -89,8 +89,8 @@ class NamingResolutionCapabilityTest {
} returns NamingResolutionCapability()
val raRuntimeService = mockk<ResourceAssignmentRuntimeService>()
- every { raRuntimeService.getBluePrintError() } returns BluePrintError()
- every { raRuntimeService.bluePrintContext() } returns mockk<BluePrintContext>()
+ every { raRuntimeService.getBlueprintError() } returns BlueprintError()
+ every { raRuntimeService.bluePrintContext() } returns mockk<BlueprintContext>()
every { raRuntimeService.getInputValue("vf-module-name") } returns NullNode.getInstance()
every { raRuntimeService.getInputValue("vnfc-name") } returns NullNode.getInstance()
@@ -154,7 +154,7 @@ class NamingResolutionCapabilityTest {
/** Test dictionaries */
private fun resourceDefinitions(): MutableMap<String, ResourceDefinition> {
- return BluePrintTypes.resourceDefinitions {
+ return BlueprintTypes.resourceDefinitions {
resourceDefinition("naming-code", "naming-code Resource Definition") {
tags("naming-code")
updatedBy("brindasanth@onap.com")
@@ -274,7 +274,7 @@ class NamingResolutionCapabilityTest {
}
private fun resourceAssignments(): MutableMap<String, ResourceAssignment> {
- return BluePrintTypes.resourceAssignments {
+ return BlueprintTypes.resourceAssignments {
resourceAssignment(
name = "naming-code", dictionaryName = "naming-code",
dictionarySource = "input"
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt
index fa59876a9..51825a5f9 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt
@@ -23,10 +23,10 @@ import kotlinx.coroutines.runBlocking
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-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.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.resource.dict.ResourceAssignment
import org.springframework.dao.EmptyResultDataAccessException
import kotlin.test.assertEquals
@@ -46,13 +46,13 @@ open class ResourceResolutionDBServiceTest {
private val blueprintVersion = "1.0.0"
private val metadata = hashMapOf<String, String>()
private val props = hashMapOf<String, Any>()
- private val bluePrintContext = mockk<BluePrintContext>()
- private val bluePrintRuntimeService = mockk<DefaultBluePrintRuntimeService>()
+ private val bluePrintContext = mockk<BlueprintContext>()
+ private val bluePrintRuntimeService = mockk<DefaultBlueprintRuntimeService>()
@Before
fun setup() {
- metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
- metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = blueprintName
+ metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
+ metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = blueprintName
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] = resolutionKey
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] = resourceId
@@ -206,7 +206,7 @@ open class ResourceResolutionDBServiceTest {
fun writeTest() {
val resourceResolution = ResourceResolution()
val resourceAssignment = ResourceAssignment()
- resourceAssignment.property?.status = BluePrintConstants.STATUS_SUCCESS
+ resourceAssignment.property?.status = BlueprintConstants.STATUS_SUCCESS
resourceAssignment.property?.value = "result".asJsonPrimitive()
resourceAssignment.dictionarySource = "ddSource"
resourceAssignment.dictionaryName = "ddName"
@@ -229,7 +229,7 @@ open class ResourceResolutionDBServiceTest {
fun writeWithNullValue() {
val slot = slot<ResourceResolution>()
val resourceAssignment = ResourceAssignment()
- resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
+ resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
resourceAssignment.dictionarySource = "ddSource"
resourceAssignment.dictionaryName = "ddName"
resourceAssignment.version = 1
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt
index 71d895574..0a7722f53 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt
@@ -7,9 +7,9 @@ import kotlinx.coroutines.runBlocking
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-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.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
import org.springframework.dao.EmptyResultDataAccessException
import kotlin.test.assertEquals
@@ -29,13 +29,13 @@ class TemplateResolutionServiceTest {
private val result = "result"
private val metadata = hashMapOf<String, String>()
private val props = hashMapOf<String, Any>()
- private val bluePrintContext = mockk<BluePrintContext>()
- private val bluePrintRuntimeService = mockk<DefaultBluePrintRuntimeService>()
+ private val bluePrintContext = mockk<BlueprintContext>()
+ private val bluePrintRuntimeService = mockk<DefaultBlueprintRuntimeService>()
@Before
fun setup() {
- metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
- metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = blueprintName
+ metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
+ metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = blueprintName
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] = resolutionKey
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] = resourceId
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBluePrintRestLibPropertyService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintRestLibPropertyService.kt
index a2ec75d02..b6c20cd5a 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBluePrintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintRestLibPropertyService.kt
@@ -15,12 +15,12 @@
*/
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
-class MockBluePrintRestLibPropertyService(bluePrintProperties: BluePrintPropertiesService) :
- BluePrintRestLibPropertyService(bluePrintProperties) {
+class MockBlueprintRestLibPropertyService(bluePrintProperties: BlueprintPropertiesService) :
+ BlueprintRestLibPropertyService(bluePrintProperties) {
fun mockBlueprintWebClientService(selector: String):
MockBlueprintWebClientService {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
index 2219f2348..653a2c1f4 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
@@ -17,9 +17,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.moc
import io.mockk.coEvery
import io.mockk.mockk
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -27,8 +27,8 @@ import org.springframework.context.annotation.Configuration
open class MockDBLibGenericService {
@Bean(name = ["MariaDatabaseConfiguration", "MySqlDatabaseConfiguration"])
- open fun createDatabaseConfiguration(): BluePrintDBLibGenericService {
- return mockk<BluePrintDBLibGenericService>()
+ open fun createDatabaseConfiguration(): BlueprintDBLibGenericService {
+ return mockk<BlueprintDBLibGenericService>()
}
}
@@ -36,10 +36,10 @@ open class MockDBLibGenericService {
open class MockBlueprintProcessorCatalogServiceImpl {
@Bean(name = ["bluePrintRuntimeValidatorService"])
- open fun bluePrintRuntimeValidatorService(): BluePrintValidatorService {
- val bluePrintValidatorService = mockk<BluePrintValidatorService>()
- coEvery { bluePrintValidatorService.validateBluePrints(any<String>()) } returns true
- coEvery { bluePrintValidatorService.validateBluePrints(any<BluePrintRuntimeService<*>>()) } returns true
+ open fun bluePrintRuntimeValidatorService(): BlueprintValidatorService {
+ val bluePrintValidatorService = mockk<BlueprintValidatorService>()
+ coEvery { bluePrintValidatorService.validateBlueprints(any<String>()) } returns true
+ coEvery { bluePrintValidatorService.validateBlueprints(any<BlueprintRuntimeService<*>>()) } returns true
return bluePrintValidatorService
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt
index 0312126b7..de46fe6f3 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt
@@ -22,8 +22,8 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.Reso
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.RestResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -33,7 +33,7 @@ import java.util.HashMap
class MockRestResourceResolutionProcessor(
private val blueprintRestLibPropertyService:
- MockBluePrintRestLibPropertyService
+ MockBlueprintRestLibPropertyService
) : ResourceAssignmentProcessor() {
private val logger = LoggerFactory.getLogger(MockRestResourceResolutionProcessor::class.java)
@@ -97,12 +97,12 @@ class MockRestResourceResolutionProcessor(
val errMsg =
"Failed to get $dSource result for dictionary name ($dName) using urlPath ($urlPath) response_code: ($responseStatusCode)"
logger.warn(errMsg)
- throw BluePrintProcessorException(errMsg)
+ throw BlueprintProcessorException(errMsg)
}
}
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(executionRequest, e.message)
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Failed in template resolutionKey ($executionRequest) assignments with: ${e.message}",
e
)
@@ -110,14 +110,14 @@ class MockRestResourceResolutionProcessor(
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ResourceAssignment) {
- raRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ raRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
private fun blueprintWebClientService(resourceAssignment: ResourceAssignment): MockBlueprintWebClientService {
return blueprintRestLibPropertyService.mockBlueprintWebClientService(resourceAssignment.dictionarySource!!)
}
- @Throws(BluePrintProcessorException::class)
+ @Throws(BlueprintProcessorException::class)
private fun populateResource(
resourceAssignment: ResourceAssignment,
sourceProperties: RestResourceSource,
@@ -132,15 +132,15 @@ class MockRestResourceResolutionProcessor(
val responseNode = JacksonUtils.jsonNode(restResponse).at(path)
when (type) {
- in BluePrintTypes.validPrimitiveTypes() -> {
+ in BlueprintTypes.validPrimitiveTypes() -> {
ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, responseNode)
}
- in BluePrintTypes.validCollectionTypes() -> {
+ in BlueprintTypes.validCollectionTypes() -> {
// Array Types
entrySchemaType = resourceAssignment.property!!.entrySchema!!.type
val arrayNode = responseNode as ArrayNode
- if (entrySchemaType !in BluePrintTypes.validPrimitiveTypes()) {
+ if (entrySchemaType !in BlueprintTypes.validPrimitiveTypes()) {
val responseArrayNode = responseNode.toList()
for (responseSingleJsonNode in responseArrayNode) {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
index 1b0058b90..b289cfe3e 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
@@ -27,13 +27,13 @@ import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceAssignment
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-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.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-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.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -53,14 +53,14 @@ class CapabilityResourceResolutionProcessorTest {
} returns MockCapabilityScriptRA()
val raRuntimeService = mockk<ResourceAssignmentRuntimeService>()
- every { raRuntimeService.bluePrintContext() } returns mockk<BluePrintContext>()
+ every { raRuntimeService.bluePrintContext() } returns mockk<BlueprintContext>()
every { raRuntimeService.getInputValue("test-property") } returns NullNode.getInstance()
val capabilityResourceResolutionProcessor =
CapabilityResourceResolutionProcessor(componentFunctionScriptingService)
capabilityResourceResolutionProcessor.raRuntimeService = raRuntimeService
- val resourceAssignment = BluePrintTypes.resourceAssignment(
+ val resourceAssignment = BlueprintTypes.resourceAssignment(
name = "test-property", dictionaryName = "ra-dict-name",
dictionarySource = "capability"
) {
@@ -86,14 +86,14 @@ class CapabilityResourceResolutionProcessorTest {
fun `test jython capability`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/capability_python"
)
val componentFunctionScriptingService = mockk<ComponentFunctionScriptingService>()
coEvery {
componentFunctionScriptingService
- .scriptInstance<ResourceAssignmentProcessor>(any(), BluePrintConstants.SCRIPT_JYTHON, any())
+ .scriptInstance<ResourceAssignmentProcessor>(any(), BlueprintConstants.SCRIPT_JYTHON, any())
} returns MockCapabilityScriptRA()
val resourceAssignmentRuntimeService = ResourceAssignmentRuntimeService("1234", bluePrintContext)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
index 0c8ec7d95..6689aff81 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
@@ -19,14 +19,14 @@ import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDBLibGenericService
-import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BlueprintDBLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.TestDatabaseConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBlueprintProcessorCatalogServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -38,7 +38,7 @@ import kotlin.test.assertNotNull
@ContextConfiguration(
classes = [
TestDatabaseConfiguration::class,
- PrimaryDBLibGenericService::class, BluePrintDBLibPropertyService::class,
+ PrimaryDBLibGenericService::class, BlueprintDBLibPropertyService::class,
DatabaseResourceAssignmentProcessor::class, MockDBLibGenericService::class,
MockBlueprintProcessorCatalogServiceImpl::class
]
@@ -52,7 +52,7 @@ class DatabaseResourceResolutionProcessorTest {
@Test
fun `test database resource resolution processor db`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt
index a109131fe..7cec75950 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt
@@ -20,7 +20,7 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -39,7 +39,7 @@ class DefaultResourceResolutionProcessorTest {
@Test
fun `test default resource resolution`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt
index cf8dc0c59..aae35f4d3 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt
@@ -25,7 +25,7 @@ import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -45,7 +45,7 @@ class InputResourceResolutionProcessorTest {
fun `InputResourceResolutionProcessor should be able to resolve a value for an input parameter`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
index cb7214123..9fabf5dbd 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
@@ -18,15 +18,15 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.pro
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBlueprintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockRestResourceResolutionProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -38,15 +38,15 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- MockRestResourceResolutionProcessor::class, MockBluePrintRestLibPropertyService::class,
- BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, RestClientProperties::class
+ MockRestResourceResolutionProcessor::class, MockBlueprintRestLibPropertyService::class,
+ BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class, RestClientProperties::class
]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
class RestResourceResolutionProcessorTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: MockBluePrintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: MockBlueprintRestLibPropertyService
private lateinit var restResourceResolutionProcessor: MockRestResourceResolutionProcessor
@@ -58,7 +58,7 @@ class RestResourceResolutionProcessorTest {
@Test
fun `test rest resource resolution`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -92,7 +92,7 @@ class RestResourceResolutionProcessorTest {
@Test
fun `test rest aai get resource resolution`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -126,7 +126,7 @@ class RestResourceResolutionProcessorTest {
@Test
fun `test rest aai put resource resolution`() {
runBlocking {
- val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
index 2f07e3b9a..d9e93150c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
@@ -36,7 +36,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.EntrySchema
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -70,7 +70,7 @@ class ResourceAssignmentUtilsTest {
fun setup() {
val bluePrintContext = runBlocking {
- BluePrintMetadataUtils.getBluePrintContext(
+ BlueprintMetadataUtils.getBlueprintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
}