aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java22
-rw-r--r--common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java17
2 files changed, 32 insertions, 7 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
index 26c3c0012a..83675da5f0 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
@@ -21,6 +21,7 @@
package org.onap.so.beans.nsmf;
import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
@@ -28,24 +29,33 @@ import java.util.List;
@Data
public class AnSliceProfile {
- private List<String> sNSSAIList;
-
+ @JsonProperty(value = "sliceProfileId", required = true)
private String sliceProfileId;
- private List<Integer> coverageAreaTAList;
-
- @JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int latency;
+ @JsonProperty(value = "sNSSAIList", required = true)
+ private List<String> sNSSAIList;
+ @JsonProperty(value = "pLMNIdList", required = true)
private List<String> pLMNIdList;
+ @JsonProperty(value = "perfReq", required = true)
private AnPerfReq perfReq;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
+ @JsonProperty(value = "maxNumberofUEs")
private long maxNumberofUEs;
+ @JsonProperty(value = "coverageAreaTAList")
+ private List<Integer> coverageAreaTAList;
+
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT)
+ @JsonProperty(value = "latency")
+ private int latency;
+
+ @JsonProperty(value = "uEMobilityLevel")
private UeMobilityLevel uEMobilityLevel;
+ @JsonProperty(value = "resourceSharingLevel")
private ResourceSharingLevel resourceSharingLevel;
}
diff --git a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java
index fff82ea5bc..33958a7850 100644
--- a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java
+++ b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java
@@ -1,8 +1,10 @@
package org.onap.so.utils;
import java.security.GeneralSecurityException;
+import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
import org.camunda.bpm.client.ExternalTaskClient;
import org.camunda.bpm.client.interceptor.ClientRequestInterceptor;
import org.camunda.bpm.client.interceptor.auth.BasicAuthProvider;
@@ -75,7 +77,20 @@ public class ExternalTaskServiceUtils {
@ScheduledLogging
@Scheduled(fixedDelay = 30000)
public void checkAllClientsActive() {
- getClients().stream().filter(client -> !client.isActive()).forEach(ExternalTaskClient::start);
+ try {
+ logger.debug("Executing scheduled task to check and restart external task clients"); // TODO remove
+ // eventually
+ List<ExternalTaskClient> inactiveClients =
+ getClients().stream().filter(client -> !client.isActive()).collect(Collectors.toList());
+
+ inactiveClients.forEach(c -> {
+ logger.debug("External Task Client found to be inactive. Restarting Client.");
+ c.start();
+ });
+ } catch (Exception e) {
+ logger.error("Exception occured in checkAllClientsActive", e);
+ }
+
}
protected Set<ExternalTaskClient> getClients() {