diff options
3 files changed, 15 insertions, 18 deletions
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java index 04a0c593a..447da3f25 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java @@ -281,7 +281,7 @@ public abstract class AAIDeclarations implements AAIClient { } catch (AAIServiceException aaiexc) { ctx.setAttribute(prefix + ".error.message", aaiexc.getMessage()); if (aaiexc.getReturnCode() >= 300) { - ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode()); + ctx.setAttribute(prefix + ".error.http" + "" + ".response-code", Integer.toString(aaiexc.getReturnCode())); } if (aaiexc.getReturnCode() == 404) @@ -303,7 +303,7 @@ public abstract class AAIDeclarations implements AAIClient { } catch (AAIServiceException aaiexc) { ctx.setAttribute(prefix + ".error.message", aaiexc.getMessage()); if (aaiexc.getReturnCode() >= 300) { - ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode()); + ctx.setAttribute(prefix + ".error.http" + ".response-code", Integer.toString(aaiexc.getReturnCode())); } if (aaiexc.getReturnCode() == 404) @@ -521,7 +521,7 @@ public abstract class AAIDeclarations implements AAIClient { if(exc instanceof AAIServiceException) { AAIServiceException aaiexc = (AAIServiceException)exc; if(aaiexc.getReturnCode() >= 300) { - ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode()); + ctx.setAttribute(prefix + ".error.http" + ".response-code", Integer.toString(aaiexc.getReturnCode())); } if(aaiexc.getReturnCode() == 404) { @@ -710,22 +710,19 @@ public abstract class AAIDeclarations implements AAIClient { return QueryStatus.FAILURE; } } else { - String resoourceName = resource; + String resourceName = resource; String identifier = null; - if(resoourceName == null) - return QueryStatus.FAILURE; - - if(resoourceName.contains(":")) { - String[] tokens = resoourceName.split(":"); + if(resourceName.contains(":")) { + String[] tokens = resourceName.split(":"); if(tokens != null && tokens.length > 0) { - resoourceName = tokens[0]; + resourceName = tokens[0]; identifier = tokens[1]; } } if("relationship-list".equals(identifier) || "relationshipList".equals(identifier)) { // RelationshipRequest relationshipRequest = new RelationshipRequest(); - if("generic-vnf".equals(resoourceName)){ + if("generic-vnf".equals(resourceName)){ String vnfId = nameValues.get("vnf_id"); String relatedTo = nameValues.get("related_to"); vnfId = vnfId.trim().replace("'", "").replace("$", "").replace("'", ""); diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java index d1913b33d..8e7c63ceb 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java @@ -149,7 +149,7 @@ public class ResourceAllocator implements SvcLogicResource { prefix = prefix == null ? "" : prefix + '.'; - if (!resource.equals("NetworkCapacity")) { + if (!"NetworkCapacity".equals(resource)) { log.info("resource: " + resource); log.info("key: " + key); @@ -374,7 +374,7 @@ public class ResourceAllocator implements SvcLogicResource { log.info("Checking VPE port: " + portId); String provStatus = String.valueOf(vpe.get("provisioning-status")); - if (!provStatus.equals("PROV")) { + if (!"PROV".equals(provStatus)) { log.info("Skipping port " + portId + ": Provisioning status is not PROV."); continue; } @@ -476,7 +476,7 @@ public class ResourceAllocator implements SvcLogicResource { log.info("Checking VPLSPE port: " + portId); String provStatus = String.valueOf(vplspe.get("provisioning-status")); - if (!provStatus.equals("PROV")) { + if (!"PROV".equals(provStatus)) { log.info("Skipping port " + portId + ": Provisioning status is not PROV."); continue; } @@ -572,7 +572,7 @@ public class ResourceAllocator implements SvcLogicResource { for (AllocationOutcome ao1 : mrao.allocationOutcomeList) { if (ao1 instanceof LimitAllocationOutcome) { LimitAllocationOutcome lao = (LimitAllocationOutcome) ao1; - if (lao.request.resourceName.equals("Bandwidth")) { + if ("Bandwidth".equals(lao.request.resourceName)) { ThresholdStatus th = allocationRequestBuilder.getThresholdStatus(sd, ed, lao); setThresholdData(ctx, th, sd, ed); } @@ -588,12 +588,12 @@ public class ResourceAllocator implements SvcLogicResource { for (AllocationOutcome ao1 : mrao.allocationOutcomeList) { if (ao1 instanceof LimitAllocationOutcome) { LimitAllocationOutcome lao = (LimitAllocationOutcome) ao1; - if (lao.status == AllocationStatus.Failure && lao.request.resourceName.equals("Bandwidth")) { + if (lao.status == AllocationStatus.Failure && "Bandwidth".equals(lao.request.resourceName)) { long available = lao.limit - lao.used; if (available > maxAvailableSpeedServer) maxAvailableSpeedServer = available; } - if (lao.status == AllocationStatus.Failure && lao.request.resourceName.equals("Connection")) { + if (lao.status == AllocationStatus.Failure && "Connection".equals(lao.request.resourceName)) { maxAvailableSpeedServer = 0; break; } diff --git a/sql-resource/features/src/main/resources/features.xml b/sql-resource/features/src/main/resources/features.xml index 320c1902b..5cf1d9c50 100644 --- a/sql-resource/features/src/main/resources/features.xml +++ b/sql-resource/features/src/main/resources/features.xml @@ -31,7 +31,7 @@ <feature name='sdnc-sql-resource' description="sdnc-sql-resource" version='${project.version}'> <!-- Most applications will have a dependency on the ODL MD-SAL Broker --> <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature> - <feature version="${sdnctl.sli.version}">sdnc-sli</feature> + <feature>sdnc-sli</feature> <feature version="${sdnctl.dblib.version}">sdnc-dblib</feature> <bundle>mvn:org.onap.ccsdk.sli.adaptors/sql-resource-provider/${project.version}</bundle> </feature> |