summaryrefslogtreecommitdiffstats
path: root/common/src
diff options
context:
space:
mode:
authorhetengjiao <hetengjiao@chinamobile.com>2020-09-25 16:17:33 +0800
committerhetengjiao <hetengjiao@chinamobile.com>2020-09-25 16:18:15 +0800
commit3e4d7035ff7fc105465840bfaec14da47f64b3aa (patch)
treeb2fd30b4e6d773cca3258ce91e899835318ac5a6 /common/src
parent2505a543b0e45c1c3c2fe2fb8b85664b08bf2fca (diff)
Update NSMF workflow of allocate
Issue-ID: SO-2963 Signed-off-by: hetengjiao <hetengjiao@chinamobile.com> Change-Id: I4ab9272501a76c93e1c56d4bf0ed646699363ecb
Diffstat (limited to 'common/src')
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java12
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java12
2 files changed, 18 insertions, 6 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
index 87de04a6ee..6ad752f047 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
@@ -19,12 +19,16 @@
*/
package org.onap.so.beans.nsmf;
-import lombok.Data;
+import lombok.*;
import org.onap.so.beans.nsmf.oof.TemplateInfo;
import java.util.Map;
@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString
+@Builder
public class SliceTaskParamsAdapter {
private static final long serialVersionUID = -7785578865170503301L;
@@ -53,4 +57,10 @@ public class SliceTaskParamsAdapter {
private SliceTaskInfo<CnSliceProfile> cnSliceTaskInfo;
private SliceTaskInfo<AnSliceProfile> anSliceTaskInfo;
+
+ public String convertToJson() {
+ SliceTaskParams sliceTaskParams = new SliceTaskParams();
+ sliceTaskParams.setServiceId(serviceId);
+ return sliceTaskParams.convertToJson();
+ }
}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java
index 7cfb60c113..96c5b343fd 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java
@@ -19,17 +19,19 @@
*/
package org.onap.so.beans.nsmf.oof;
-import lombok.Data;
-import org.onap.so.beans.nsmf.ServiceProfile;
+import lombok.*;
import java.io.Serializable;
-import java.util.Map;
@Data
-public class NssiReqBody implements Serializable {
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString
+@Builder
+public class NssiReqBody<T> implements Serializable {
private static final long serialVersionUID = -76327522074333341L;
- private Map<String, Object> serviceProfile;
+ private T sliceProfile;
private RequestInfo requestInfo;