summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
authorPATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com>2020-09-22 17:33:23 -0400
committerPATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com>2020-09-22 17:33:29 -0400
commit40027d2cbfee31ecfec1c8a4189668f2c46c82ce (patch)
tree7e3a46a64f6a5a240065233272747d308a02a095 /vid-app-common/src/main
parentb2793df9df1b3fde4dab0f7d037f4eff67324c1f (diff)
When VG instantiation fails the root job status should be in final state
Issue-ID: VID-902 Change-Id: Ic40cf857e58e7079be9b23f7ae540399ec8fa227 Signed-off-by: PATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com>
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt
index 09357e519..97aeb894d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt
@@ -81,10 +81,10 @@ constructor(private val dataAccessService: DataAccessService, private val featur
a == FAILED_AND_PAUSED || b == FAILED_AND_PAUSED-> FAILED_AND_PAUSED
a == COMPLETED && b.isFailure -> FAILED_AND_PAUSED
b == COMPLETED && a.isFailure -> FAILED_AND_PAUSED
+ a.isFailure || b.isFailure -> FAILED
!a.isFinal || !b.isFinal -> IN_PROGRESS
a == COMPLETED_AND_PAUSED || b == COMPLETED_AND_PAUSED -> COMPLETED_AND_PAUSED
a == COMPLETED || b == COMPLETED -> COMPLETED
- a.isFailure || b.isFailure -> FAILED
else -> COMPLETED_WITH_NO_ACTION
}
} .orElse(COMPLETED_WITH_NO_ACTION)
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java
index 7391f41a9..ae991eb8d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java
@@ -249,7 +249,7 @@ public class JobsBrokerServiceInDatabaseImpl implements JobsBrokerService {
String sql = "and JOB.template_id not in \n" +
"(select TEMPLATE_Id from vid_job where" +
" TEMPLATE_Id IS NOT NULL and (JOB_STATUS IN('FAILED','FAILED_AND_PAUSED') "
- + " AND JOB_TYPE NOT IN('NetworkInstantiation','InstanceGroup','InstanceGroupMember') and DELETED_AT is null)" + // failed but not deleted
+ + " AND JOB_TYPE NOT IN('InstanceGroup','InstanceGroupMember') and DELETED_AT is null)" + // failed but not deleted
" or TAKEN_BY IS NOT NULL)";
return featureManager.isActive(Features.FLAG_2008_PAUSE_VFMODULE_INSTANTIATION_FAILURE) ?
sql : "";