summaryrefslogtreecommitdiffstats
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/beans/nsmf/SliceTaskInfo.java33
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java36
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java10
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java27
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java23
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java17
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java27
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java15
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java17
-rw-r--r--common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java17
11 files changed, 237 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/beans/nsmf/SliceTaskInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java
new file mode 100644
index 0000000000..dd1292e7e5
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java
@@ -0,0 +1,33 @@
+package org.onap.so.beans.nsmf;
+
+import lombok.Data;
+import org.onap.so.beans.nsmf.oof.TemplateInfo;
+import java.io.Serializable;
+
+@Data
+public class SliceTaskInfo<T> implements Serializable {
+ private static final long serialVersionUID = 7580056468353975320L;
+
+ private String suggestNssiId;
+
+ private String suggestNssiName;
+
+ private String progress;
+
+ private String status;
+
+ private String statusDescription;
+
+ private T sliceProfile;
+
+ private TemplateInfo NSSTInfo;
+
+ private String serviceInstanceId;
+
+ private String scriptName;
+
+ private String vendor;
+
+ private NetworkType networkType;
+
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
new file mode 100644
index 0000000000..cab209ebd1
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
@@ -0,0 +1,36 @@
+package org.onap.so.beans.nsmf;
+
+import lombok.Data;
+import org.onap.so.beans.nsmf.oof.TemplateInfo;
+
+
+@Data
+public class SliceTaskParamsAdapter {
+ private static final long serialVersionUID = -7785578865170503301L;
+
+ private String serviceId;
+
+ private String serviceName;
+
+ private String nstId;
+
+ private String nstName;
+
+ private ServiceProfile serviceProfile;
+
+ private String suggestNsiId;
+
+ private String suggestNsiName;
+
+ private TemplateInfo NSTInfo;
+
+ private SliceTaskInfo<TnSliceProfile> tnBHSliceTaskInfo;
+
+ private SliceTaskInfo<TnSliceProfile> tnMHSliceTaskInfo;
+
+ private SliceTaskInfo<TnSliceProfile> tnFHSliceTaskInfo;
+
+ private SliceTaskInfo<CnSliceProfile> cnSliceTaskInfo;
+
+ private SliceTaskInfo<AnSliceProfile> anSliceTaskInfo;
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java
index c3548f15af..be530bfb9c 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java
@@ -25,11 +25,21 @@ import com.fasterxml.jackson.annotation.JsonInclude;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TnSliceProfile {
+ private String sliceProfileId;
+
private String bandwidth;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int latency;
+ public String getSliceProfileId() {
+ return sliceProfileId;
+ }
+
+ public void setSliceProfileId(String sliceProfileId) {
+ this.sliceProfileId = sliceProfileId;
+ }
+
public String getBandwidth() {
return bandwidth;
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java
new file mode 100644
index 0000000000..4af60cf492
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java
@@ -0,0 +1,27 @@
+package org.onap.so.beans.nsmf.oof;
+
+import lombok.Getter;
+import org.onap.so.beans.nsmf.NetworkType;
+
+@Getter
+public enum DomainType {
+
+ AN_NF("AN-NF", NetworkType.ACCESS),
+
+ CN("CN", NetworkType.CORE),
+
+ TN_FH("TN-FH", NetworkType.TRANSPORT),
+
+ TN_MH("TN-MH", NetworkType.TRANSPORT),
+
+ TN_BH("TN-BH", NetworkType.TRANSPORT),;
+
+ private NetworkType networkType;
+
+ private String domainType;
+
+ DomainType(String domainType, NetworkType networkType) {
+ this.domainType = domainType;
+ this.networkType = networkType;
+ }
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java
new file mode 100644
index 0000000000..e1829eb2c3
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java
@@ -0,0 +1,23 @@
+package org.onap.so.beans.nsmf.oof;
+
+import lombok.Data;
+import org.onap.so.beans.nsmf.ServiceProfile;
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class NsiReqBody implements Serializable {
+ private static final long serialVersionUID = -1383112063216226985L;
+
+ private ServiceProfile serviceProfile;
+
+ private RequestInfo requestInfo;
+
+ private TemplateInfo NSTInfo;
+
+ private List<TemplateInfo> NSSTInfo;
+
+ private Boolean preferReuse;
+
+ private List<SubnetCapability> subnetCapabilities;
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java
new file mode 100644
index 0000000000..0632ab78e9
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java
@@ -0,0 +1,17 @@
+package org.onap.so.beans.nsmf.oof;
+
+import lombok.Data;
+import org.onap.so.beans.nsmf.ServiceProfile;
+import java.io.Serializable;
+
+@Data
+public class NssiReqBody implements Serializable {
+
+ private static final long serialVersionUID = -76327522074333341L;
+
+ private ServiceProfile serviceProfile;
+
+ private RequestInfo requestInfo;
+
+ private TemplateInfo NSSTInfo;
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java
new file mode 100644
index 0000000000..f900c3599d
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java
@@ -0,0 +1,27 @@
+package org.onap.so.beans.nsmf.oof;
+
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Map;
+
+@Data
+public class RequestInfo implements Serializable {
+
+ private static final long serialVersionUID = -875589918188540922L;
+
+ private String transactionId;
+
+ private String requestId;
+
+ private String callbackUrl;
+
+ private Map<?, ?> callbackHeader;
+
+ private String sourceId;
+
+ private Integer numSolutions;
+
+ private Integer timeout;
+
+ private Map<?, ?> addtnlArgs;
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java
new file mode 100644
index 0000000000..f21c1c379e
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java
@@ -0,0 +1,15 @@
+package org.onap.so.beans.nsmf.oof;
+
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Map;
+
+@Data
+public class SubnetCapability implements Serializable {
+
+ private static final long serialVersionUID = -7671021271451538821L;
+
+ private String domainType;
+
+ private Map<?, ?> capabilityDetails;
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java
new file mode 100644
index 0000000000..3713bc7186
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java
@@ -0,0 +1,17 @@
+package org.onap.so.beans.nsmf.oof;
+
+import lombok.Data;
+import java.io.Serializable;
+
+
+@Data
+public class TemplateInfo implements Serializable {
+
+ private static final long serialVersionUID = 4237411651259839093L;
+
+ private String UUID;
+
+ private String invariantUUID;
+
+ private String name;
+}
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() {