From d52d6366effdbbcb243c06c031fe9f324f16c4a9 Mon Sep 17 00:00:00 2001 From: kurczews Date: Tue, 12 Dec 2017 15:47:55 +0100 Subject: Reduce complexity of HealthCheckUtils * Split bulk conditionals * Split health checks to separate methods * Fix minor issues Issue-ID: SO-353 Change-Id: Ib6298bc488a94aa4fbb253e3894532708547533d Signed-off-by: kurczews --- .../org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandler.java | 2 +- .../main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java | 2 +- .../java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandler.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandler.java index af0fabc380..52256d91b9 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandler.java @@ -53,7 +53,7 @@ public class GlobalHealthcheckHandler { // Generate a Request Id String requestId = UUIDChecker.generateUUID(msoLogger); HealthCheckUtils healthCheck = new HealthCheckUtils (); - if (!healthCheck.siteStatusCheck (msoLogger, startTime)) { + if (!healthCheck.siteStatusCheck (msoLogger)) { return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE; } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java index 291414bf10..55f44a7449 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java @@ -51,7 +51,7 @@ public class HealthcheckHandler { MsoLogger.setServiceName ("Healthcheck"); UUIDChecker.verifyOldUUID(requestId, msoLogger); HealthCheckUtils healthCheck = new HealthCheckUtils (); - if (!healthCheck.siteStatusCheck(msoLogger, startTime)) { + if (!healthCheck.siteStatusCheck(msoLogger)) { return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE; } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandler.java index beb26af88b..0191b546e3 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandler.java @@ -51,7 +51,7 @@ public class NodeHealthcheckHandler { // Generate a Request Id String requestId = UUIDChecker.generateUUID(msoLogger); HealthCheckUtils healthCheck = new HealthCheckUtils (); - if (!healthCheck.siteStatusCheck (msoLogger, startTime)) { + if (!healthCheck.siteStatusCheck (msoLogger)) { return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE; } -- cgit 1.2.3-korg