diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2019-09-19 20:35:31 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-10-01 15:01:17 +0000 |
commit | 39af688ce0cfc9bc00201d283ae101a129cf750a (patch) | |
tree | d83ec8629796d7cb08e0556d3c0c5f0f80d26572 | |
parent | b43aa4f328c387cd433cfc6d79643f5f7dc34fc1 (diff) |
Sonar Fix: LookupServer.java
Fixed sonar issues across this file
Issue-ID: APPC-1739
Change-Id: Iabbaada720d8b3f2ee3916a0d663b90f8fe23bcb
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r-- | appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java index 4ca036595..daa8b2622 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java @@ -53,9 +53,9 @@ public class LookupServer extends ProviderServerOperation { private static final EELFLogger logger = EELFManager.getInstance().getLogger(EvacuateServer.class); private static final Configuration configuration = ConfigurationFactory.getConfiguration(); - private static final String serverFound = "serverFound"; + private static final String SERVERFOUND = "serverFound"; - public Server lookupServer(Map<String, String> params, SvcLogicContext ctx) throws APPCException { + public Server lookupServer(Map<String, String> params, SvcLogicContext ctx) { Server server = null; RequestContext rc = new RequestContext(ctx); rc.isAlive(); // should we test the return and fail if false? @@ -78,7 +78,7 @@ public class LookupServer extends ProviderServerOperation { String msg = EELFResourceManager.format(Msg.SERVER_NOT_FOUND, e, vmUrl); logger.error(msg); doFailure(rc, HttpStatus.NOT_FOUND_404, msg); - ctx.setAttribute(serverFound, "failure"); + ctx.setAttribute(SERVERFOUND, "failure"); } return server; } @@ -93,7 +93,7 @@ public class LookupServer extends ProviderServerOperation { rqstCtx.reset(); server = lookupServer(rqstCtx, context, vm.getServerId()); logger.debug(Msg.SERVER_FOUND, vmUrl, context.getTenantName(), server.getStatus().toString()); - ctx.setAttribute(serverFound, "success"); + ctx.setAttribute(SERVERFOUND, "success"); String msg = EELFResourceManager.format(Msg.SUCCESS_EVENT_MESSAGE, "LookupServer", vmUrl); ctx.setAttribute(org.onap.appc.Constants.ATTRIBUTE_SUCCESS_MESSAGE, msg); doSuccess(rqstCtx); @@ -103,7 +103,7 @@ public class LookupServer extends ProviderServerOperation { String msg = EELFResourceManager.format(Msg.SERVER_NOT_FOUND, e, vmUrl); logger.error(msg); doFailure(rqstCtx, HttpStatus.NOT_FOUND_404, msg); - ctx.setAttribute(serverFound, "failure"); + ctx.setAttribute(SERVERFOUND, "failure"); } catch (IOException e) { // exception closing context String msg = EELFResourceManager.format(Msg.CLOSE_CONTEXT_FAILED, e, vmUrl); |