aboutsummaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-interfaces-service/bundle/src/main
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-01-23 18:17:31 +0000
committerTakamune Cho <takamune.cho@att.com>2019-01-24 19:39:37 +0000
commit0360dfcc5b4de89005f2724b8fbd4dcdb23979ae (patch)
tree04197d06dd8dcb12f77513f51424bb9430838fdb /appc-inbound/appc-interfaces-service/bundle/src/main
parent2cf3a78839c51b9de01c70f1b561b1bd059d0f69 (diff)
Fix ServiceExecutorImpl
Code change to fix handling of vserver-id Issue-ID: APPC-1358 Change-Id: I463fceda2321b5006100b12644708d22fe25a04e Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-inbound/appc-interfaces-service/bundle/src/main')
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java
index 67b9c6f2e..ee83c87bc 100644
--- a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java
@@ -102,24 +102,28 @@ public class ServiceExecutorImpl {
int vm_count = Integer.parseInt(ctx.getAttribute("vm-count"));
for(Request inprogressRequest:inProgressRequests){
if(inprogressRequest.getActionIdentifiers().getVnfcName() != null){
- for (int i = 0; i < vm_count; i++) {
- if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name")
- .equals(inprogressRequest.getActionIdentifiers().getVnfcName()))
- inProgressVServerIds.add(ctx.getAttribute("vm[" + i + "].vserver-id"));
- log.debug("Received vserver-id from AAI: " + inProgressVServerIds);
+ for (int i = 0; i < vm_count; i++) {
+ if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name")
+ .equals(inprogressRequest.getActionIdentifiers().getVnfcName())) {
+ String newInProgressVserverId = ctx.getAttribute("vm[" + i + "].vserver-id");
+ inProgressVServerIds.add(newInProgressVserverId);
+ log.debug("Received vserver-id from AAI: " + newInProgressVserverId);
+ }
+ }
}
- }
}
for(Request inProgVserverIds:inProgressRequests)
if(inProgVserverIds.getActionIdentifiers().getvServerId() != null)
inProgressVServerIds.add(inProgVserverIds.getActionIdentifiers().getvServerId());
if(currentRequestVnfcName != null){
- for (int i = 0; i < vm_count; i++)
+ for (int i = 0; i < vm_count; i++) {
if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name")
- .equals(currentRequestVnfcName))
- currentVnfcVserverId = ctx.getAttribute("vm[" + i + "].vserver-id");
- log.debug("Received vserver-id from AAI: " + currentVnfcVserverId);
- return inProgressVServerIds.contains(currentVnfcVserverId);
+ .equals(currentRequestVnfcName)) {
+ currentVnfcVserverId = ctx.getAttribute("vm[" + i + "].vserver-id");
+ log.debug("Received vserver-id from AAI: " + currentVnfcVserverId);
+ return inProgressVServerIds.contains(currentVnfcVserverId);
+ }
+ }
}
for (Request request : inProgressRequests) {
if(!Strings.isNullOrEmpty(currentRequestVServerId) && currentRequestVServerId.equalsIgnoreCase(request.getActionIdentifiers().getvServerId()))