summaryrefslogtreecommitdiffstats
path: root/aai-service/provider/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'aai-service/provider/src/main')
-rwxr-xr-xaai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java19
1 files changed, 8 insertions, 11 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("'", "");