summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-05-04 15:29:27 +0530
committerTakamune Cho <takamune.cho@att.com>2020-05-04 20:30:09 +0000
commit35ffaa6ff69b79151a0c6bd02686cf1db979344d (patch)
treec65bed0285b472b183a685f113dd1448c3d16088 /appc-adapters/appc-iaas-adapter
parentbe4b0e203dae1448d1750c4db08d983623e7c6ec (diff)
Rename the fields to match the regular expression
Issue-ID: APPC-1859 Change-Id: Id60e1a8df6cf03c1956904bbcf3a5802501ec5fb Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RebuildServer.java14
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RestartServer.java16
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/SnapshotStack.java12
3 files changed, 21 insertions, 21 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RebuildServer.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RebuildServer.java
index 7c811a8ef..d7ade9190 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RebuildServer.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RebuildServer.java
@@ -381,9 +381,9 @@ public class RebuildServer extends ProviderServerOperation {
validateParametersExist(params, ProviderAdapter.PROPERTY_INSTANCE_URL,
ProviderAdapter.PROPERTY_PROVIDER_NAME);
String appName = configuration.getProperty(Constants.PROPERTY_APPLICATION_NAME);
- String vm_url = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL);
- VMURL vm = VMURL.parseURL(vm_url);
- if (validateVM(rc, appName, vm_url, vm))
+ String vmUrl = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL);
+ VMURL vm = VMURL.parseURL(vmUrl);
+ if (validateVM(rc, appName, vmUrl, vm))
return null;
IdentityURL ident = IdentityURL.parseURL(params.get(ProviderAdapter.PROPERTY_IDENTITY_URL));
String identStr = (ident == null) ? null : ident.toString();
@@ -391,12 +391,12 @@ public class RebuildServer 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
rc.reset();
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());
// Manually checking image service until new PAL release
if (hasImageAccess(rc, context)) {
rebuildServer(rc, server, ctx);
@@ -421,14 +421,14 @@ public class RebuildServer extends ProviderServerOperation {
doFailure(rc, e.getStatus(), e.getMessage());
ctx.setAttribute("REBUILD_STATUS", "ERROR");
} catch (ResourceNotFoundException e) {
- msg = EELFResourceManager.format(Msg.SERVER_NOT_FOUND, e, vm_url);
+ msg = EELFResourceManager.format(Msg.SERVER_NOT_FOUND, e, vmUrl);
ctx.setAttribute("REBUILD_STATUS", "ERROR");
logger.error(msg);
metricsLogger.error(msg);
doFailure(rc, HttpStatus.NOT_FOUND_404, msg);
} catch (Exception e1) {
msg = EELFResourceManager.format(Msg.SERVER_OPERATION_EXCEPTION, e1, e1.getClass().getSimpleName(),
- STOP_SERVICE.toString(), vm_url, tenantName);
+ STOP_SERVICE.toString(), vmUrl, tenantName);
ctx.setAttribute("REBUILD_STATUS", "ERROR");
logger.error(msg, e1);
metricsLogger.error(msg);
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RestartServer.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RestartServer.java
index 37d897200..98267955f 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RestartServer.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/RestartServer.java
@@ -191,39 +191,39 @@ public class RestartServer extends ProviderServerOperation {
try {
validateParametersExist(params, ProviderAdapter.PROPERTY_INSTANCE_URL,
ProviderAdapter.PROPERTY_PROVIDER_NAME);
- String vm_url = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL);
- VMURL vm = VMURL.parseURL(vm_url);
- if (validateVM(rc, appName, vm_url, vm))
+ String vmUrl = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL);
+ VMURL vm = VMURL.parseURL(vmUrl);
+ if (validateVM(rc, appName, vmUrl, vm))
return null;
IdentityURL ident = IdentityURL.parseURL(params.get(ProviderAdapter.PROPERTY_IDENTITY_URL));
String identStr = (ident == null) ? null : ident.toString();
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
rc.reset();
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());
rc.reset();
restartServer(rc, server, ctx);
context.close();
doSuccess(rc);
ctx.setAttribute("RESTART_STATUS", "SUCCESS");
- String msg = EELFResourceManager.format(Msg.SUCCESS_EVENT_MESSAGE, "RestartServer", vm_url);
+ String msg = EELFResourceManager.format(Msg.SUCCESS_EVENT_MESSAGE, "RestartServer", vmUrl);
ctx.setAttribute(org.onap.appc.Constants.ATTRIBUTE_SUCCESS_MESSAGE, msg);
}
} catch (RequestFailedException e) {
doFailure(rc, e.getStatus(), e.getMessage());
} 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);
metricsLogger.error(msg);
doFailure(rc, HttpStatus.NOT_FOUND_404, msg);
} catch (Exception e1) {
String msg = EELFResourceManager.format(Msg.SERVER_OPERATION_EXCEPTION, e1,
- e1.getClass().getSimpleName(), RESTART_SERVICE.toString(), vm_url, tenantName);
+ e1.getClass().getSimpleName(), RESTART_SERVICE.toString(), vmUrl, tenantName);
logger.error(msg, e1);
metricsLogger.error(msg, e1);
doFailure(rc, HttpStatus.INTERNAL_SERVER_ERROR_500, msg);
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/SnapshotStack.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/SnapshotStack.java
index 5f41a5147..fc71066af 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/SnapshotStack.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/SnapshotStack.java
@@ -98,7 +98,7 @@ public class SnapshotStack extends ProviderStackOperation {
rc.isAlive();
ctx.setAttribute("SNAPSHOT_STATUS", "STACK_NOT_FOUND");
setTimeForMetricsLogger();
- String vm_url = null;
+ String vmUrl = null;
Context context = null;
String tenantName = "Unknown";// to be used also in case of exception
try {
@@ -106,12 +106,12 @@ public class SnapshotStack extends ProviderStackOperation {
ProviderAdapter.PROPERTY_PROVIDER_NAME, ProviderAdapter.PROPERTY_STACK_ID);
String stackId = params.get(ProviderAdapter.PROPERTY_STACK_ID);
String appName = configuration.getProperty(Constants.PROPERTY_APPLICATION_NAME);
- vm_url = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL);
- context = resolveContext(rc, params, appName, vm_url);
+ vmUrl = params.get(ProviderAdapter.PROPERTY_INSTANCE_URL);
+ context = resolveContext(rc, params, appName, vmUrl);
if (context != null) {
tenantName = context.getTenantName();// this varaible also is used in case of exception
stack = lookupStack(rc, context, stackId);
- logger.debug(Msg.STACK_FOUND, vm_url, tenantName, stack.getStatus().toString());
+ logger.debug(Msg.STACK_FOUND, vmUrl, tenantName, stack.getStatus().toString());
logger.info(EELFResourceManager.format(Msg.SNAPSHOTING_STACK, stack.getName()));
metricsLogger.info(EELFResourceManager.format(Msg.SNAPSHOTING_STACK, stack.getName()));
Snapshot snapshot = snapshotStack(rc, stack);
@@ -125,7 +125,7 @@ public class SnapshotStack extends ProviderStackOperation {
ctx.setAttribute(Constants.DG_ATTRIBUTE_STATUS, "failure");
}
} catch (ResourceNotFoundException e) {
- String msg = EELFResourceManager.format(Msg.STACK_NOT_FOUND, e, vm_url);
+ String msg = EELFResourceManager.format(Msg.STACK_NOT_FOUND, e, vmUrl);
logger.error(msg);
metricsLogger.error(msg);
doFailure(rc, HttpStatus.NOT_FOUND_404, msg, e);
@@ -136,7 +136,7 @@ public class SnapshotStack extends ProviderStackOperation {
doFailure(rc, e.getStatus(), e.getMessage(), e);
} catch (Exception e1) {
String msg = EELFResourceManager.format(Msg.STACK_OPERATION_EXCEPTION, e1, e1.getClass().getSimpleName(),
- "snapshotStack", vm_url, tenantName);
+ "snapshotStack", vmUrl, tenantName);
logger.error(msg, e1);
metricsLogger.error(msg);
doFailure(rc, HttpStatus.INTERNAL_SERVER_ERROR_500, msg, e1);