aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java2
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java2
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java15
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json13
-rw-r--r--adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java6
-rw-r--r--adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy35
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy3
-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
19 files changed, 170 insertions, 167 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
index fb880a91e3..0456c90fae 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
@@ -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);
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
index 4b0e98e8ec..7ec6c0f9e1 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
@@ -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));
}
}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
index e89160c4ae..64ab199bc1 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
@@ -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
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json b/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json
index 8db52168ae..8753e85ea2 100644
--- a/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json
+++ b/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json
@@ -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"
}
}
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
index f150f47f4f..f78bfd297a 100644
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
+++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
@@ -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");
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
index 68adf8073b..d7b3b03333 100644
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
+++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
@@ -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);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
index fac8871b52..1f3cf6ed52 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
@@ -20,8 +20,11 @@
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)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
index 896d7ff4b1..c47bd85679 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
@@ -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()
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;
}