From 826b92463401b16719144c6494e4454cb2252584 Mon Sep 17 00:00:00 2001 From: romaingimbert Date: Mon, 23 Apr 2018 16:50:36 +0200 Subject: add field in SO Request - add modelVersionId Change-Id: I19796ed16b1fe7c1937aad037f71a8374e85f50d Issue-ID: EXTAPI-65 Signed-off-by: romaingimbert --- .../serviceorder/model/consumer/ModelInfo.java | 24 ++++++++++++++++++---- .../serviceorder/workflow/SOTaskProcessor.java | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java index 3479f85..bef4183 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java @@ -21,6 +21,8 @@ public class ModelInfo { private String modelInvariantId; + private String modelVersionId; + private String modelNameVersionId; private String modelName; @@ -87,11 +89,25 @@ public class ModelInfo { this.modelCustomizationId = modelCustomizationId; } + public String getModelVersionId() { + return modelVersionId; + } + + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + @Override public String toString() { - return "ModelInfo{" + "modelType='" + modelType + '\'' + ", modelInvariantId='" + modelInvariantId + '\'' - + ", modelNameVersionId='" + modelNameVersionId + '\'' + ", modelName='" + modelName + '\'' - + ", modelVersion='" + modelVersion + '\'' + ", modelCustomizationName='" + modelCustomizationName - + '\'' + ", modelCustomizationId='" + modelCustomizationId + '\'' + '}'; + return "ModelInfo{" + + "modelType='" + modelType + '\'' + + ", modelInvariantId='" + modelInvariantId + '\'' + + ", modelVersionId='" + modelVersionId + '\'' + + ", modelNameVersionId='" + modelNameVersionId + '\'' + + ", modelName='" + modelName + '\'' + + ", modelVersion='" + modelVersion + '\'' + + ", modelCustomizationName='" + modelCustomizationName + '\'' + + ", modelCustomizationId='" + modelCustomizationId + '\'' + + '}'; } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java index 84a198c..0821e82 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java @@ -257,6 +257,7 @@ public class SOTaskProcessor { modelInfo.setModelType("service"); modelInfo.setModelInvariantId((String) sdcInfos.get("invariantUUID")); modelInfo.setModelNameVersionId(orderItem.getService().getServiceSpecification().getId()); + modelInfo.setModelVersionId(orderItem.getService().getServiceSpecification().getId()); modelInfo.setModelName((String) sdcInfos.get("name")); modelInfo.setModelVersion((String) sdcInfos.get("version")); requestDetails.setModelInfo(modelInfo); -- cgit 1.2.3-korg