diff options
Diffstat (limited to 'ms/blueprintsprocessor/functions/ansible-awx-executor/src')
2 files changed, 17 insertions, 17 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 2eafcd458..133e4a52b 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 88cf0992f..7be03333f 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().allErrors().isEmpty()) + assertTrue(bluePrintRuntimeService.getBluePrintError().allErrors().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().allErrors() + val errors = bluePrintRuntimeService.getBluePrintError().allErrors() 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().allErrors() + val errors = bluePrintRuntimeService.getBluePrintError().allErrors() 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" |