summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2021-01-22 11:49:51 -0500
committerSingal, Kapil (ks220y) <ks220y@att.com>2021-01-22 12:08:19 -0500
commitadcd4f2bc695840e9ecbc05003bc52c675f22fec (patch)
tree5db58ce9b6b3e86977ca3c697ce3e8998523eb61 /ms/blueprintsprocessor/functions
parentdc8252f3cfa1ddd0c1c8c70513c16c738d840822 (diff)
Renaming Files having BluePrint to have Blueprint
Replacing BluePrint with Blueprint throughout Issue-ID: CCSDK-3098 Signed-off-by: KAPIL SINGAL <ks220y@att.com> Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96
Diffstat (limited to 'ms/blueprintsprocessor/functions')
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt4
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt30
-rw-r--r--ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt4
-rw-r--r--ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt32
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt4
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt28
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt4
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt10
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt30
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt14
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt6
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt4
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt6
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt10
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt4
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt4
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt14
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt4
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt4
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt18
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt30
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutor.kt2
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt4
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt12
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt14
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt12
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt44
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt6
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt16
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt8
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt6
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt2
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt12
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt6
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt42
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt6
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt4
-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
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt16
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt18
-rw-r--r--ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/ComponentRestfulExecutor.kt2
-rw-r--r--ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt10
-rw-r--r--ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt18
-rw-r--r--ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt8
81 files changed, 657 insertions, 657 deletions
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
index 133e4a52b..2eafcd458 100644
--- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.TextNode
import kotlinx.coroutines.delay
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-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.AbstractComponentFunction
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
@@ -55,7 +55,7 @@ import java.util.NoSuchElementException
@Component("component-remote-ansible-executor")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class ComponentRemoteAnsibleExecutor(
- private val blueprintRestLibPropertyService: BluePrintRestLibPropertyService,
+ private val blueprintRestLibPropertyService: BlueprintRestLibPropertyService,
private val mapper: ObjectMapper
) :
AbstractComponentFunction() {
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
index c45f5140b..27ce7a214 100644
--- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
@@ -27,13 +27,13 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
-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.rest.service.BlueprintWebClientService.WebClientResponse
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
@@ -94,7 +94,7 @@ class ComponentRemoteAnsibleExecutorTest {
)
} returns WebClientResponse(200, getReport())
val selector = mapper.readTree(endpointSelector)
- val bluePrintRestLibPropertyService = mockk<BluePrintRestLibPropertyService>()
+ val bluePrintRestLibPropertyService = mockk<BlueprintRestLibPropertyService>()
every { bluePrintRestLibPropertyService.blueprintWebClientService(selector) } returns webClientService
val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService, mapper)
awxRemoteExecutor.checkDelay = 1
@@ -112,7 +112,7 @@ class ComponentRemoteAnsibleExecutorTest {
}
// then
- assertTrue(bluePrintRuntimeService.getBluePrintError().errors.isEmpty())
+ assertTrue(bluePrintRuntimeService.getBlueprintError().errors.isEmpty())
}
@Test
@@ -128,7 +128,7 @@ class ComponentRemoteAnsibleExecutorTest {
webClientService.exchangeResource("GET", "/api/v2/inventories/?name=Demo+Inventory", "")
} returns WebClientResponse(404, "")
val selector = mapper.readTree(endpointSelector)
- val bluePrintRestLibPropertyService = mockk<BluePrintRestLibPropertyService>()
+ val bluePrintRestLibPropertyService = mockk<BlueprintRestLibPropertyService>()
every { bluePrintRestLibPropertyService.blueprintWebClientService(selector) } returns webClientService
val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService, mapper)
awxRemoteExecutor.checkDelay = 1
@@ -146,7 +146,7 @@ class ComponentRemoteAnsibleExecutorTest {
}
// then
- val errors = bluePrintRuntimeService.getBluePrintError().errors
+ val errors = bluePrintRuntimeService.getBlueprintError().errors
assertEquals(1, errors.size)
}
@@ -169,7 +169,7 @@ class ComponentRemoteAnsibleExecutorTest {
)
} returns WebClientResponse(500, "")
val selector = mapper.readTree(endpointSelector)
- val bluePrintRestLibPropertyService = mockk<BluePrintRestLibPropertyService>()
+ val bluePrintRestLibPropertyService = mockk<BlueprintRestLibPropertyService>()
every { bluePrintRestLibPropertyService.blueprintWebClientService(selector) } returns webClientService
val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService, mapper)
awxRemoteExecutor.checkDelay = 1
@@ -187,15 +187,15 @@ class ComponentRemoteAnsibleExecutorTest {
}
// then
- val errors = bluePrintRuntimeService.getBluePrintError().errors
+ val errors = bluePrintRuntimeService.getBlueprintError().errors
assertEquals(1, errors.size)
}
private fun createBlueprintRuntimeService(
awxRemoteExecutor: ComponentRemoteAnsibleExecutor,
executionServiceInput: ExecutionServiceInput
- ): BluePrintRuntimeService<MutableMap<String, JsonNode>> {
- val bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
+ ): BlueprintRuntimeService<MutableMap<String, JsonNode>> {
+ val bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_ansible"
)
@@ -208,9 +208,9 @@ class ComponentRemoteAnsibleExecutorTest {
bluePrintRuntimeService.assignWorkflowInputs(workflowName, input)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
val stepInputData = StepData().apply {
name = "execute-remote-ansible"
diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt
index b6f2dcb94..341455309 100644
--- a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt
+++ b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt
@@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshClientService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.sshClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
/**
* Register the CLI module exposed dependency
@@ -31,5 +31,5 @@ fun AbstractComponentFunction.cliDeviceInfo(requirementName: String): JsonNode {
}
fun AbstractComponentFunction.getSshClientService(cliDeviceInfo: JsonNode): BlueprintSshClientService {
- return BluePrintDependencyService.sshClientService(cliDeviceInfo)
+ return BlueprintDependencyService.sshClientService(cliDeviceInfo)
}
diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt b/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
index 3cefa3274..c9109a3f1 100644
--- a/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
@@ -23,22 +23,22 @@ import io.mockk.mockk
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.core.api.data.ActionIdentifiers
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BlueprintSshLibConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
-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.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.annotation.DirtiesContext
@@ -52,8 +52,8 @@ import kotlin.test.assertNotNull
classes = [
CliExecutorConfiguration::class,
ExecutionServiceConfiguration::class,
- BluePrintSshLibConfiguration::class, BluePrintScriptsServiceImpl::class,
- BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDependencyService::class
+ BlueprintSshLibConfiguration::class, BlueprintScriptsServiceImpl::class,
+ BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class, BlueprintDependencyService::class
]
)
@DirtiesContext
@@ -76,15 +76,15 @@ class ComponentCliExecutorTest {
}
payload = JacksonUtils.jsonNode("{}") as ObjectNode
}
- val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
componentScriptExecutor.bluePrintRuntimeService = bluePrintRuntime
componentScriptExecutor.stepName = "sample-step"
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-cli".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
- operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_TYPE] = BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-cli".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
+ operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_TYPE] = BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE] =
"internal.scripts.TestCliScriptFunction".asJsonPrimitive()
@@ -94,7 +94,7 @@ class ComponentCliExecutorTest {
}
executionServiceInput.stepData = stepInputData
- val blueprintContext = mockk<BluePrintContext>()
+ val blueprintContext = mockk<BlueprintContext>()
every {
blueprintContext.nodeTemplateOperationImplementation(
any(), any(), any()
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
index 06146c200..382a1312f 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
@@ -19,7 +19,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.apache.logging.log4j.util.Strings
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot.Status.RUNNING
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
@@ -111,7 +111,7 @@ open class ResourceConfigSnapshotService(private val resourceConfigSnapshotRepos
"dated=(${storedSnapshot.createdDate})"
)
} catch (ex: DataIntegrityViolationException) {
- throw BluePrintException("Failed to store configuration snapshot entry.", ex)
+ throw BlueprintException("Failed to store configuration snapshot entry.", ex)
}
storedSnapshot
}
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
index c6166ebbc..acdbe070f 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
@@ -31,9 +31,9 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.Compone
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor.Companion.OPERATION_STORE
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshotService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-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.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.ComponentScan
@@ -55,7 +55,7 @@ class ComponentConfigSnapshotsExecutorTest {
@Autowired
lateinit var cfgSnapshotService: ResourceConfigSnapshotService
lateinit var cfgSnapshotComponent: ComponentConfigSnapshotsExecutor
- private var bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
+ private var bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_scripts"
)
@@ -99,7 +99,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_FETCH, resId, resType, ResourceConfigSnapshot.Status.RUNNING.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -138,7 +138,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_FETCH, resId, resType, ResourceConfigSnapshot.Status.CANDIDATE.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -176,7 +176,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_STORE, resId, resType, snapshotConfig)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -211,7 +211,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_FETCH, "asdasd", "PNF", ResourceConfigSnapshot.Status.RUNNING.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -238,7 +238,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties("update", "asdasd", "PNF", ResourceConfigSnapshot.Status.RUNNING.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -247,7 +247,7 @@ class ComponentConfigSnapshotsExecutorTest {
}
// then; we should get error in our output properties
- assertTrue(bluePrintRuntimeService.getBluePrintError().errors.size == 1)
+ assertTrue(bluePrintRuntimeService.getBlueprintError().errors.size == 1)
assertEquals(
ComponentConfigSnapshotsExecutor.OUTPUT_STATUS_ERROR.asJsonPrimitive(),
bluePrintRuntimeService.getNodeTemplateAttributeValue(
@@ -278,7 +278,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_DIFF, resId, resType, "YANG")
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -319,7 +319,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_DIFF, resId, resType, DIFF_JSON)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot diff: provide resource-id and resource-type.",
e.message
@@ -328,7 +328,7 @@ class ComponentConfigSnapshotsExecutorTest {
}
// then; we should get success
- assertTrue(bluePrintRuntimeService.getBluePrintError().errors.size == 0)
+ assertTrue(bluePrintRuntimeService.getBlueprintError().errors.size == 0)
assertEquals(
ComponentConfigSnapshotsExecutor.OUTPUT_STATUS_SUCCESS.asJsonPrimitive(),
bluePrintRuntimeService.getNodeTemplateAttributeValue(
@@ -368,7 +368,7 @@ class ComponentConfigSnapshotsExecutorTest {
prepareRequestProperties(OPERATION_DIFF, resId, resType, DIFF_XML)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot diff: provide resource-id and resource-type.",
e.message
@@ -377,7 +377,7 @@ class ComponentConfigSnapshotsExecutorTest {
}
// then; we should get success
- assertTrue(bluePrintRuntimeService.getBluePrintError().errors.size == 0)
+ assertTrue(bluePrintRuntimeService.getBlueprintError().errors.size == 0)
assertEquals(
ComponentConfigSnapshotsExecutor.OUTPUT_STATUS_SUCCESS.asJsonPrimitive(),
bluePrintRuntimeService.getNodeTemplateAttributeValue(
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt
index 96045ee07..b65191347 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots
-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.config.snapshots"],
entityManagerFactoryRef = "primaryEntityManager",
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt
index d00c47b7f..37e9254ba 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt
@@ -22,7 +22,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.profile.upload
import com.fasterxml.jackson.databind.ObjectMapper
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.slf4j.LoggerFactory
import org.springframework.http.HttpMethod
import java.nio.file.Path
@@ -60,7 +60,7 @@ class K8sPluginApi(
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb definition")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
@@ -75,7 +75,7 @@ class K8sPluginApi(
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb profile")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
@@ -93,7 +93,7 @@ class K8sPluginApi(
}
} catch (e: Exception) {
log.error("Caught exception trying to create k8s rb profile ${profile.profileName}")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
@@ -108,7 +108,7 @@ class K8sPluginApi(
}
} catch (e: Exception) {
log.error("Caught exception trying to upload k8s rb profile ${profile.profileName}")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
}
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
index 23d47dca6..39da9c11b 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
@@ -23,20 +23,20 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.commons.io.FileUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-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.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -51,7 +51,7 @@ import java.nio.file.Paths
@Component("component-k8s-profile-upload")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class K8sProfileUploadComponent(
- private var bluePrintPropertiesService: BluePrintPropertiesService,
+ private var bluePrintPropertiesService: BlueprintPropertiesService,
private val resourceResolutionService: ResourceResolutionService
) :
@@ -145,15 +145,15 @@ open class K8sProfileUploadComponent(
val profileNamespace: String? = prefixInputParamsMap[INPUT_K8S_PROFILE_NAMESPACE]?.returnNullIfMissing()?.asText()
var profileSource: String? = prefixInputParamsMap[INPUT_K8S_PROFILE_SOURCE]?.returnNullIfMissing()?.asText()
if (profileNamespace == null)
- throw BluePrintProcessorException("Profile $profileName namespace is missing")
+ throw BlueprintProcessorException("Profile $profileName namespace is missing")
if (profileSource == null) {
profileSource = profileName
log.info("Profile name used instead of profile source")
}
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifact: ArtifactDefinition = bluePrintContext.nodeTemplateArtifact(nodeTemplateName, profileSource)
- if (artifact.type != BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE)
- throw BluePrintProcessorException(
+ if (artifact.type != BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE)
+ throw BlueprintProcessorException(
"Unexpected profile artifact type for profile source " +
"$profileSource. Expecting: $artifact.type"
)
@@ -178,7 +178,7 @@ open class K8sProfileUploadComponent(
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ bluePrintRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
private fun getTemplatePrefixList(node: JsonNode?): ArrayList<String> {
@@ -238,19 +238,19 @@ open class K8sProfileUploadComponent(
tempProfilePath, manifestFiles
)
} else
- throw BluePrintProcessorException("Manifest file is missing")
+ throw BlueprintProcessorException("Manifest file is missing")
// Preparation of the final profile content
val finalProfileFilePath = Paths.get(
tempMainPath.toString().plus(File.separator).plus(
"$k8sRbProfileName.tar.gz"
)
)
- if (!BluePrintArchiveUtils.compress(
+ if (!BlueprintArchiveUtils.compress(
tempProfilePath, finalProfileFilePath.toFile(),
ArchiveType.TarGz
)
) {
- throw BluePrintProcessorException("Profile compression has failed")
+ throw BlueprintProcessorException("Profile compression has failed")
}
FileUtils.deleteDirectory(tempProfilePath)
@@ -260,7 +260,7 @@ open class K8sProfileUploadComponent(
throw t
}
} else
- throw BluePrintProcessorException("Profile source $ks8ProfileLocation is missing in CBA folder")
+ throw BlueprintProcessorException("Profile source $ks8ProfileLocation is missing in CBA folder")
}
private fun readManifestFiles(profileSource: File, destinationFolder: File): ArrayList<File>? {
@@ -352,7 +352,7 @@ open class K8sProfileUploadComponent(
if (!isFileInTheManifestFiles(finalFile, manifestFiles))
return
val fileContent = templatedFile.bufferedReader().readText()
- val finalFileContent = BluePrintVelocityTemplateService.generateContent(
+ val finalFileContent = BlueprintVelocityTemplateService.generateContent(
fileContent,
params, true
)
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt
index 542be8cab..76e8af910 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt
@@ -17,9 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.profile.upload
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -27,12 +27,12 @@ import org.springframework.context.annotation.Import
@Configuration
@Import(
- BluePrintPropertyConfiguration::class,
- BluePrintPropertiesService::class,
- BluePrintCoreConfiguration::class
+ BlueprintPropertyConfiguration::class,
+ BlueprintPropertiesService::class,
+ BlueprintCoreConfiguration::class
)
@EnableConfigurationProperties
-open class K8sProfileUploadConfiguration(private var bluePrintPropertiesService: BluePrintPropertiesService) {
+open class K8sProfileUploadConfiguration(private var bluePrintPropertiesService: BlueprintPropertiesService) {
@Bean("k8s-plugin-properties")
open fun getProperties(): K8sProfileUploadProperties {
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt
index d8e71d413..77adb0a87 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt
@@ -18,19 +18,19 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
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 MessagePrioritizationStateService and exposed dependency
*/
-fun BluePrintDependencyService.messagePrioritizationStateService(): MessagePrioritizationStateService =
+fun BlueprintDependencyService.messagePrioritizationStateService(): MessagePrioritizationStateService =
instance(MessagePrioritizationStateService::class)
/**
* Expose messagePrioritizationStateService to AbstractComponentFunction
*/
fun AbstractComponentFunction.messagePrioritizationStateService() =
- BluePrintDependencyService.messagePrioritizationStateService()
+ BlueprintDependencyService.messagePrioritizationStateService()
/**
* MessagePrioritization correlation extensions
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt
index d4f8470c8..341a2aa8d 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt
@@ -17,10 +17,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka
import org.apache.kafka.streams.processor.ProcessorContext
-import org.onap.ccsdk.cds.blueprintsprocessor.message.kafka.AbstractBluePrintMessageProcessor
+import org.onap.ccsdk.cds.blueprintsprocessor.message.kafka.AbstractBlueprintMessageProcessor
/** CDS Message Prioritization Kafka Stream Processor abstract class to implement */
-abstract class AbstractMessagePrioritizeProcessor<K, V> : AbstractBluePrintMessageProcessor<K, V>() {
+abstract class AbstractMessagePrioritizeProcessor<K, V> : AbstractBlueprintMessageProcessor<K, V>() {
override fun init(processorContext: ProcessorContext) {
this.processorContext = processorContext
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt
index 1b0612492..6c1f7478c 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt
@@ -23,7 +23,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.M
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.MessagePrioritizationStateService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.MessageState
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -37,7 +37,7 @@ open class DefaultMessagePrioritizeProcessor(
override suspend fun processNB(key: ByteArray, value: ByteArray) {
val messagePrioritize = JacksonUtils.readValue(String(value), MessagePrioritization::class.java)
- ?: throw BluePrintProcessorException("failed to convert")
+ ?: throw BlueprintProcessorException("failed to convert")
try {
kafkaMessagePrioritizationService.prioritize(messagePrioritize)
} catch (e: Exception) {
@@ -62,7 +62,7 @@ open class DefaultMessagePrioritizeProcessor(
if (kafkaMessagePrioritizationService is AbstractKafkaMessagePrioritizationService) {
kafkaMessagePrioritizationService.setKafkaProcessorContext(processorContext)
} else {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"messagePrioritizationService is not instance of " +
"AbstractKafkaMessagePrioritizationService, it is ${kafkaMessagePrioritizationService.javaClass}"
)
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt
index 4ab399f54..ecdcbff08 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt
@@ -24,15 +24,15 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.P
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.utils.MessageProcessorUtils.bluePrintProcessorSupplier
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaStreamsBasicAuthConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageConsumerService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.KafkaStreamConsumerFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
open class KafkaMessagePrioritizationConsumer(
- private val bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService,
+ private val bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService,
private val kafkaMessagePrioritizationService: MessagePrioritizationService
) {
@@ -50,7 +50,7 @@ open class KafkaMessagePrioritizationConsumer(
return object : KafkaStreamConsumerFunction {
val kafkaConsumerConfiguration = prioritizationConfiguration.kafkaConfiguration
- ?: throw BluePrintProcessorException("failed to get kafka consumer configuration")
+ ?: throw BlueprintProcessorException("failed to get kafka consumer configuration")
override suspend fun createTopology(
messageConsumerProperties: MessageConsumerProperties,
@@ -91,7 +91,7 @@ open class KafkaMessagePrioritizationConsumer(
suspend fun startConsuming(prioritizationConfiguration: PrioritizationConfiguration) {
val kafkaConsumerConfiguration = prioritizationConfiguration.kafkaConfiguration
- ?: throw BluePrintProcessorException("failed to get kafka consumer configuration")
+ ?: throw BlueprintProcessorException("failed to get kafka consumer configuration")
streamingConsumerService = consumerService(kafkaConsumerConfiguration.inputTopicSelector)
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt
index 5595863d4..4b1a3f375 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt
@@ -20,7 +20,7 @@ import org.apache.kafka.common.serialization.Deserializer
import org.apache.kafka.common.serialization.Serde
import org.apache.kafka.common.serialization.Serializer
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
-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.utils.JacksonUtils
import java.nio.charset.Charset
@@ -37,7 +37,7 @@ open class MessagePrioritizationSerde : Serde<MessagePrioritization> {
return object : Deserializer<MessagePrioritization> {
override fun deserialize(topic: String, data: ByteArray): MessagePrioritization {
return JacksonUtils.readValue(String(data), MessagePrioritization::class.java)
- ?: throw BluePrintProcessorException("failed to convert")
+ ?: throw BlueprintProcessorException("failed to convert")
}
override fun configure(configs: MutableMap<String, *>?, isKey: Boolean) {
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt
index 502a7822d..babddbde4 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt
@@ -22,7 +22,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.d
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.ids
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.service.AbstractMessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.utils.MessageProcessorUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.NatsClusterUtils
import org.onap.ccsdk.cds.controllerblueprints.core.asByteArray
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
@@ -34,7 +34,7 @@ abstract class AbstractNatsMessagePrioritizationService(
private val log = logger(AbstractNatsMessagePrioritizationService::class)
- lateinit var bluePrintNatsService: BluePrintNatsService
+ lateinit var bluePrintNatsService: BlueprintNatsService
override suspend fun output(messages: List<MessagePrioritization>) {
log.info("$$$$$ received in output processor id(${messages.ids()})")
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt
index a0b2cf462..0976127d1 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt
@@ -22,29 +22,29 @@ import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.MessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.nats.asJsonType
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.NatsClusterUtils
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.SubscriptionOptionsUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
open class NatsMessagePrioritizationConsumer(
- private val bluePrintNatsLibPropertyService: BluePrintNatsLibPropertyService,
+ private val bluePrintNatsLibPropertyService: BlueprintNatsLibPropertyService,
private val natsMessagePrioritizationService: MessagePrioritizationService
) {
private val log = logger(NatsMessagePrioritizationConsumer::class)
- lateinit var bluePrintNatsService: BluePrintNatsService
+ lateinit var bluePrintNatsService: BlueprintNatsService
private lateinit var subscription: Subscription
suspend fun startConsuming() {
val prioritizationConfiguration = natsMessagePrioritizationService.getConfiguration()
val natsConfiguration = prioritizationConfiguration.natsConfiguration
- ?: throw BluePrintProcessorException("couldn't get NATS consumer configuration")
+ ?: throw BlueprintProcessorException("couldn't get NATS consumer configuration")
check((natsMessagePrioritizationService is AbstractNatsMessagePrioritizationService)) {
"messagePrioritizationService is not of type AbstractNatsMessagePrioritizationService."
@@ -73,7 +73,7 @@ open class NatsMessagePrioritizationConsumer(
log.info("Nats prioritization consumer listener shutdown complete")
}
- private fun consumerService(selector: String): BluePrintNatsService {
+ private fun consumerService(selector: String): BlueprintNatsService {
return bluePrintNatsLibPropertyService.bluePrintNatsService(selector)
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt
index ed16fd44f..b66a2bd92 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt
@@ -21,7 +21,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.M
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.PrioritizationMessageRepository
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toFormatedCorrelation
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.addDate
import org.onap.ccsdk.cds.controllerblueprints.core.utils.controllerDate
@@ -48,7 +48,7 @@ open class MessagePrioritizationStateServiceImpl(
override suspend fun getMessage(id: String): MessagePrioritization {
return prioritizationMessageRepository.findById(id).orElseGet(null)
- ?: throw BluePrintProcessorException("couldn't find message for id($id)")
+ ?: throw BlueprintProcessorException("couldn't find message for id($id)")
}
override suspend fun getMessages(ids: List<String>): List<MessagePrioritization>? {
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt
index 7ab0be098..f42be52af 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt
@@ -20,7 +20,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.C
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toFormatedCorrelation
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toTypeNCorrelation
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
object MessageCorrelationUtils {
@@ -50,7 +50,7 @@ object MessageCorrelationUtils {
val unknownMessageTypes = collectedMessages.filter { !types.contains(it.type) }.map { it.id }
if (!unknownMessageTypes.isNullOrEmpty()) {
- throw BluePrintProcessorException("Messages($unknownMessageTypes) is not in type of($types)")
+ throw BlueprintProcessorException("Messages($unknownMessageTypes) is not in type of($types)")
}
val copyTypes = types.toTypedArray().copyOf().toMutableList()
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt
index 86cec3697..3eba4ed86 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt
@@ -22,14 +22,14 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka.AbstractMessagePrioritizeProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toFormatedCorrelation
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
object MessageProcessorUtils {
/** Utility to create the cluster lock for message [messagePrioritization] prioritization procssing.*/
suspend fun prioritizationGrouplock(messagePrioritization: MessagePrioritization): ClusterLock? {
- val clusterService = BluePrintDependencyService.optionalClusterService()
+ val clusterService = BlueprintDependencyService.optionalClusterService()
return if (clusterService != null && clusterService.clusterJoined() &&
!messagePrioritization.correlationId.isNullOrBlank()
@@ -39,31 +39,31 @@ object MessageProcessorUtils {
val lockName = "prioritize::${messagePrioritization.group}::$correlationId"
val clusterLock = clusterService.clusterLock(lockName)
clusterLock.lock()
- if (!clusterLock.isLocked()) throw BluePrintProcessorException("failed to lock($lockName)")
+ if (!clusterLock.isLocked()) throw BlueprintProcessorException("failed to lock($lockName)")
clusterLock
} else null
}
/** Utility to create the cluster lock for expiry scheduler*/
suspend fun prioritizationExpiryLock(): ClusterLock? {
- val clusterService = BluePrintDependencyService.optionalClusterService()
+ val clusterService = BlueprintDependencyService.optionalClusterService()
return if (clusterService != null && clusterService.clusterJoined()) {
val lockName = "prioritize-expiry"
val clusterLock = clusterService.clusterLock(lockName)
clusterLock.lock()
- if (!clusterLock.isLocked()) throw BluePrintProcessorException("failed to lock($lockName)")
+ if (!clusterLock.isLocked()) throw BlueprintProcessorException("failed to lock($lockName)")
clusterLock
} else null
}
/** Utility to create the cluster lock for expiry scheduler*/
suspend fun prioritizationCleanLock(): ClusterLock? {
- val clusterService = BluePrintDependencyService.optionalClusterService()
+ val clusterService = BlueprintDependencyService.optionalClusterService()
return if (clusterService != null && clusterService.clusterJoined()) {
val lockName = "prioritize-clean"
val clusterLock = clusterService.clusterLock(lockName)
clusterLock.lock()
- if (!clusterLock.isLocked()) throw BluePrintProcessorException("failed to lock($lockName)")
+ if (!clusterLock.isLocked()) throw BlueprintProcessorException("failed to lock($lockName)")
clusterLock
} else null
}
@@ -80,7 +80,7 @@ object MessageProcessorUtils {
fun <K, V> bluePrintProcessorSupplier(name: String): ProcessorSupplier<K, V> {
return ProcessorSupplier<K, V> {
// Dynamically resolve the Prioritization Processor
- BluePrintDependencyService.instance<AbstractMessagePrioritizeProcessor<K, V>>(name)
+ BlueprintDependencyService.instance<AbstractMessagePrioritizeProcessor<K, V>>(name)
}
}
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
index 286a9b5c1..5f51394ca 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
@@ -25,8 +25,8 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Before
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.message.prioritization.db.PrioritizationMessageRepository
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka.DefaultMessagePrioritizeProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka.KafkaMessagePrioritizationConsumer
@@ -36,17 +36,17 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.s
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.service.SampleMessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.service.SampleNatsMessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.utils.MessagePrioritizationSample
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.KafkaMessageProducerService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.BluePrintNatsLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.BlueprintNatsLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.NatsClusterUtils
import org.onap.ccsdk.cds.controllerblueprints.core.asByteArray
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
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.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
import org.springframework.context.ApplicationContext
@@ -62,8 +62,8 @@ import kotlin.test.assertNotNull
@DirtiesContext
@ContextConfiguration(
classes = [
- BluePrintMessageLibConfiguration::class, BluePrintNatsLibConfiguration::class,
- BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class,
+ BlueprintMessageLibConfiguration::class, BlueprintNatsLibConfiguration::class,
+ BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class,
MessagePrioritizationConfiguration::class, TestDatabaseConfiguration::class
]
)
@@ -112,25 +112,25 @@ open class MessagePrioritizationConsumerTest {
lateinit var prioritizationMessageRepository: PrioritizationMessageRepository
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
@Autowired
- lateinit var bluePrintNatsLibPropertyService: BluePrintNatsLibPropertyService
+ lateinit var bluePrintNatsLibPropertyService: BlueprintNatsLibPropertyService
@Autowired
lateinit var messagePrioritizationStateService: MessagePrioritizationStateService
@Before
fun setup() {
- BluePrintDependencyService.inject(applicationContext)
+ BlueprintDependencyService.inject(applicationContext)
}
@Test
- fun testBluePrintKafkaJDBCKeyStore() {
+ fun testBlueprintKafkaJDBCKeyStore() {
runBlocking {
assertNotNull(prioritizationMessageRepository, "failed to get prioritizationMessageRepository")
- val messagePrioritizationService: MessagePrioritizationStateService = BluePrintDependencyService
+ val messagePrioritizationService: MessagePrioritizationStateService = BlueprintDependencyService
.instance(MessagePrioritizationStateService::class)
assertNotNull(messagePrioritizationService, "failed to get messagePrioritizationService")
@@ -242,7 +242,7 @@ open class MessagePrioritizationConsumerTest {
)
// Register the processor
- BluePrintDependencyService.registerSingleton(
+ BlueprintDependencyService.registerSingleton(
MessagePrioritizationConstants.PROCESSOR_PRIORITIZE,
defaultMessagePrioritizeProcessor
)
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutor.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutor.kt
index 49b9207db..de6eb6b40 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutor.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutor.kt
@@ -69,7 +69,7 @@ open class ComponentNetconfExecutor(private var componentFunctionScriptingServic
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError()
+ bluePrintRuntimeService.getBlueprintError()
.addError("Failed in ComponentNetconfExecutor : ${runtimeException.message}")
}
}
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt
index b964388cb..6e667c28b 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt
@@ -22,13 +22,13 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.Dev
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
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
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
/**
* Register the Netconf module exposed dependency
*/
-fun BluePrintDependencyService.netconfClientService(): ResourceResolutionService =
+fun BlueprintDependencyService.netconfClientService(): ResourceResolutionService =
instance(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
fun AbstractComponentFunction.netconfDevice(requirementName: String): NetconfDevice {
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
index f3df55b4b..cdfd93c82 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
@@ -31,10 +31,10 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-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.springframework.context.ApplicationContext
@@ -66,7 +66,7 @@ class ComponentNetconfExecutorTest {
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -92,9 +92,9 @@ class ComponentNetconfExecutorTest {
// TODO("Set Attribute properties")
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-netconf")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentNetconfExecutor")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-netconf")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentNetconfExecutor")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
// Set Step Inputs in Blueprint Runtime Service
componentNetconfExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
index bd7227744..7911559ae 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
@@ -24,8 +24,8 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInpu
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.BlueprintJythonServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorConstants
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-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.data.OperationAssignment
import org.slf4j.LoggerFactory
@@ -56,7 +56,7 @@ open class ComponentJythonExecutor(
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError()
+ bluePrintRuntimeService.getBlueprintError()
.addError("Failed in ComponentJythonExecutor : ${runtimeException.message}")
}
@@ -67,12 +67,12 @@ open class ComponentJythonExecutor(
.nodeTemplateInterfaceOperation(nodeTemplateName, interfaceName, operationName)
val artifactName: String = operationAssignment.implementation?.primary
- ?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
+ ?: throw BlueprintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
val artifactDefinition = bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
val pythonFileName = artifactDefinition.file
- ?: throw BluePrintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
+ ?: throw BlueprintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
val pythonClassName = FilenameUtils.getBaseName(pythonFileName)
@@ -81,7 +81,7 @@ open class ComponentJythonExecutor(
checkNotEmpty(content) { "artifact ($artifactName) content is empty" }
val instanceDependenciesNode: ArrayNode = operationInputs[PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES] as? ArrayNode
- ?: throw BluePrintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
+ ?: throw BlueprintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
val jythonInstance: MutableMap<String, Any> = hashMapOf()
jythonInstance["log"] = LoggerFactory.getLogger(pythonClassName)
@@ -100,6 +100,6 @@ open class ComponentJythonExecutor(
componentFunction.operationName = operationName
componentFunction.processId = processId
componentFunction.workflowName = workflowName
- componentFunction.scriptType = BluePrintConstants.SCRIPT_JYTHON
+ componentFunction.scriptType = BlueprintConstants.SCRIPT_JYTHON
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
index ce51bd9ee..c20e63667 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
@@ -22,7 +22,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.async
import kotlinx.coroutines.withTimeout
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.PrepareRemoteEnvInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteIdentifier
@@ -31,7 +31,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StatusType
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceConstant
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.RemoteScriptExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.checkFileExists
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotBlank
@@ -51,7 +51,7 @@ import org.springframework.stereotype.Component
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class ComponentRemotePythonExecutor(
private val remoteScriptExecutionService: RemoteScriptExecutionService,
- private var bluePrintPropertiesService: BluePrintPropertiesService
+ private var bluePrintPropertiesService: BlueprintPropertiesService
) : AbstractComponentFunction() {
private val log = LoggerFactory.getLogger(ComponentRemotePythonExecutor::class.java)!!
@@ -94,7 +94,7 @@ open class ComponentRemotePythonExecutor(
.nodeTemplateInterfaceOperation(nodeTemplateName, interfaceName, operationName)
val artifactName: String = operationAssignment.implementation?.primary
- ?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
+ ?: throw BlueprintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
val artifactDefinition =
bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
@@ -197,7 +197,7 @@ open class ComponentRemotePythonExecutor(
log.error(catchallErrMsg, e)
}
// if Env preparation was successful, then proceed with command execution in this Env
- if (bluePrintRuntimeService.getBluePrintError().errors.isEmpty()) {
+ if (bluePrintRuntimeService.getBlueprintError().errors.isEmpty()) {
try {
// Populate command execution properties and pass it to the remote server
val properties = dynamicProperties?.returnNullIfMissing()?.rootFieldsToMap() ?: hashMapOf()
@@ -260,7 +260,7 @@ open class ComponentRemotePythonExecutor(
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError()
+ bluePrintRuntimeService.getBlueprintError()
.addError("Failed in ComponentRemotePythonExecutor : ${runtimeException.message}")
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt
index 3df25c402..6788310aa 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt
@@ -18,8 +18,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -32,53 +32,53 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.nodeType
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
/** Component Extensions **/
-fun BluePrintTypes.nodeTypeComponentRemotePythonExecutor(): NodeType {
+fun BlueprintTypes.nodeTypeComponentRemotePythonExecutor(): NodeType {
return nodeType(
- id = "component-remote-python-executor", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-remote-python-executor", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "This is Remote Python Execution Component."
) {
attribute(
- ComponentRemotePythonExecutor.ATTRIBUTE_PREPARE_ENV_LOG, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemotePythonExecutor.ATTRIBUTE_PREPARE_ENV_LOG, BlueprintConstants.DATA_TYPE_STRING,
false
)
attribute(
- ComponentRemotePythonExecutor.ATTRIBUTE_EXEC_CMD_LOG, BluePrintConstants.DATA_TYPE_LIST,
+ ComponentRemotePythonExecutor.ATTRIBUTE_EXEC_CMD_LOG, BlueprintConstants.DATA_TYPE_LIST,
false
) {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
attribute(
- ComponentRemotePythonExecutor.ATTRIBUTE_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentRemotePythonExecutor.ATTRIBUTE_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON,
false
)
operation("ComponentRemotePythonExecutor", "ComponentRemotePythonExecutor Operation") {
inputs {
property(
- ComponentRemotePythonExecutor.INPUT_ENDPOINT_SELECTOR, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemotePythonExecutor.INPUT_ENDPOINT_SELECTOR, BlueprintConstants.DATA_TYPE_STRING,
false, "Remote Container or Server selector name."
) {
defaultValue(ComponentRemotePythonExecutor.DEFAULT_SELECTOR)
}
property(
- ComponentRemotePythonExecutor.INPUT_DYNAMIC_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentRemotePythonExecutor.INPUT_DYNAMIC_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
property(
- ComponentRemotePythonExecutor.INPUT_ARGUMENT_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
+ ComponentRemotePythonExecutor.INPUT_ARGUMENT_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
false, "Argument Json Content or DSL Json reference."
)
property(
- ComponentRemotePythonExecutor.INPUT_COMMAND, BluePrintConstants.DATA_TYPE_STRING,
+ ComponentRemotePythonExecutor.INPUT_COMMAND, BlueprintConstants.DATA_TYPE_STRING,
true, "Command to execute."
)
property(
- ComponentRemotePythonExecutor.INPUT_PACKAGES, BluePrintConstants.DATA_TYPE_LIST,
+ ComponentRemotePythonExecutor.INPUT_PACKAGES, BlueprintConstants.DATA_TYPE_LIST,
false, "Packages to install based on type."
) {
entrySchema("dt-system-packages")
@@ -88,26 +88,26 @@ fun BluePrintTypes.nodeTypeComponentRemotePythonExecutor(): NodeType {
}
}
-fun BluePrintTypes.dataTypeDtSystemPackages(): DataType {
+fun BlueprintTypes.dataTypeDtSystemPackages(): DataType {
return dataType(
- id = "dt-system-packages", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT,
+ id = "dt-system-packages", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT,
description = "This represent System Package Data Type"
) {
- property("type", BluePrintConstants.DATA_TYPE_LIST, true, "") {
+ property("type", BlueprintConstants.DATA_TYPE_LIST, true, "") {
constrain {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
validValues(arrayListOf("ansible_galaxy".asJsonPrimitive(), "pip".asJsonPrimitive()))
}
}
- property("package", BluePrintConstants.DATA_TYPE_LIST, true, "") {
- entrySchema(BluePrintConstants.DATA_TYPE_STRING)
+ property("package", BlueprintConstants.DATA_TYPE_LIST, true, "") {
+ entrySchema(BlueprintConstants.DATA_TYPE_STRING)
}
}
}
/** Component Builder */
-fun BluePrintTypes.nodeTemplateComponentRemotePythonExecutor(
+fun BlueprintTypes.nodeTemplateComponentRemotePythonExecutor(
id: String,
description: String,
block: ComponentRemotePythonExecutorNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt
index 891b09d88..0ac542bd0 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt
@@ -18,15 +18,15 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
open class JythonComponentFunction : AbstractScriptComponentFunction() {
override suspend fun processNB(executionRequest: ExecutionServiceInput) {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt
index b0ce73588..9faacd9de 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt
@@ -20,11 +20,11 @@ import com.fasterxml.jackson.databind.node.ArrayNode
import org.apache.commons.io.FilenameUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-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.data.OperationAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -42,7 +42,7 @@ class BlueprintJythonServiceImpl(
val log: Logger = LoggerFactory.getLogger(BlueprintJythonService::class.java)
inline fun <reified T> jythonInstance(
- blueprintContext: BluePrintContext,
+ blueprintContext: BlueprintContext,
pythonClassName: String,
content: String,
dependencyInstanceNames: MutableMap<String, Any>?
@@ -54,7 +54,7 @@ class BlueprintJythonServiceImpl(
pythonPath.addAll(pythonExecutorProperty.modulePaths)
val blueprintPythonConfigurations =
- BluePrintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf())
+ BlueprintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf())
val blueprintPythonHost = BlueprintPythonHost(blueprintPythonConfigurations)
val pyObject = blueprintPythonHost.getPythonComponent(content, pythonClassName, dependencyInstanceNames)
@@ -64,7 +64,7 @@ class BlueprintJythonServiceImpl(
return pyObject.__tojava__(T::class.java) as T
}
- override fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
+ override fun jythonComponentInstance(bluePrintContext: BlueprintContext, scriptClassReference: String):
BlueprintFunctionNode<*, *> {
val pythonFileName = bluePrintContext.rootPath
@@ -101,13 +101,13 @@ class BlueprintJythonServiceImpl(
val blueprintBasePath: String = bluePrintContext.rootPath
val artifactName: String = operationAssignment.implementation?.primary
- ?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
+ ?: throw BlueprintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
val artifactDefinition =
bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
val pythonFileName = artifactDefinition.file
- ?: throw BluePrintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
+ ?: throw BlueprintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
val pythonClassName = FilenameUtils.getBaseName(pythonFileName)
log.info("Getting Jython Script Class($pythonClassName)")
@@ -125,7 +125,7 @@ class BlueprintJythonServiceImpl(
val instanceDependenciesNode: ArrayNode =
operationInputs[PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES] as? ArrayNode
- ?: throw BluePrintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
+ ?: throw BlueprintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
instanceDependenciesNode.forEach { instanceName ->
jythonInstances[instanceName.textValue()] = applicationContext.getBean(instanceName.textValue())
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt
index f8f0e7e32..0fe68cf6a 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt
@@ -16,13 +16,13 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts
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.python.core.PyObject
import org.python.util.PythonInterpreter
@Deprecated("CDS won't support JythonService")
-open class BlueprintPythonHost(private val bluePrintPython: BluePrintPython) {
+open class BlueprintPythonHost(private val bluePrintPython: BlueprintPython) {
private val blueprintPythonInterpreterProxy: BlueprintPythonInterpreterProxy
@@ -45,14 +45,14 @@ open class BlueprintPythonHost(private val bluePrintPython: BluePrintPython) {
bluePrintPython.moduleName = "Blueprint Python Script [Class Name = $interfaceName]"
try {
return blueprintPythonInterpreterProxy.getPythonInstance(properties)
- } catch (e: BluePrintProcessorException) {
+ } catch (e: BlueprintProcessorException) {
val errorMsg = "Failed to get python instance."
throw e.updateErrorMessage(
ExecutionServiceDomains.PYTHON_EXECUTOR, errorMsg,
"Error in environment properties"
)
} catch (e: Exception) {
- throw BluePrintProcessorException("Failed to execute Jython component $e", e)
+ throw BlueprintProcessorException("Failed to execute Jython component $e", e)
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt
index 0fb33f9c2..9d98d90c7 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt
@@ -15,13 +15,13 @@
*/
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.python.core.PyObject
import org.python.core.PySyntaxError
import org.python.util.PythonInterpreter
@Deprecated("CDS won't support JythonService")
-open class BlueprintPythonInterpreterProxy(private val bluePrintPython: BluePrintPython) : PythonInterpreter() {
+open class BlueprintPythonInterpreterProxy(private val bluePrintPython: BlueprintPython) : PythonInterpreter() {
fun getPythonInstance(properties: MutableMap<String, Any>?): PyObject {
properties?.forEach { (name, value) ->
@@ -34,7 +34,7 @@ open class BlueprintPythonInterpreterProxy(private val bluePrintPython: BluePrin
try {
this.exec(bluePrintPython.content)
} catch (e: PySyntaxError) {
- throw BluePrintProcessorException("Error executing Jython code! Python error: '$e'", e)
+ throw BlueprintProcessorException("Error executing Jython code! Python error: '$e'", e)
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt
index 593c0552b..3484fdbeb 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt
@@ -52,7 +52,7 @@ class PythonExecutorConstants {
}
@Deprecated("CDS won't support JythonService")
-open class BluePrintPython(
+open class BlueprintPython(
executablePath: String,
blueprintPythonPlatform: MutableList<String>,
val argv: MutableList<String>
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
index d5fa0b20c..089a33931 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
@@ -26,9 +26,9 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.mock.MockInstanceConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-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.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -63,15 +63,15 @@ class ComponentJythonExecutorTest {
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentJythonExecutor")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentJythonExecutor")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
componentJythonExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
name = "activate-jython"
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
index 46a3120d5..0318664a0 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
@@ -17,21 +17,21 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
import kotlin.test.assertNotNull
class ComponentRemotePythonExecutorDSLTest {
@Test
fun testNodeTypeComponentRemotePythonExecutor() {
- val nodeType = BluePrintTypes.nodeTypeComponentRemotePythonExecutor()
+ val nodeType = BlueprintTypes.nodeTypeComponentRemotePythonExecutor()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeComponentRemotePythonExecutor")
}
@Test
fun testNodeTemplateComponentRemotePythonExecutor() {
- val nodeTemplate = BluePrintTypes.nodeTemplateComponentRemotePythonExecutor(
+ val nodeTemplate = BlueprintTypes.nodeTemplateComponentRemotePythonExecutor(
"test-nodetemplate",
"test nodetemplate"
) {
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
index 0a0d1659e..cad1f8df2 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
@@ -22,7 +22,7 @@ import io.mockk.every
import io.mockk.mockk
import kotlinx.coroutines.runBlocking
import org.junit.Test
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.PrepareRemoteEnvInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutionInput
@@ -30,13 +30,13 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutio
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StatusType
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.RemoteScriptExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@@ -50,7 +50,7 @@ class ComponentRemotePythonExecutorTest {
val componentRemotePythonExecutor = ComponentRemotePythonExecutor(
remoteScriptExecutionService,
- mockk<BluePrintPropertiesService>()
+ mockk<BlueprintPropertiesService>()
)
val executionServiceInput =
@@ -59,7 +59,7 @@ class ComponentRemotePythonExecutorTest {
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_scripts"
)
@@ -71,9 +71,9 @@ class ComponentRemotePythonExecutorTest {
)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-python")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemotePythonExecutor")
- stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-python")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemotePythonExecutor")
+ stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
componentRemotePythonExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
name = "execute-remote-python"
@@ -94,11 +94,11 @@ class ComponentRemotePythonExecutorTest {
val remoteScriptExecutionService = MockRemoteScriptExecutionService()
val componentRemotePythonExecutor = ComponentRemotePythonExecutor(
remoteScriptExecutionService,
- mockk<BluePrintPropertiesService>()
+ mockk<BlueprintPropertiesService>()
)
- val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("123456-1000")
+ val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("123456-1000")
- every { bluePrintRuntime.getBluePrintError() } answers { BluePrintError() } // successful case.
+ every { bluePrintRuntime.getBlueprintError() } answers { BlueprintError() } // successful case.
every { bluePrintRuntime.setNodeTemplateAttributeValue(any(), any(), any()) } answers {}
val input = getMockedOutput(bluePrintRuntime)
@@ -110,20 +110,20 @@ class ComponentRemotePythonExecutorTest {
/**
* Mocked input information for remote python executor.
*/
- fun getMockedOutput(svc: DefaultBluePrintRuntimeService):
+ fun getMockedOutput(svc: DefaultBlueprintRuntimeService):
ExecutionServiceInput {
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
stepMetaData.putJsonElement(
- BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
+ BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
"execute-remote-python"
)
stepMetaData.putJsonElement(
- BluePrintConstants.PROPERTY_CURRENT_INTERFACE,
+ BlueprintConstants.PROPERTY_CURRENT_INTERFACE,
"ComponentRemotePythonExecutor"
)
stepMetaData.putJsonElement(
- BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process"
+ BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process"
)
val mapper = ObjectMapper()
@@ -133,15 +133,15 @@ class ComponentRemotePythonExecutorTest {
val operationalInputs: MutableMap<String, JsonNode> = hashMapOf()
operationalInputs.putJsonElement(
- BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
+ BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
"execute-remote-python"
)
operationalInputs.putJsonElement(
- BluePrintConstants.PROPERTY_CURRENT_INTERFACE,
+ BlueprintConstants.PROPERTY_CURRENT_INTERFACE,
"ComponentRemotePythonExecutor"
)
operationalInputs.putJsonElement(
- BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process"
+ BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process"
)
operationalInputs.putJsonElement("endpoint-selector", "aai")
operationalInputs.putJsonElement("dynamic-properties", rootNode)
@@ -174,7 +174,7 @@ class ComponentRemotePythonExecutorTest {
"ComponentRemotePythonExecutor", "process"
)
} returns operationOutputs
- val bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
+ val bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-" +
"catalog/blueprint-model/test-blueprint/" +
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
index 94ec1413f..ad87f3c19 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
@@ -23,7 +23,7 @@ import io.mockk.mockk
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -39,13 +39,13 @@ import kotlin.test.assertNotNull
"blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_blueprints"])
class BlueprintJythonServiceTest {
- lateinit var blueprintContext: BluePrintContext
+ lateinit var blueprintContext: BlueprintContext
@Autowired
private lateinit var blueprintJythonService: BlueprintJythonServiceImpl
@BeforeTest
fun init() {
- blueprintContext = mockk<BluePrintContext>()
+ blueprintContext = mockk<BlueprintContext>()
every { blueprintContext.rootPath } returns normalizedPathName("target")
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
index 0efaaa113..2ebd10c38 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
@@ -26,7 +26,7 @@ import kotlin.test.BeforeTest
import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [BluePrintPython::class, PythonExecutorProperty::class, String::class])
+@ContextConfiguration(classes = [BlueprintPython::class, PythonExecutorProperty::class, String::class])
@TestPropertySource(
properties =
[
@@ -48,7 +48,7 @@ class BlueprintPythonHostTest {
pythonPath.add(blueprintBasePath)
pythonPath.addAll(pythonExecutorProperty.modulePaths)
- blueprintPythonHost = BlueprintPythonHost(BluePrintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf()))
+ blueprintPythonHost = BlueprintPythonHost(BlueprintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf()))
}
@Test
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"
)
}
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt
index 2d3eb3bab..61ab4c11c 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt
+++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt
@@ -21,9 +21,9 @@ import org.hibernate.annotations.common.util.impl.LoggerFactory
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
/**
* Register the Restconf module exposed dependency
@@ -32,7 +32,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyS
val log = LoggerFactory.logger(AbstractScriptComponentFunction::class.java)!!
fun AbstractScriptComponentFunction.restconfClientService(selector: String): BlueprintWebClientService {
- return BluePrintDependencyService.restClientService(selector)
+ return BlueprintDependencyService.restClientService(selector)
}
/**
@@ -60,7 +60,7 @@ suspend fun AbstractScriptComponentFunction.restconfMountDevice(
log.info("NF was mounted successfully on ODL")
result.body
} else {
- throw BluePrintRetryException("Wait for device($deviceId) to mount")
+ throw BlueprintRetryException("Wait for device($deviceId) to mount")
}
}
@@ -126,7 +126,7 @@ suspend fun AbstractScriptComponentFunction.genericPutPatchPostRequest(
"PUT" -> log.info("sending PUT request, url: $requestUrl")
"PATCH" -> log.info("sending PATCH request, url: $requestUrl")
"POST" -> log.info("sending POST request, url: $requestUrl")
- else -> throw BluePrintProcessorException("Illegal request type, only POST, PUT or PATCH allowed.")
+ else -> throw BlueprintProcessorException("Illegal request type, only POST, PUT or PATCH allowed.")
}
return webClientService.exchangeResource(requestType, requestUrl, payload as String, headers)
}
@@ -143,7 +143,7 @@ suspend fun AbstractScriptComponentFunction.genericGetOrDeleteRequest(
when (requestType.toUpperCase()) {
"GET" -> log.info("sending GET request, url: $requestUrl")
"DELETE" -> log.info("sending DELETE request, url: $requestUrl")
- else -> throw BluePrintProcessorException("Illegal request type, only GET and DELETE allowed.")
+ else -> throw BlueprintProcessorException("Illegal request type, only GET and DELETE allowed.")
}
return webClientService.exchangeResource(requestType, requestUrl, "")
}
@@ -173,7 +173,7 @@ suspend fun AbstractScriptComponentFunction.restconfMountDevice(
log.info("NF was mounted successfully on ODL")
result.body
} else {
- throw BluePrintRetryException("Wait for device with url($mountUrl) to mount")
+ throw BlueprintRetryException("Wait for device with url($mountUrl) to mount")
}
}
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
index 47cf34fad..653b4c56a 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
@@ -28,11 +28,11 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInpu
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.service.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.core.utils.JacksonUtils
import org.springframework.context.ApplicationContext
import kotlin.test.assertNotNull
@@ -59,25 +59,25 @@ class ComponentRestconfExecutorTest {
payload = JacksonUtils.jsonNode("{}") as ObjectNode
}
- val blueprintContext = mockk<BluePrintContext>()
+ val blueprintContext = mockk<BlueprintContext>()
every {
blueprintContext.nodeTemplateOperationImplementation(
any(), any(), any()
)
} returns Implementation()
- val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
componentScriptExecutor.bluePrintRuntimeService = bluePrintRuntime
componentScriptExecutor.stepName = "sample-step"
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-restconf".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-restconf".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_TYPE] =
- BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
+ BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE] =
"internal.scripts.TestRestconfConfigure".asJsonPrimitive()
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/ComponentRestfulExecutor.kt b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/ComponentRestfulExecutor.kt
index a8e02f391..59c010eb5 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/ComponentRestfulExecutor.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/ComponentRestfulExecutor.kt
@@ -66,7 +66,7 @@ open class ComponentRestfulExecutor(private var componentFunctionScriptingServic
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError()
+ bluePrintRuntimeService.getBlueprintError()
.addError("Failed in ComponentRestfulExecutor : ${runtimeException.message}")
}
}
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
index 9cd6f57a4..122fe5543 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
@@ -22,10 +22,10 @@ import com.fasterxml.jackson.databind.node.ObjectNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.nrmfunction.RestfulNRMServiceClient
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
-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.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
@@ -33,14 +33,14 @@ abstract class RestfulCMComponentFunction : AbstractScriptComponentFunction() {
private val log = LoggerFactory.getLogger(RestfulCMComponentFunction::class.java)
override suspend fun processNB(executionRequest: ExecutionServiceInput) {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- throw BluePrintException("Not Implemented required")
+ throw BlueprintException("Not Implemented required")
}
- open fun bluePrintRestLibPropertyService(): BluePrintRestLibPropertyService =
+ open fun bluePrintRestLibPropertyService(): BlueprintRestLibPropertyService =
functionDependencyInstanceAsType(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
fun restClientService(clientInfo: JsonNode): BlueprintWebClientService {
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt
index ad70ac021..989170213 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt
@@ -27,11 +27,11 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.service.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.core.utils.JacksonUtils
import org.springframework.context.ApplicationContext
@@ -58,24 +58,24 @@ class ComponentRestfulExecutorTest {
payload = JacksonUtils.jsonNode("{}") as ObjectNode
}
- val blueprintContext = mockk<BluePrintContext>()
+ val blueprintContext = mockk<BlueprintContext>()
every {
blueprintContext.nodeTemplateOperationImplementation(
any(), any(), any()
)
} returns Implementation()
- val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
componentRestfulExecutor.bluePrintRuntimeService = bluePrintRuntime
componentRestfulExecutor.stepName = "sample-step"
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "config-deploy-process".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
- operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
- operationInputs["script-type"] = BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "config-deploy-process".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
+ operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
+ operationInputs["script-type"] = BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
operationInputs["script-class-reference"] = "internal.scripts.TestRestfulConfigure".asJsonPrimitive()
val stepInputData = StepData().apply {
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
index 6f76c9b40..6f57439c3 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
@@ -20,8 +20,8 @@ import com.fasterxml.jackson.databind.node.ObjectNode
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
@@ -44,7 +44,7 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class])
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
-@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, NrmTestController::class])
+@ContextConfiguration(classes = [BlueprintRestLibConfiguration::class, NrmTestController::class])
@TestPropertySource(
properties = [
"blueprintsprocessor.restclient.nrm.type=basic-auth",
@@ -59,7 +59,7 @@ class RestfulNRMServiceClientTest {
@Autowired
lateinit var restfulNRMServiceClient: RestfulNRMServiceClient
- lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
@Test
fun testCreateMOI() {