aboutsummaryrefslogtreecommitdiffstats
path: root/common/src
diff options
context:
space:
mode:
authorhetengjiao <hetengjiao@chinamobile.com>2020-11-26 11:02:42 +0800
committerhetengjiao <hetengjiao@chinamobile.com>2020-11-26 19:30:42 +0800
commit88f7235a08466ca2700a0255fcb25fa875ccb982 (patch)
tree1fc18e8053ec39e547254d8133a327cd501007cc /common/src
parenta3761511f6343eba0a478116f958881b6925c4cf (diff)
New attributes are added according to the standard and fixed TN allocate response
Issue-ID: SO-2963 Signed-off-by: hetengjiao <hetengjiao@chinamobile.com> Change-Id: I4a2dfccbfa9dcdbe93d50a03b307061dca45c81a
Diffstat (limited to 'common/src')
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java2
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java2
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java4
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/CnSliceProfile.java8
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java17
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java18
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java103
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java1
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java91
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java2
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java9
11 files changed, 120 insertions, 137 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java
index dc8e69121e..f966098b18 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java
@@ -47,5 +47,5 @@ public class AllocateAnNssi implements Serializable {
private NsiInfo nsiInfo;
- private Map<String, Object> endPoint;
+ private EndPoint endPoint;
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java
index f5b926f627..fdbff2fd42 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java
@@ -49,5 +49,5 @@ public class AllocateCnNssi implements Serializable {
private NsiInfo nsiInfo;
- private Map<String, Object> endPoint;
+ private EndPoint endPoint;
}
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 14918c7873..8000ca210c 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
@@ -51,7 +51,7 @@ public class AnSliceProfile implements Serializable {
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
@JsonProperty(value = "maxNumberofUEs")
- private long maxNumberofUEs;
+ private int maxNumberOfUEs;
@JsonProperty(value = "coverageAreaTAList")
private List<Integer> coverageAreaTAList;
@@ -61,7 +61,7 @@ public class AnSliceProfile implements Serializable {
private int latency;
@JsonProperty(value = "uEMobilityLevel")
- private UeMobilityLevel uEMobilityLevel;
+ private UeMobilityLevel ueMobilityLevel;
@JsonProperty(value = "resourceSharingLevel")
private ResourceSharingLevel resourceSharingLevel;
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/CnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/CnSliceProfile.java
index 3a45119195..efb447bc00 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/CnSliceProfile.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/CnSliceProfile.java
@@ -38,13 +38,13 @@ public class CnSliceProfile implements Serializable {
private String sliceProfileId;
@JsonProperty(value = "plmnIdList", required = true)
- private List<String> plmnIdList;
+ private List<String> pLMNIdList;
@JsonProperty(value = "perfReq", required = true)
private PerfReq perfReq;
@JsonProperty(value = "maxNumberofUEs")
- private int maxNumberofUEs;
+ private int maxNumberOfUEs;
@JsonProperty(value = "coverageAreaTAList")
private List<String> coverageAreaTAList;
@@ -57,4 +57,8 @@ public class CnSliceProfile implements Serializable {
@JsonProperty(value = "resourceSharingLevel")
private ResourceSharingLevel resourceSharingLevel;
+
+ @JsonProperty(value = "maxNumberofPDUSession")
+ private int maxNumberOfPDUSession;
+
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java b/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java
index dab9b3a990..90bfc0eae0 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java
@@ -20,17 +20,28 @@
package org.onap.so.beans.nsmf;
import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.ToString;
import java.io.Serializable;
-import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
public class EndPoint implements Serializable {
private static final long serialVersionUID = 2479795890807020491L;
- private String nodeId;
+ @JsonProperty(value = "ipAddress")
+ private String ipAddress;
- private Map<String, Object> additionalInfo;
+ @JsonProperty(value = "logicInterfaceId")
+ private String logicInterfaceId;
+
+ @JsonProperty(value = "nextHopInfo")
+ private String nextHopInfo;
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java b/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java
index 92acdaa90d..270a55e349 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java
@@ -21,9 +21,11 @@
package org.onap.so.beans.nsmf;
import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
import java.io.Serializable;
@JsonInclude(JsonInclude.Include.NON_NULL)
+@Data
public class NssiResponse implements Serializable {
private static final long serialVersionUID = 2723440188640857903L;
@@ -32,19 +34,5 @@ public class NssiResponse implements Serializable {
private String jobId;
- public String getNssiId() {
- return nssiId;
- }
-
- public void setNssiId(String nssiId) {
- this.nssiId = nssiId;
- }
-
- public String getJobId() {
- return jobId;
- }
-
- public void setJobId(String jobId) {
- this.jobId = jobId;
- }
+ private String status;
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java
index 9e4b4edce3..06f97a8484 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java
@@ -21,118 +21,31 @@
package org.onap.so.beans.nsmf;
import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
import java.io.Serializable;
@JsonInclude(JsonInclude.Include.NON_NULL)
+@Data
public class PerfReqUrllc implements Serializable {
private static final long serialVersionUID = 3133479142915485943L;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int e2eLatency;
+ private String survivalTime;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int jitter;
-
- @JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int survivalTime;
-
- @JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private float csAvailability;
+ private int expDataRate;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private float reliability;
+ private String transferIntervalTarget;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int expDataRate;
-
- private String payloadSize;
+ private String msgSizeByte;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int trafficDensity;
+ private String csReliabilityMeanTime;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int connDensity;
-
- private String serviceAreaDimension;
-
- public int getE2eLatency() {
- return e2eLatency;
- }
-
- public void setE2eLatency(int e2eLatency) {
- this.e2eLatency = e2eLatency;
- }
-
- public int getJitter() {
- return jitter;
- }
-
- public void setJitter(int jitter) {
- this.jitter = jitter;
- }
-
- public int getSurvivalTime() {
- return survivalTime;
- }
-
- public void setSurvivalTime(int survivalTime) {
- this.survivalTime = survivalTime;
- }
-
- public float getReliability() {
- return reliability;
- }
-
- public void setReliability(float reliability) {
- this.reliability = reliability;
- }
-
- public int getExpDataRate() {
- return expDataRate;
- }
-
- public void setExpDataRate(int expDataRate) {
- this.expDataRate = expDataRate;
- }
-
- public String getPayloadSize() {
- return payloadSize;
- }
-
- public void setPayloadSize(String payloadSize) {
- this.payloadSize = payloadSize;
- }
-
- public int getTrafficDensity() {
- return trafficDensity;
- }
-
- public void setTrafficDensity(int trafficDensity) {
- this.trafficDensity = trafficDensity;
- }
-
- public int getConnDensity() {
- return connDensity;
- }
-
- public void setConnDensity(int connDensity) {
- this.connDensity = connDensity;
- }
-
- public String getServiceAreaDimension() {
- return serviceAreaDimension;
- }
-
- public void setServiceAreaDimension(String serviceAreaDimension) {
- this.serviceAreaDimension = serviceAreaDimension;
- }
-
- public float getCsAvailability() {
- return csAvailability;
- }
+ private float csAvailabilityTarget;
- public void setCsAvailability(float csAvailability) {
- this.csAvailability = csAvailability;
- }
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java
index 2456d540ce..17ef210c4e 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java
@@ -31,7 +31,6 @@ public class ResponseDescriptor implements Serializable {
private static final long serialVersionUID = 6330527958947215910L;
- @JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int progress;
private String status;
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
index ad6eec1c01..90cee2794a 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
@@ -25,7 +25,9 @@ import lombok.Data;
import lombok.ToString;
import org.springframework.beans.BeanUtils;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
@Data
@ToString
@@ -43,7 +45,7 @@ public class SliceProfileAdapter implements Serializable {
private String pLMNIdList = "";
@JsonProperty(value = "maxNumberofUEs")
- private long maxNumberofUEs;
+ private int maxNumberOfUEs;
@JsonProperty(value = "coverageAreaTAList")
private String coverageAreaTAList = "";
@@ -52,23 +54,68 @@ public class SliceProfileAdapter implements Serializable {
private int latency;
@JsonProperty(value = "uEMobilityLevel")
- private String uEMobilityLevel;
+ private String ueMobilityLevel;
@JsonProperty(value = "resourceSharingLevel")
private String resourceSharingLevel;
@JsonProperty(value = "maxBandwidth")
- private String bandwidth;
+ private int maxBandwidth;
@JsonProperty(value = "sST")
private String sST;
@JsonProperty(value = "activityFactor")
- private String activityFactor;
+ private int activityFactor;
@JsonProperty(value = "survivalTime")
private String survivalTime;
+ @JsonProperty(value = "expDataRateUL")
+ private int expDataRateUL;
+
+ @JsonProperty(value = "expDataRateDL")
+ private int expDataRateDL;
+
+ @JsonProperty(value = "areaTrafficCapUL")
+ private int areaTrafficCapUL;
+
+ @JsonProperty(value = "areaTrafficCapDL")
+ private int areaTrafficCapDL;
+
+ @JsonProperty(value = "jitter")
+ private int jitter;
+
+ @JsonProperty(value = "csAvailabilityTarget")
+ private float csAvailabilityTarget;
+
+ @JsonProperty(value = "expDataRate")
+ private int expDataRate;
+
+ @JsonProperty(value = "maxNumberofPDUSession")
+ private int maxNumberOfPDUSession;
+
+ @JsonProperty(value = "overallUserDensity")
+ private int overallUserDensity;
+
+ @JsonProperty(value = "cSReliabilityMeanTime")
+ private String csReliabilityMeanTime;
+
+ @JsonProperty(value = "msgSizeByte")
+ private String msgSizeByte;
+
+ @JsonProperty(value = "transferIntervalTarget")
+ private String transferIntervalTarget;
+
+ @JsonProperty(value = "ipAddress")
+ private String ipAddress;
+
+ @JsonProperty(value = "logicInterfaceId")
+ private String logicInterfaceId;
+
+ @JsonProperty(value = "nextHopInfo")
+ private String nextHopInfo;
+
public AnSliceProfile trans2AnProfile() {
AnSliceProfile anSliceProfile = new AnSliceProfile();
BeanUtils.copyProperties(this, anSliceProfile);
@@ -81,16 +128,16 @@ public class SliceProfileAdapter implements Serializable {
areasRes[i] = str2Code(areas[i]);
}
anSliceProfile.setCoverageAreaTAList(Arrays.asList(areasRes));
- anSliceProfile.setUEMobilityLevel(UeMobilityLevel.fromString(this.uEMobilityLevel));
+
+ anSliceProfile.setUeMobilityLevel(UeMobilityLevel.fromString(this.ueMobilityLevel));
anSliceProfile.setResourceSharingLevel(ResourceSharingLevel.fromString(this.resourceSharingLevel));
- PerfReq perfReq = new PerfReq();
- // todo
- anSliceProfile.setPerfReq(perfReq);
+ anSliceProfile.setPerfReq(generatePerfReq());
+
return anSliceProfile;
}
private Integer str2Code(String area) {
- return Math.abs(area.hashCode() >> 16);
+ return area.hashCode() >> 16;
}
public CnSliceProfile trans2CnProfile() {
@@ -98,15 +145,31 @@ public class SliceProfileAdapter implements Serializable {
BeanUtils.copyProperties(this, cnSliceProfile);
cnSliceProfile.setSnssaiList(Arrays.asList(this.sNSSAIList.split("\\|")));
cnSliceProfile.setCoverageAreaTAList(Arrays.asList(this.coverageAreaTAList.split("\\|")));
- cnSliceProfile.setPlmnIdList(Arrays.asList(this.pLMNIdList.split("\\|")));
+ cnSliceProfile.setPLMNIdList(Arrays.asList(this.pLMNIdList.split("\\|")));
cnSliceProfile.setResourceSharingLevel(ResourceSharingLevel.fromString(this.resourceSharingLevel));
- cnSliceProfile.setUeMobilityLevel(UeMobilityLevel.fromString(this.uEMobilityLevel));
- PerfReq perfReq = new PerfReq();
- // todo
- cnSliceProfile.setPerfReq(perfReq);
+
+ cnSliceProfile.setPerfReq(generatePerfReq());
return cnSliceProfile;
}
+ private PerfReq generatePerfReq() {
+ PerfReq perfReq = new PerfReq();
+ if ("embb".equalsIgnoreCase(sST)) {
+ List<PerfReqEmbb> perfReqEmbbs = new ArrayList<>();
+ PerfReqEmbb perfReqEmbb = new PerfReqEmbb();
+ BeanUtils.copyProperties(this, perfReqEmbb);
+ perfReqEmbbs.add(perfReqEmbb);
+ perfReq.setPerfReqEmbbList(perfReqEmbbs);
+ } else if ("ullc".equalsIgnoreCase(sST)) {
+ List<PerfReqUrllc> perfReqUrllcs = new ArrayList<>();
+ PerfReqUrllc perfReqUrllc = new PerfReqUrllc();
+ BeanUtils.copyProperties(this, perfReqUrllc);
+ perfReqUrllcs.add(perfReqUrllc);
+ perfReq.setPerfReqUrllcList(perfReqUrllcs);
+ }
+ return perfReq;
+ }
+
public TnSliceProfile trans2TnProfile() {
TnSliceProfile tnSliceProfile = new TnSliceProfile();
BeanUtils.copyProperties(this, tnSliceProfile);
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
index 9b6406d57f..18d6007176 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java
@@ -52,4 +52,6 @@ public class SliceTaskInfo<T> implements Serializable {
private SubnetType subnetType;
+ private String endPointId;
+
}
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 3f0da1bf21..f904e1c466 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
@@ -35,14 +35,17 @@ public class TnSliceProfile implements Serializable {
private String sliceProfileId;
@JsonProperty(value = "maxBandwidth")
- private String bandwidth;
+ private int maxBandwidth;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int latency;
- @JsonProperty(value = "sNSSAIList", required = true)
+ @JsonProperty(value = "snssaiList", required = true)
private List<String> sNSSAIList;
- @JsonProperty(value = "pLMNIdList", required = true)
+ @JsonProperty(value = "plmnIdList", required = true)
private List<String> pLMNIdList;
+
+ @JsonProperty(value = "jitter")
+ private int jitter;
}