aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhetengjiao <hetengjiao@chinamobile.com>2021-03-19 09:25:28 +0800
committerhetengjiao <hetengjiao@chinamobile.com>2021-03-19 09:27:57 +0800
commit0aa4554468e86d8b2f1d855f608069695febeef7 (patch)
tree0086240c3c5fed0a57a1a1c3a5a1e1012b92daf5
parent10add89694eb04da38e80fd6eb26c369149570ec (diff)
Add resourceShareLevel in tn
Issue-ID: SO-3381 Signed-off-by: hetengjiao <hetengjiao@chinamobile.com> Change-Id: I3d3826615d05272a01e36a4f7001ada24ee3ea61
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy11
-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/TnSliceProfile.java3
3 files changed, 8 insertions, 9 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
index e5d390e2aa..ba87614937 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
@@ -275,8 +275,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
execution.setVariable("sliceTaskParams", sliceTaskParams)
- String paramJson = sliceTaskParams.convertToJson()
- execution.setVariable("CSSOT_paramJson", paramJson)
+ execution.setVariable("CSSOT_paramJson", objectMapper.writeValueAsString(sliceTaskParams))
logger.debug("Finish createOrchestrationTask")
}
@@ -372,9 +371,9 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
String taskStatus = execution.getVariable("taskStatus")
SliceTaskParamsAdapter sliceTaskParams =
execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
- String paramJson = sliceTaskParams.convertToJson()
+
execution.setVariable("CSSOT_status", taskStatus)
- execution.setVariable("CSSOT_paramJson", paramJson)
+ execution.setVariable("CSSOT_paramJson", objectMapper.writeValueAsString(sliceTaskParams))
execution.setVariable("CSSOT_requestMethod", requestMethod)
logger.debug("Finish prepareUpdateOrchestrationTask")
}
@@ -402,10 +401,8 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
String paramJson = orchestrationTask.getParams()
logger.debug("paramJson: " + paramJson)
- SliceTaskParamsAdapter sliceTaskParams =
- execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
+ SliceTaskParamsAdapter sliceTaskParams = objectMapper.readValue(paramJson, SliceTaskParamsAdapter.class)
- sliceTaskParams.convertFromJson(paramJson)
execution.setVariable("sliceTaskParams", sliceTaskParams)
logger.debug("Finish processUserOptions")
}
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 e88b1c747f..a784cbee6e 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
@@ -131,8 +131,7 @@ class DoAllocateNSSI extends AbstractServiceTaskProcessor {
sliceTaskInfo.statusDescription = response.getStatusDescription()
updateNssiResult(sliceParams, subnetType, sliceTaskInfo)
- String paramJson = sliceParams.convertToJson()
- execution.setVariable("CSSOT_paramJson", paramJson)
+ execution.setVariable("CSSOT_paramJson", objectMapper.writeValueAsString(sliceParams))
execution.setVariable("CSSOT_requestMethod", requestMethod)
execution.setVariable("sliceTaskParams", sliceParams)
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 f904e1c466..50f0e3d8ce 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
@@ -48,4 +48,7 @@ public class TnSliceProfile implements Serializable {
@JsonProperty(value = "jitter")
private int jitter;
+
+ @JsonProperty(value = "resourceSharingLevel")
+ private ResourceSharingLevel resourceSharingLevel;
}