summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorBoslet, Cory <cory.boslet@att.com>2020-02-06 10:04:42 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-02-07 09:03:42 -0500
commit8e34d4cd37809e854340170ae39fff7ae0a3c71a (patch)
treeee9bd2e51559a15e99c90c76e289c56b7115407e /adapters
parent526148c73d077343c083484aedb5745f7a759f0c (diff)
add retry sequence levels
Added retry sequence levels so that the different services can specify their desire. Updated to be medium and added to be long sequence in audit. Change retry level to be final and changed default constructor to private Changed default constructor to public so its visible. Updated unit test to reflect change and get verify job to pass Added and updated the unit test for add graph Issue-ID: SO-2649 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I981b90a5dbb1dca5354fba37589b26dabbfc0b0e
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AbstractAuditService.java5
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java5
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java5
5 files changed, 23 insertions, 0 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AbstractAuditService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AbstractAuditService.java
index 0c05df959f..ddd9fb1b5e 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AbstractAuditService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AbstractAuditService.java
@@ -25,6 +25,7 @@ import java.util.Optional;
import org.onap.so.objects.audit.AAIObjectAudit;
import org.onap.so.objects.audit.AAIObjectAuditList;
import org.onap.so.utils.ExternalTaskUtils;
+import org.onap.so.utils.RetrySequenceLevel;
import org.onap.logging.filter.base.ONAPComponents;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -47,6 +48,10 @@ public abstract class AbstractAuditService extends ExternalTaskUtils {
@Autowired
public Environment env;
+ public AbstractAuditService() {
+ super(RetrySequenceLevel.LONG);
+ }
+
/**
* @param auditHeatStackFailed
* @param auditList
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java
index 43b362cbaf..8291fa9882 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java
@@ -32,6 +32,7 @@ import org.onap.so.audit.beans.AuditInventory;
import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
import org.onap.so.externaltasks.logging.AuditMDCSetup;
import org.onap.so.objects.audit.AAIObjectAuditList;
+import org.onap.so.utils.RetrySequenceLevel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,6 +49,10 @@ public class AuditCreateStackService extends AbstractAuditService {
@Autowired
private AuditMDCSetup mdcSetup;
+ public AuditCreateStackService() {
+ super();
+ }
+
protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
AuditInventory auditInventory = externalTask.getVariable("auditInventory");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java
index da5e8bb3a2..cf077915c9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java
@@ -56,6 +56,10 @@ public class AuditDeleteStackService extends AbstractAuditService {
@Autowired
protected Environment env;
+ public AuditDeleteStackService() {
+ super();
+ }
+
protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
AuditInventory auditInventory = externalTask.getVariable("auditInventory");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java
index 8699f8b953..1c69a3e5e7 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditQueryStackService.java
@@ -28,6 +28,10 @@ public class AuditQueryStackService extends AbstractAuditService {
@Autowired
protected AuditDataService auditDataService;
+ public AuditQueryStackService() {
+ super();
+ }
+
protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
AuditInventory auditInventory = externalTask.getVariable("auditInventory");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
index 3d2d1d2aa3..e02258c619 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
@@ -29,6 +29,7 @@ import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvide
import org.onap.so.externaltasks.logging.AuditMDCSetup;
import org.onap.so.objects.audit.AAIObjectAuditList;
import org.onap.so.utils.ExternalTaskUtils;
+import org.onap.so.utils.RetrySequenceLevel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -49,6 +50,10 @@ public class CreateInventoryTask extends ExternalTaskUtils {
@Autowired
private AuditMDCSetup mdcSetup;
+ public CreateInventoryTask() {
+ super(RetrySequenceLevel.SHORT);
+ }
+
protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
boolean success = true;