diff options
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/TerminateServer.java')
-rw-r--r-- | appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/TerminateServer.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/TerminateServer.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/TerminateServer.java index 160364ec6..f3d4121a0 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/TerminateServer.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/TerminateServer.java @@ -188,11 +188,11 @@ public class TerminateServer extends ProviderServerOperation { validateParametersExist(params, ProviderAdapter.PROPERTY_INSTANCE_URL, ProviderAdapter.PROPERTY_PROVIDER_NAME); - String vm_url = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL); + String vmUrl = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL); ctx.setAttribute("TERMINATE_STATUS", "SUCCESS"); - VMURL vm = VMURL.parseURL(vm_url); - if (validateVM(rc, appName, vm_url, vm)) + VMURL vm = VMURL.parseURL(vmUrl); + if (validateVM(rc, appName, vmUrl, vm)) return null; IdentityURL ident = IdentityURL.parseURL(params.get(ProviderAdapter.PROPERTY_IDENTITY_URL)); @@ -201,11 +201,11 @@ public class TerminateServer extends ProviderServerOperation { Context context = null; String tenantName = "Unknown";//to be used also in case of exception try { - context = getContext(rc, vm_url, identStr); + context = getContext(rc, vmUrl, identStr); if (context != null) { tenantName = context.getTenantName();//this varaible also is used in case of exception server = lookupServer(rc, context, vm.getServerId()); - logger.debug(Msg.SERVER_FOUND, vm_url, tenantName, server.getStatus().toString()); + logger.debug(Msg.SERVER_FOUND, vmUrl, tenantName, server.getStatus().toString()); logger.info(EELFResourceManager.format(Msg.TERMINATING_SERVER, server.getName())); terminateServer(rc, server); logger.info(EELFResourceManager.format(Msg.TERMINATE_SERVER, server.getName())); @@ -215,13 +215,13 @@ public class TerminateServer extends ProviderServerOperation { ctx.setAttribute("TERMINATE_STATUS", "SERVER_NOT_FOUND"); } } catch (ResourceNotFoundException e) { - String msg = EELFResourceManager.format(Msg.SERVER_NOT_FOUND, e, vm_url); + String msg = EELFResourceManager.format(Msg.SERVER_NOT_FOUND, e, vmUrl); logger.error(msg); doFailure(rc, HttpStatus.NOT_FOUND_404, msg); ctx.setAttribute("TERMINATE_STATUS", "SERVER_NOT_FOUND"); } catch (Exception e1) { String msg = EELFResourceManager.format(Msg.SERVER_OPERATION_EXCEPTION, e1, - e1.getClass().getSimpleName(), RESTART_SERVICE.toString(), vm_url, + e1.getClass().getSimpleName(), RESTART_SERVICE.toString(), vmUrl, tenantName); logger.error(msg, e1); doFailure(rc, HttpStatus.INTERNAL_SERVER_ERROR_500, msg); |