From adcd4f2bc695840e9ecbc05003bc52c675f22fec Mon Sep 17 00:00:00 2001 From: KAPIL SINGAL Date: Fri, 22 Jan 2021 11:49:51 -0500 Subject: Renaming Files having BluePrint to have Blueprint Replacing BluePrint with Blueprint throughout Issue-ID: CCSDK-3098 Signed-off-by: KAPIL SINGAL Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96 --- .../configuration/HealthCheckProperties.kt | 4 +-- .../service/health/AbstractHealthCheck.kt | 2 +- .../health/BluePrintProcessorHealthCheck.kt | 40 ---------------------- .../health/BlueprintProcessorHealthCheck.kt | 40 ++++++++++++++++++++++ .../healthapi/HealthCheckServiceTest.kt | 8 ++--- 5 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt create mode 100644 ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt (limited to 'ms/blueprintsprocessor/modules/inbounds/health-api-common/src') diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt index c1532cd35..ab1f9eb54 100644 --- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt +++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt @@ -38,7 +38,7 @@ open class HealthCheckProperties { @Value("#{'\${cdslistener.healthcheck.mapping-service-name-with-service-link:}'.split(']')}") private val cdsListenerServiceMapping: List? = null - open fun getBluePrintBaseURL(): String? { + open fun getBlueprintBaseURL(): String? { return bluePrintProcessorBaseURL } @@ -46,7 +46,7 @@ open class HealthCheckProperties { return cdsListenerBaseURL } - open fun getBluePrintServiceInformation(): List { + open fun getBlueprintServiceInformation(): List { val serviceName = ServiceName.BLUEPRINT return getListOfServiceEndPoints(blueprintprocessorServiceMapping, serviceName) } diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt index 6d49ebe65..6bfc182e4 100644 --- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt +++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt @@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory */ abstract class AbstractHealthCheck(private val endPointExecution: EndPointExecution) { - private var logger = LoggerFactory.getLogger(BluePrintProcessorHealthCheck::class.java) + private var logger = LoggerFactory.getLogger(BlueprintProcessorHealthCheck::class.java) private fun retrieveSystemStatus(list: List): HealthApiResponse { val healthApiResponse: HealthApiResponse diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt deleted file mode 100644 index dddad52e2..000000000 --- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright © 2019-2020 Orange. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health - -import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.configuration.HealthCheckProperties -import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.ServiceEndpoint -import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.EndPointExecution -import org.springframework.stereotype.Service - -/** - * Service for checking health for other CDS services . - * - * @author Shaaban Ebrahim - * @version 1.0 - */ -@Service -open class BluePrintProcessorHealthCheck( - private val endPointExecution: EndPointExecution, - private val healthCheckProperties: HealthCheckProperties -) : - AbstractHealthCheck(endPointExecution) { - - override fun setupServiceEndpoint(): List { - return healthCheckProperties.getBluePrintServiceInformation() - } -} diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt new file mode 100644 index 000000000..9ffa82442 --- /dev/null +++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt @@ -0,0 +1,40 @@ +/* + * Copyright © 2019-2020 Orange. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health + +import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.configuration.HealthCheckProperties +import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.ServiceEndpoint +import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.EndPointExecution +import org.springframework.stereotype.Service + +/** + * Service for checking health for other CDS services . + * + * @author Shaaban Ebrahim + * @version 1.0 + */ +@Service +open class BlueprintProcessorHealthCheck( + private val endPointExecution: EndPointExecution, + private val healthCheckProperties: HealthCheckProperties +) : + AbstractHealthCheck(endPointExecution) { + + override fun setupServiceEndpoint(): List { + return healthCheckProperties.getBlueprintServiceInformation() + } +} diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt index e3ba72428..186d4190b 100644 --- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt +++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt @@ -31,7 +31,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.configuration.HealthChec import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.HealthCheckStatus import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.ServiceEndpoint import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.EndPointExecution -import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health.BluePrintProcessorHealthCheck +import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health.BlueprintProcessorHealthCheck import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService @@ -52,12 +52,12 @@ class HealthCheckServiceTest { @InjectMocks private var endPointExecution: EndPointExecution? = null - private var bluePrintProcessorHealthCheck: BluePrintProcessorHealthCheck? = null + private var bluePrintProcessorHealthCheck: BlueprintProcessorHealthCheck? = null @Before fun setup() { endPointExecution = Mockito.spy(endPointExecution!!) - Mockito.`when`(healthCheckProperties!!.getBluePrintServiceInformation()).thenReturn( + Mockito.`when`(healthCheckProperties!!.getBlueprintServiceInformation()).thenReturn( Arrays.asList( ServiceEndpoint("Execution service ", "http://cds-blueprints-processor-http:8080/api/v1/execution-service/health-check"), ServiceEndpoint("Resources service", "http://cds-blueprints-processor-http:8080/api/v1/resources/health-check"), @@ -65,7 +65,7 @@ class HealthCheckServiceTest { ) ) - bluePrintProcessorHealthCheck = BluePrintProcessorHealthCheck(endPointExecution!!, healthCheckProperties) + bluePrintProcessorHealthCheck = BlueprintProcessorHealthCheck(endPointExecution!!, healthCheckProperties) } @Test -- cgit 1.2.3-korg