aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-05-31 17:15:39 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-31 17:15:39 +0000
commit89b396152a7f5ca62175d13342c1b3a1a9067ccb (patch)
tree9d6172aa366aa98726f3642781f9406b22a2b5c6
parent9d58fecb4f11d0313415288869f01851d89bb2a4 (diff)
parent9ad28ffcf2d2e9d441ebeb339c5a6c85ccff6f32 (diff)
Merge "converted lock time from hard coded value"
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/resources/application-local.yaml2
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/application-test.yaml2
4 files changed, 13 insertions, 5 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
index f354e6c532..576acb1fd8 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
@@ -53,8 +53,9 @@ public class AuditStackService {
public void auditAddAAIInventory() throws Exception {
for (int i = 0; i < getMaxClients(); i++) {
ExternalTaskClient client = createExternalTaskClient();
- client.subscribe("InventoryAddAudit").lockDuration(60000).handler(auditCreateStack::executeExternalTask)
- .open();
+ client.subscribe("InventoryAddAudit")
+ .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
+ .handler(auditCreateStack::executeExternalTask).open();
}
}
@@ -62,8 +63,9 @@ public class AuditStackService {
public void auditDeleteAAIInventory() throws Exception {
for (int i = 0; i < getMaxClients(); i++) {
ExternalTaskClient client = createExternalTaskClient();
- client.subscribe("InventoryDeleteAudit").lockDuration(60000).handler(auditDeleteStack::executeExternalTask)
- .open();
+ client.subscribe("InventoryDeleteAudit")
+ .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
+ .handler(auditDeleteStack::executeExternalTask).open();
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java
index 8bd813026f..49a9e7e171 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java
@@ -59,7 +59,9 @@ public class CreateInventoryService {
ExternalTaskClient client = ExternalTaskClient.create()
.baseUrl(env.getRequiredProperty("mso.workflow.endpoint")).maxTasks(1).addInterceptor(interceptor)
.asyncResponseTimeout(120000).backoffStrategy(new ExponentialBackoffStrategy(0, 0, 0)).build();
- client.subscribe("InventoryCreate").lockDuration(60000).handler(createInventory::executeExternalTask).open();
+ client.subscribe("InventoryCreate")
+ .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
+ .handler(createInventory::executeExternalTask).open();
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml b/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
index 2ec5be7448..66d63d436b 100644
--- a/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
+++ b/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
@@ -51,6 +51,8 @@ tomcat:
mso:
msoKey: 07a7159d3bf51a0e53be7a8f89699be7
auth: 6B466C603A260F3655DBF91E53CE54667041C01406D10E8CAF9CC24D8FA5388D06F90BFE4C852052B436
+ audit:
+ lock-time: 240000
logPath: logs
msb-ip: localhost
msb-port: ${wiremock.server.port}
diff --git a/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml b/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
index ce576f00e1..7cc7697129 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
+++ b/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
@@ -63,6 +63,8 @@ ssl-enable: false
tomcat:
max-threads: 50
mso:
+ audit:
+ lock-time: 240000
logPath: logs
msb-ip: localhost
msb-port: ${wiremock.server.port}