summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java14
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/AAIClientCallFailedTest.java35
2 files changed, 42 insertions, 7 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index e3b218b90a..a473b0939e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -809,7 +809,7 @@ public class ServiceInstances {
String vfModuleId = "";
String volumeGroupId = "";
String networkId = "";
- String correlationId = "";
+ String pnfCorrelationId = "";
String instanceGroupId = null;
if(sir.getServiceInstanceId () != null){
serviceInstanceId = sir.getServiceInstanceId ();
@@ -834,7 +834,7 @@ public class ServiceInstances {
instanceGroupId = sir.getInstanceGroupId();
}
- correlationId = getCorrelationId(sir);
+ pnfCorrelationId = getPnfCorrelationId(sir);
try{
infraActiveRequestsClient.save(currentActiveReq);
@@ -858,7 +858,7 @@ public class ServiceInstances {
.setRecipeTimeout(recipeLookupResult.getRecipeTimeout())
.setRequestAction(action.toString())
.setServiceInstanceId(serviceInstanceId)
- .setCorrelationId(correlationId)
+ .setPnfCorrelationId(pnfCorrelationId)
.setVnfId(vnfId)
.setVfModuleId(vfModuleId)
.setVolumeGroupId(volumeGroupId)
@@ -944,7 +944,7 @@ public class ServiceInstances {
return postBPELRequest(currentActiveReq, requestClientParameter, recipeLookupResult.getOrchestrationURI(), requestScope);
}
- private String getCorrelationId(ServiceInstancesRequest sir) {
+ private String getPnfCorrelationId(ServiceInstancesRequest sir) {
return Optional.of(sir)
.map(ServiceInstancesRequest::getRequestDetails)
.map(RequestDetails::getRequestParameters)
@@ -1860,7 +1860,7 @@ public class ServiceInstances {
serviceInstanceId = "";
String configurationId = "";
- String correlationId = "";
+ String pnfCorrelationId = "";
if(sir.getServiceInstanceId () != null){
serviceInstanceId = sir.getServiceInstanceId ();
@@ -1870,7 +1870,7 @@ public class ServiceInstances {
configurationId = sir.getConfigurationId();
}
- correlationId = getCorrelationId(sir);
+ pnfCorrelationId = getPnfCorrelationId(sir);
try{
infraActiveRequestsClient.save(currentActiveReq);
@@ -1893,7 +1893,7 @@ public class ServiceInstances {
.setRecipeTimeout(Integer.parseInt(timeOut))
.setRequestAction(action.toString())
.setServiceInstanceId(serviceInstanceId)
- .setCorrelationId(correlationId)
+ .setPnfCorrelationId(pnfCorrelationId)
.setConfigurationId(configurationId)
.setRequestDetails(mapJSONtoMSOStyle(requestJSON, sir, aLaCarte, action))
.setApiVersion(apiVersion)
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/AAIClientCallFailedTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/AAIClientCallFailedTest.java
new file mode 100644
index 0000000000..2cb02e9666
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/AAIClientCallFailedTest.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 IBM.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.tenantisolation.exceptions;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+
+public class AAIClientCallFailedTest extends BaseTest {
+
+ @Test
+ public void testAAIClientCallFailedException() {
+ AAIClientCallFailed aAIClientCallFailed = new AAIClientCallFailed("failed", new Throwable("throwable"));
+ assertEquals("failed", aAIClientCallFailed.getMessage());
+ assertEquals("throwable", aAIClientCallFailed.getCause().getMessage());
+ }
+}