New attributes are added according to the standard and fixed TN allocate response 10/115410/19
authorhetengjiao <hetengjiao@chinamobile.com>
Thu, 26 Nov 2020 03:02:42 +0000 (11:02 +0800)
committerhetengjiao <hetengjiao@chinamobile.com>
Thu, 26 Nov 2020 11:30:42 +0000 (19:30 +0800)
Issue-ID: SO-2963

Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: I4a2dfccbfa9dcdbe93d50a03b307061dca45c81a

19 files changed:
adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json
adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java
common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java
common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java
common/src/main/java/org/onap/so/beans/nsmf/CnSliceProfile.java
common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java
common/src/main/java/org/onap/so/beans/nsmf/NssiResponse.java
common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java
common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java
common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java
common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java

index fb880a9..0456c90 100644 (file)
@@ -173,8 +173,6 @@ public abstract class BaseNssmfManager implements NssmfManager {
 
         logger.info("Query operations: nsiId = [{}], jobId = [{}], serviceUuid = [{}]", nsiId, jobId, serviceUuid);
 
-        ResourceOperationStatus status = new ResourceOperationStatus(nsiId, jobId, serviceUuid);
-
         List<ResourceOperationStatus> resourceOperationStatuses =
                 repository.findByServiceIdAndOperationId(nsiId, jobId);
 
index 4b0e98e..7ec6c0f 100644 (file)
@@ -235,6 +235,8 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
         status.setOperType(actionType.toString());
         status.setProgress("0");
 
+        response.setStatus(STARTED.toString());
+        restResponse.setResponseContent(marshal(response));
         updateDbStatus(status, restResponse.getStatus(), STARTED, NssmfAdapterUtil.getStatusDesc(actionType));
     }
 }
index e89160c..64ab199 100644 (file)
@@ -66,19 +66,20 @@ public abstract class InternalNssmfManager extends BaseNssmfManager {
     }
 
     private RestResponse responseDBStatus(ResourceOperationStatus status) throws ApplicationException {
+        JobStatusResponse statusResponse = new JobStatusResponse();
         ResponseDescriptor descriptor = new ResponseDescriptor();
         if (status == null) {
             descriptor.setProgress(0);
             descriptor.setStatus(PROCESSING.name());
             descriptor.setStatusDescription("Initiating Nssi Instance");
-            return restUtil.createResponse(200, marshal(descriptor));
+        } else {
+            descriptor.setStatus(status.getStatus());
+            descriptor.setStatusDescription(status.getStatusDescription());
+            descriptor.setProgress(Integer.parseInt(status.getProgress()));
+            descriptor.setNssiId(status.getResourceInstanceID());
         }
-        descriptor.setStatus(status.getStatus());
-        descriptor.setStatusDescription(status.getStatusDescription());
-        descriptor.setProgress(Integer.parseInt(status.getProgress()));
-        descriptor.setNssiId(status.getResourceInstanceID());
-        // descriptor.setResponseId(status.getOperationId());
-        return restUtil.createResponse(200, marshal(descriptor));
+        statusResponse.setResponseDescriptor(descriptor);
+        return restUtil.createResponse(200, marshal(statusResponse));
     }
 
     @Override
index 8db5216..8753e85 100644 (file)
@@ -1,19 +1,10 @@
 {
   "AN": {
-    "latency": "5",
+    "latency": 5,
     "maxNumberofUEs": "100"
   },
   "CN": {
-    "latency": "10",
+    "latency": 5,
     "maxNumberofConns": "100"
-  },
-  "TN_FH": {
-    "latency": "10"
-  },
-  "TN_MH": {
-    "latency": "5"
-  },
-  "TN_BH": {
-    "latency": "10"
   }
 }
index f150f47..f78bfd2 100644 (file)
@@ -78,6 +78,7 @@ public class NssmfAdapterRestTest {
             + "    \"networkType\" : \"cn\"\n" + "  },\n" + "  \"allocateCnNssi\" : {\n"
             + "    \"nssiId\" : \"NSST-C-001-HDBNJ-NSSMF-01-A-ZX\",\n" + "    \"nssiName\" : \"eMBB-001\",\n"
             + "    \"sliceProfile\" : {\n" + "      \"snssaiList\" : [ \"001-100001\" ],\n"
+            + "      \"maxNumberofPDUSession\" : 10,\n"
             + "      \"sliceProfileId\" : \"ab9af40f13f721b5f13539d87484098\",\n"
             + "      \"plmnIdList\" : [ \"460-00\", \"460-01\" ],\n" + "      \"perfReq\" : {\n"
             + "        \"perfReqEmbbList\" : [ {\n" + "          \"activityFactor\" : 50\n" + "        } ]\n"
@@ -315,12 +316,13 @@ public class NssmfAdapterRestTest {
         taList.add("3");
         sP.setSnssaiList(sns);
         sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098");
-        sP.setPlmnIdList(plmn);
+        sP.setPLMNIdList(plmn);
         sP.setPerfReq(perfReq);
-        sP.setMaxNumberofUEs(200);
+        sP.setMaxNumberOfUEs(200);
         sP.setCoverageAreaTAList(taList);
         sP.setLatency(6);
         sP.setResourceSharingLevel(NON_SHARED);
+        sP.setMaxNumberOfPDUSession(10);
         NsiInfo nsiInfo = new NsiInfo();
         nsiInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
         nsiInfo.setNsiName("eMBB-001");
index 68adf80..d7b3b03 100644 (file)
@@ -204,9 +204,9 @@ public class NssmfManagerServiceImplTest {
         taList.add("3");
         sP.setSnssaiList(sns);
         sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098");
-        sP.setPlmnIdList(plmn);
+        sP.setPLMNIdList(plmn);
         sP.setPerfReq(perfReq);
-        sP.setMaxNumberofUEs(200);
+        sP.setMaxNumberOfUEs(200);
         sP.setCoverageAreaTAList(taList);
         sP.setLatency(6);
         sP.setResourceSharingLevel(NON_SHARED);
index fac8871..1f3cf6e 100644 (file)
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import org.onap.so.beans.nsmf.ConnectionLink
+import org.onap.so.beans.nsmf.EndPoint
 import org.onap.so.beans.nsmf.NsiInfo
 import org.onap.so.beans.nsmf.SliceProfileAdapter
+import org.onap.so.beans.nsmf.TransportSliceNetwork
 import org.onap.so.beans.nsmf.oof.SubnetType
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import javax.ws.rs.NotFoundException
@@ -328,6 +331,12 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
         NsiInfo nsiInfo = new NsiInfo()
         nsiInfo.nsiId = sliceParams.suggestNsiId
         allocateAnNssi.nsiInfo = nsiInfo
+        //endPoint
+        EndPoint endPoint = new EndPoint()
+        endPoint.setIpAddress(sliceTaskInfo.sliceProfile.ipAddress)
+        endPoint.setLogicInterfaceId(sliceTaskInfo.sliceProfile.logicInterfaceId)
+        endPoint.setNextHopInfo(sliceTaskInfo.sliceProfile.nextHopInfo)
+        allocateAnNssi.setEndPoint(endPoint)
 
         EsrInfo esrInfo = new EsrInfo()
         //todo: vendor and network
@@ -442,6 +451,12 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
         NsiInfo nsiInfo = new NsiInfo()
         nsiInfo.nsiId = sliceParams.suggestNsiId
         allocateCnNssi.nsiInfo = nsiInfo
+        // endPoint
+        EndPoint endPoint = new EndPoint()
+        endPoint.setIpAddress(sliceTaskInfo.sliceProfile.ipAddress)
+        endPoint.setLogicInterfaceId(sliceTaskInfo.sliceProfile.logicInterfaceId)
+        endPoint.setNextHopInfo(sliceTaskInfo.sliceProfile.nextHopInfo)
+        allocateCnNssi.setEndPoint(endPoint)
 
         EsrInfo esrInfo = new EsrInfo()
         //todo: vendor and network
@@ -552,8 +567,18 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
 
         AllocateTnNssi allocateTnNssi = new AllocateTnNssi()
         //todo: AllocateTnNssi
-        //todo: endpointId -> set into tn
-        allocateTnNssi.setTransportSliceNetworks()
+        //todo: endPointId -> set into tn
+        List<TransportSliceNetwork> transportSliceNetworks = new ArrayList<>()
+        TransportSliceNetwork transportSliceNetwork = new TransportSliceNetwork()
+        List<ConnectionLink> connectionLinks = new ArrayList<>()
+        ConnectionLink connectionLink = new ConnectionLink()
+        connectionLink.setTransportEndpointA(sliceParams.anSliceTaskInfo.endPointId)
+        connectionLink.setTransportEndpointB(sliceParams.cnSliceTaskInfo.endPointId)
+        connectionLinks.add(connectionLink)
+        transportSliceNetwork.setConnectionLinks(connectionLinks)
+        transportSliceNetworks.add(transportSliceNetwork)
+        allocateTnNssi.setTransportSliceNetworks(transportSliceNetworks)
+
         allocateTnNssi.setNetworkSliceInfos()
         allocateTnNssi.setSliceProfile(sliceTaskInfo.sliceProfile.trans2TnProfile())
         NsiInfo nsiInfo = new NsiInfo()
@@ -607,7 +632,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
         String sliceProfileInstanceId = sliceParams.anSliceTaskInfo.sliceInstanceId
         String serviceProfileInstanceId = sliceParams.serviceId
         //nsi id
-        //todo: aai -> nssi -> relationship -> endpointId -> set into tn
+        //todo: aai -> nssi -> relationship -> endPointId -> set into tn
         String endPointId = getEndpointIdFromAAI(execution, nssiId)
         execution.setVariable("endPointIdAn", endPointId)
 
@@ -641,7 +666,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
         String sliceProfileInstanceId = sliceParams.cnSliceTaskInfo.sliceInstanceId
         String serviceProfileInstanceId = sliceParams.serviceId
         //nsi id
-        //todo: aai -> nssi -> relationship -> endpointId -> set into tn
+        //todo: aai -> nssi -> relationship -> endPointId -> set into tn
         String endPointId = getEndpointIdFromAAI(execution, nssiId)
         execution.setVariable("endPointIdCn", endPointId)
 
@@ -685,7 +710,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
                 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
             } else {
                 ServiceInstance nssiInstance = si.get()
-                //todo: handle relationship and return endpointId
+                //todo: handle relationship and return endPointId
                 if (nssiInstance.relationshipList == null) {
                     String msg = "relationshipList of " + nssiId + " is null"
                     logger.debug(msg)
index 896d7ff..c47bd85 100644 (file)
@@ -119,8 +119,9 @@ class DoAllocateNSSI extends AbstractServiceTaskProcessor {
 
         SliceTaskInfo sliceTaskInfo = execution.getVariable("sliceTaskInfo") as SliceTaskInfo
         sliceTaskInfo.progress = response.getProgress()
-        sliceTaskInfo.status = response.getStatus()
+        sliceTaskInfo.status = response.getStatus().toLowerCase()
         sliceTaskInfo.statusDescription = response.getStatusDescription()
+        sliceTaskInfo.endPointId = response.getEndPointId()
         updateNssiResult(sliceParams, subnetType, sliceTaskInfo)
 
         String paramJson = sliceParams.convertToJson()
index dc8e691..f966098 100644 (file)
@@ -47,5 +47,5 @@ public class AllocateAnNssi implements Serializable {
 
     private NsiInfo nsiInfo;
 
-    private Map<String, Object> endPoint;
+    private EndPoint endPoint;
 }
index f5b926f..fdbff2f 100644 (file)
@@ -49,5 +49,5 @@ public class AllocateCnNssi implements Serializable {
 
     private NsiInfo nsiInfo;
 
-    private Map<String, Object> endPoint;
+    private EndPoint endPoint;
 }
index 14918c7..8000ca2 100644 (file)
@@ -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;
index 3a45119..efb447b 100644 (file)
@@ -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;
+
 }
index dab9b3a..90bfc0e 100644 (file)
 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;
 }
index 92acdaa..270a55e 100644 (file)
 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;
 }
index 9e4b4ed..06f97a8 100644 (file)
 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;
-    }
 }
index 2456d54..17ef210 100644 (file)
@@ -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;
index ad6eec1..90cee27 100644 (file)
@@ -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);
index 9b6406d..18d6007 100644 (file)
@@ -52,4 +52,6 @@ public class SliceTaskInfo<T> implements Serializable {
 
     private SubnetType subnetType;
 
+    private String endPointId;
+
 }
index 3f0da1b..f904e1c 100644 (file)
@@ -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;
 }