aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java5
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java20
2 files changed, 22 insertions, 3 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java
index 475e18401..1a39174fd 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java
@@ -86,6 +86,11 @@ public class AsyncRequestStatus {
public String vnfInstanceId;
public String vfModuleInstanceId;
public String volumeGroupInstanceId;
+
+ public String serviceInstanceName;
+ public String vnfInstanceName;
+ public String vfModuleInstanceName;
+ public String volumeGroupInstanceName;
}
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java
index 796e9de4a..0487af37f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java
@@ -179,14 +179,15 @@ public class AuditServiceImpl implements AuditService{
if (request.requestId != null) {
requestId = UUID.fromString(request.requestId);
}
- instanceName = extractInstanceName(instanceName, request);
+
instanceType = request.requestType;
if (request.requestDetails != null && request.requestDetails.modelInfo != null) {
modelType = request.requestDetails.modelInfo.modelType;
}
instanceId = extractInstanceId(modelType,request);
-
+ instanceName = extractInstanceName(instanceName, request, modelType);
+
startTime = request.startTime;
if (request.requestStatus != null) {
@@ -221,7 +222,20 @@ public class AuditServiceImpl implements AuditService{
}
return "";
}
-
+ private String extractInstanceName(String instanceName, AsyncRequestStatus.Request request, String modelType) {
+ if(null != request.instanceReferences) {
+ if("service".equalsIgnoreCase(modelType)) {
+ instanceName = request.instanceReferences.serviceInstanceName;
+ } else if("vfModule".equalsIgnoreCase(modelType)){
+ instanceName = request.instanceReferences.vfModuleInstanceName;
+ } else if("vnf".equalsIgnoreCase(modelType)) {
+ instanceName = request.instanceReferences.vnfInstanceName;
+ } else if("volumeGroup".equalsIgnoreCase(modelType)){
+ instanceName = request.instanceReferences.volumeGroupInstanceName;
+ }
+ }
+ return instanceName;
+ }
private String buildAdditionalInfo(AsyncRequestStatus.Request request) {
String source = "";
String statusMessage = "";