summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorOleksandr Moliavko <o.moliavko@samsung.com>2019-10-08 12:39:44 +0300
committerOleksandr Moliavko <o.moliavko@samsung.com>2019-10-15 13:59:28 +0300
commit69d1896102e94e22b9e02e5850fe956af092ec8b (patch)
tree8b7171a6067a3e4385cf25e84630e02b4abc5f64 /adapters
parentdb90144322187faee71622702bff58c43a2af300 (diff)
Cleanup - removed unused variables and methods,
redundant initializers in several places Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com> Change-Id: I15ae50cf327d3d125f9d86c34281093bef677c71
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java9
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java2
3 files changed, 2 insertions, 11 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
index 3eb3fe188d..c648cc2137 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
@@ -525,7 +525,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
private StackInfo getStackStatus(String cloudSiteId, String cloudOwner, String tenantId, String instanceId,
boolean pollForCompletion, int timeoutMinutes, boolean backout) throws MsoException {
- StackInfo stackInfo = new StackInfo();
+ StackInfo stackInfo;
// If client has requested a final response, poll for stack completion
if (pollForCompletion) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index 52b97da61a..5641186eca 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -310,7 +310,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// First, look up to see if the Network already exists (by name).
// For HEAT orchestration of networks, the stack name will always match the network name
StackInfo heatStack = null;
- long queryNetworkStarttime = System.currentTimeMillis();
try {
heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkName);
} catch (MsoException me) {
@@ -564,7 +563,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// Verify that the Network exists
// For Neutron-based orchestration, the networkId is the Neutron Network UUID.
NetworkInfo netInfo = null;
- long queryNetworkStarttime = System.currentTimeMillis();
try {
netInfo = neutron.queryNetwork(networkId, tenantId, cloudSiteId);
} catch (MsoException me) {
@@ -608,7 +606,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// First, look up to see that the Network already exists.
// For Heat-based orchestration, the networkId is the network Stack ID.
StackInfo heatStack = null;
- long queryStackStarttime = System.currentTimeMillis();
try {
heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkName);
} catch (MsoException me) {
@@ -728,7 +725,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// Update the network stack
// Ignore MsoStackNotFound exception because we already checked.
- long updateStackStarttime = System.currentTimeMillis();
try {
heatStack = heatWithUpdate.updateStack(cloudSiteId, CLOUD_OWNER, tenantId, networkId, template,
stackParams, true, heatTemplate.getTimeoutMinutes());
@@ -892,9 +888,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
logger.debug("*** QUERY Network with Network: {} in {}/{}", networkNameOrId, cloudSiteId, tenantId);
- // Will capture execution time for metrics
- long startTime = System.currentTimeMillis();
-
if (commonUtils.isNullOrEmpty(cloudSiteId) || commonUtils.isNullOrEmpty(tenantId)
|| commonUtils.isNullOrEmpty(networkNameOrId)) {
@@ -919,7 +912,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
String neutronId = null;
// Try Heat first, since networks may be named the same as the Heat stack
StackInfo heatStack = null;
- long queryStackStarttime = System.currentTimeMillis();
try {
heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkNameOrId);
} catch (MsoException me) {
@@ -961,7 +953,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// Query directly against the Neutron Network for the details
// no RouteTargets available for ContrailV2 in neutron net-show
// networkId is heatStackId
- long queryNetworkStarttime = System.currentTimeMillis();
try {
NetworkInfo netInfo = neutron.queryNetwork(neutronId, tenantId, cloudSiteId);
if (netInfo != null) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java
index 6a38cc60e6..c782adec64 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java
@@ -100,7 +100,7 @@ public class TenantAdapterRest {
logger.debug("createTenant enter: {}", req.toJsonString());
String newTenantId = null;
- TenantRollback tenantRollback = new TenantRollback();
+ TenantRollback tenantRollback;
try {
Holder<String> htenant = new Holder<>();