aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java2
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java4
-rw-r--r--adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java8
-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/DoAllocateNSSI.groovy20
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java47
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java7
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java3
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java12
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbb.java (renamed from common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbbList.java)13
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java (renamed from common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllcList.java)2
11 files changed, 90 insertions, 32 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
index e762bc04e8..28789f2a98 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
@@ -50,7 +50,7 @@ public class NssmfAdapterConsts {
private final static String EXTERNAL_TN_DEALLOCATE_URL =
"/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles/{sliceProfileId}";
- private final static String EXTERNAL_AN_DEALLOCATE_URL = "/ObjectManagement/NSS/SliceProfiles/{SliceProfileId}";
+ private final static String EXTERNAL_AN_DEALLOCATE_URL = "/ObjectManagement/NSS/SliceProfiles/{sliceProfileId}";
private final static String INTERNAL_DEALLOCATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/deAllocate";
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
index 0d2f2dfdeb..ef979a660f 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
@@ -41,7 +41,9 @@ public class ExternalAnNssmfManager extends ExternalNssmfManager {
@Override
protected String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return marshal(nbiRequest.getAllocateAnNssi().getSliceProfile());
+ Map<String, Object> request = new HashMap<>();
+ request.put("attributeListIn", nbiRequest.getAllocateAnNssi().getSliceProfile());
+ return marshal(request);
}
@Override
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 a9c732e6e3..67cd913b3e 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
@@ -54,7 +54,7 @@ import org.onap.so.beans.nsmf.NssiAllocateRequest;
import org.onap.so.beans.nsmf.NssiDeAllocateRequest;
import org.onap.so.beans.nsmf.NssiResponse;
import org.onap.so.beans.nsmf.PerfReq;
-import org.onap.so.beans.nsmf.PerfReqEmbbList;
+import org.onap.so.beans.nsmf.PerfReqEmbb;
import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
@@ -289,7 +289,7 @@ public class NssmfAdapterRestTest {
assertEquals(all.getAllocateCnNssi().getSliceProfile().getResourceSharingLevel(), NON_SHARED);
assertNotNull(all.getAllocateCnNssi().getSliceProfile().getPerfReq());
assertNotNull(all.getAllocateCnNssi().getSliceProfile().getPerfReq().getPerfReqEmbbList());
- PerfReqEmbbList embb =
+ PerfReqEmbb embb =
all.getAllocateCnNssi().getSliceProfile().getPerfReq().getPerfReqEmbbList().iterator().next();
assertNotNull(embb);
assertEquals(embb.getActivityFactor(), 50);
@@ -302,9 +302,9 @@ public class NssmfAdapterRestTest {
List<String> plmn = new LinkedList<>();
plmn.add("460-00");
plmn.add("460-01");
- PerfReqEmbbList embb = new PerfReqEmbbList();
+ PerfReqEmbb embb = new PerfReqEmbb();
embb.setActivityFactor(50);
- List<PerfReqEmbbList> embbList = new LinkedList<>();
+ List<PerfReqEmbb> embbList = new LinkedList<>();
embbList.add(embb);
PerfReq perfReq = new PerfReq();
perfReq.setPerfReqEmbbList(embbList);
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 3108ade5a6..4a659e1ca3 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
@@ -191,9 +191,9 @@ public class NssmfManagerServiceImplTest {
List<String> plmn = new LinkedList<>();
plmn.add("460-00");
plmn.add("460-01");
- PerfReqEmbbList embb = new PerfReqEmbbList();
+ PerfReqEmbb embb = new PerfReqEmbb();
embb.setActivityFactor(50);
- List<PerfReqEmbbList> embbList = new LinkedList<>();
+ List<PerfReqEmbb> embbList = new LinkedList<>();
embbList.add(embb);
PerfReq perfReq = new PerfReq();
perfReq.setPerfReqEmbbList(embbList);
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 081dddab99..88edd79d6d 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
@@ -15,8 +15,8 @@ import org.onap.so.beans.nsmf.NetworkType
import org.onap.so.beans.nsmf.NsiInfo
import org.onap.so.beans.nsmf.NssiAllocateRequest
import org.onap.so.beans.nsmf.PerfReq
-import org.onap.so.beans.nsmf.PerfReqEmbbList
-import org.onap.so.beans.nsmf.PerfReqUrllcList
+import org.onap.so.beans.nsmf.PerfReqEmbb
+import org.onap.so.beans.nsmf.PerfReqUrllc
import org.onap.so.beans.nsmf.ResourceSharingLevel
import org.onap.so.beans.nsmf.SliceTaskParams
import org.onap.so.beans.nsmf.TnSliceProfile
@@ -411,20 +411,20 @@ class DoAllocateNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTask
execution.setVariable("esrInfo",esrInfo)
- PerfReqEmbbList perfReqEmbb = new PerfReqEmbbList()
+ PerfReqEmbb perfReqEmbb = new PerfReqEmbb()
perfReqEmbb.setActivityFactor(sliceProfileCn.get("activityFactor"))
perfReqEmbb.setAreaTrafficCapDL(sliceProfileCn.get("areaTrafficCapDL"))
perfReqEmbb.setAreaTrafficCapUL(sliceProfileCn.get("areaTrafficCapUL"))
perfReqEmbb.setExpDataRateDL(sliceProfileCn.get("expDataRateDL"))
perfReqEmbb.setExpDataRateUL(sliceProfileCn.get("expDataRateUL"))
- List<PerfReqEmbbList> listPerfReqEmbbList = new ArrayList<>()
+ List<PerfReqEmbb> listPerfReqEmbbList = new ArrayList<>()
listPerfReqEmbbList.add(perfReqEmbb)
PerfReq perfReq = new PerfReq()
perfReq.setPerfReqEmbbList(listPerfReqEmbbList)
- PerfReqUrllcList perfReqUrllc = new PerfReqUrllcList()
+ PerfReqUrllc perfReqUrllc = new PerfReqUrllc()
perfReqUrllc.setConnDensity(0)
perfReqUrllc.setTrafficDensity(0)
perfReqUrllc.setExpDataRate(0)
@@ -436,7 +436,7 @@ class DoAllocateNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTask
perfReqUrllc.setPayloadSize("0")
perfReqUrllc.setServiceAreaDimension("")
- List<PerfReqUrllcList> perfReqUrllcList = new ArrayList<>()
+ List<PerfReqUrllc> perfReqUrllcList = new ArrayList<>()
perfReqUrllcList.add(perfReqUrllc)
perfReq.setPerfReqUrllcList(perfReqUrllcList)
@@ -558,20 +558,20 @@ class DoAllocateNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTask
execution.setVariable("esrInfo",esrInfo)
- PerfReqEmbbList perfReqEmbb = new PerfReqEmbbList()
+ PerfReqEmbb perfReqEmbb = new PerfReqEmbb()
perfReqEmbb.setActivityFactor(sliceProfileCn.get("activityFactor"))
perfReqEmbb.setAreaTrafficCapDL(sliceProfileCn.get("areaTrafficCapDL"))
perfReqEmbb.setAreaTrafficCapUL(sliceProfileCn.get("areaTrafficCapUL"))
perfReqEmbb.setExpDataRateDL(sliceProfileCn.get("expDataRateDL"))
perfReqEmbb.setExpDataRateUL(sliceProfileCn.get("expDataRateUL"))
- List<PerfReqEmbbList> listPerfReqEmbbList = new ArrayList<>()
+ List<PerfReqEmbb> listPerfReqEmbbList = new ArrayList<>()
listPerfReqEmbbList.add(perfReqEmbb)
PerfReq perfReq = new PerfReq()
perfReq.setPerfReqEmbbList(listPerfReqEmbbList)
- PerfReqUrllcList perfReqUrllc = new PerfReqUrllcList()
+ PerfReqUrllc perfReqUrllc = new PerfReqUrllc()
perfReqUrllc.setConnDensity(0)
perfReqUrllc.setTrafficDensity(0)
perfReqUrllc.setExpDataRate(0)
@@ -583,7 +583,7 @@ class DoAllocateNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTask
perfReqUrllc.setPayloadSize("0")
perfReqUrllc.setServiceAreaDimension("")
- List<PerfReqUrllcList> perfReqUrllcList = new ArrayList<>()
+ List<PerfReqUrllc> perfReqUrllcList = new ArrayList<>()
perfReqUrllcList.add(perfReqUrllc)
perfReq.setPerfReqUrllcList(perfReqUrllcList)
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java b/common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java
new file mode 100644
index 0000000000..418f8a5065
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.beans.nsmf;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AnPerfReq {
+
+ private PerfReqEmbb perfReqEmbb;
+
+ private PerfReqUrllc perfReqUrllc;
+
+ public PerfReqEmbb getPerfReqEmbb() {
+ return perfReqEmbb;
+ }
+
+ public void setPerfReqEmbb(PerfReqEmbb perfReqEmbb) {
+ this.perfReqEmbb = perfReqEmbb;
+ }
+
+ public PerfReqUrllc getPerfReqUrllc() {
+ return perfReqUrllc;
+ }
+
+ public void setPerfReqUrllc(PerfReqUrllc perfReqUrllc) {
+ this.perfReqUrllc = perfReqUrllc;
+ }
+}
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 653f9ac495..26c3c0012a 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,7 +21,6 @@
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;
@@ -33,17 +32,17 @@ public class AnSliceProfile {
private String sliceProfileId;
- private List<String> coverageAreaTAList;
+ private List<Integer> coverageAreaTAList;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int latency;
private List<String> pLMNIdList;
- private PerfReq perfReq;
+ private AnPerfReq perfReq;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
- private int maxNumberofUEs;
+ private long maxNumberofUEs;
private UeMobilityLevel uEMobilityLevel;
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java b/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java
index 7061ec2ff3..a44dbd636f 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java
@@ -24,15 +24,14 @@ import lombok.Data;
import java.io.Serializable;
+@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class NssmfAdapterNBIRequest implements Serializable {
private static final long serialVersionUID = -454145891489457960L;
- @JsonInclude(JsonInclude.Include.NON_NULL)
private EsrInfo esrInfo;
- @JsonInclude(JsonInclude.Include.NON_NULL)
private ServiceInfo serviceInfo;
private AllocateCnNssi allocateCnNssi;
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java
index 4aabc3f26f..c67f193a02 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java
@@ -26,23 +26,23 @@ import java.util.List;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PerfReq {
- private List<PerfReqEmbbList> perfReqEmbbList;
+ private List<PerfReqEmbb> perfReqEmbbList;
- private List<PerfReqUrllcList> perfReqUrllcList;
+ private List<PerfReqUrllc> perfReqUrllcList;
- public List<PerfReqEmbbList> getPerfReqEmbbList() {
+ public List<PerfReqEmbb> getPerfReqEmbbList() {
return perfReqEmbbList;
}
- public void setPerfReqEmbbList(List<PerfReqEmbbList> perfReqEmbbList) {
+ public void setPerfReqEmbbList(List<PerfReqEmbb> perfReqEmbbList) {
this.perfReqEmbbList = perfReqEmbbList;
}
- public List<PerfReqUrllcList> getPerfReqUrllcList() {
+ public List<PerfReqUrllc> getPerfReqUrllcList() {
return perfReqUrllcList;
}
- public void setPerfReqUrllcList(List<PerfReqUrllcList> perfReqUrllcList) {
+ public void setPerfReqUrllcList(List<PerfReqUrllc> perfReqUrllcList) {
this.perfReqUrllcList = perfReqUrllcList;
}
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbbList.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbb.java
index 9e9fcaa19e..bce0d56f9a 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbbList.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbb.java
@@ -23,7 +23,7 @@ package org.onap.so.beans.nsmf;
import com.fasterxml.jackson.annotation.JsonInclude;
@JsonInclude(JsonInclude.Include.NON_NULL)
-public class PerfReqEmbbList {
+public class PerfReqEmbb {
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int expDataRateDL;
@@ -38,6 +38,9 @@ public class PerfReqEmbbList {
private int areaTrafficCapUL;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
+ private int overallUserDensity;
+
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int activityFactor;
public int getExpDataRateDL() {
@@ -72,6 +75,14 @@ public class PerfReqEmbbList {
this.areaTrafficCapUL = areaTrafficCapUL;
}
+ public int getOverallUserDensity() {
+ return overallUserDensity;
+ }
+
+ public void setOverallUserDensity(int overallUserDensity) {
+ this.overallUserDensity = overallUserDensity;
+ }
+
public int getActivityFactor() {
return activityFactor;
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllcList.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java
index 00f0a917aa..0b05d39bab 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllcList.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java
@@ -23,7 +23,7 @@ package org.onap.so.beans.nsmf;
import com.fasterxml.jackson.annotation.JsonInclude;
@JsonInclude(JsonInclude.Include.NON_NULL)
-public class PerfReqUrllcList {
+public class PerfReqUrllc {
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int e2eLatency;