summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorEnbo Wang <wangenbo@huawei.com>2020-03-14 20:19:13 +0800
committerEnbo Wang <wangenbo@huawei.com>2020-03-14 21:48:05 +0800
commite76bd8a61816cac18841f7b08c99f9047154697c (patch)
tree408dc3f49db2945465c9bbcba33c7b5765f24ba5 /bpmn/MSOCommonBPMN/src/main
parent7e2f7db5b4007fe470a7ce5794c88d1844021410 (diff)
Update parameter parsing of SDNC LCM client
Issue-ID: SO-2731 Signed-off-by: Enbo Wang <wangenbo@huawei.com> Change-Id: I4cb8b9d4efb7e3e78e7e242c04b316908987d9d7
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java6
5 files changed, 11 insertions, 17 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java
index 0f17c547b5..333bf80d6c 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java
@@ -48,8 +48,6 @@ public class SDNCLcmClientBuilder {
try {
String path = sdncLcmProperties.getPath() + operation;
pathUri = new URI(path);
- logger.debug("SDNC host: " + sdncLcmProperties.getHost());
- logger.debug("SDNC API path: " + pathUri.getPath());
} catch (Exception e) {
String msg = "Error API path syntax: ";
logger.error(msg, e);
@@ -57,9 +55,7 @@ public class SDNCLcmClientBuilder {
}
try {
- SDNCLcmRestClient sdncLcmRestClient = new SDNCLcmRestClient(sdncLcmProperties, pathUri);
- logger.debug("Create SDNCLcmRestClient success");
- return sdncLcmRestClient;
+ return new SDNCLcmRestClient(sdncLcmProperties, pathUri);
} catch (Exception e) {
String msg = "Create SDNCLcmRestClient failure: ";
logger.error(msg, e);
@@ -69,9 +65,7 @@ public class SDNCLcmClientBuilder {
public SDNCLcmDmaapClient newSDNCLcmDmaapClient() throws SDNCLcmClientBuilderException {
try {
- SDNCLcmDmaapClient sdncLcmDmaapClient = new SDNCLcmDmaapClient(sdncLcmProperties);
- logger.debug("Create SDNCLcmDmaapClient success");
- return sdncLcmDmaapClient;
+ return new SDNCLcmDmaapClient(sdncLcmProperties);
} catch (Exception e) {
String msg = "Create SDNCLcmDmaapClient failure: ";
logger.error(msg, e);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java
index bf1229a310..4ea6850e47 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java
@@ -26,7 +26,7 @@ import org.onap.so.client.sdnc.lcm.beans.*;
public class SDNCLcmMessageBuilder {
- public static LcmFlags getSDNCFlags() {
+ public static LcmFlags buildLcmFlags() {
LcmFlags lcmFlags = new LcmFlags();
lcmFlags.setMode(SDNCConstants.LCM_FLAGS_MODE_NORMAL);
@@ -43,7 +43,7 @@ public class SDNCLcmMessageBuilder {
lcmCommonHeader.setOriginatorId(SDNCConstants.SYSTEM_NAME);
lcmCommonHeader.setRequestId(requestId);
lcmCommonHeader.setSubRequestId(subRequestId);
- lcmCommonHeader.setFlags(getSDNCFlags());
+ lcmCommonHeader.setFlags(buildLcmFlags());
lcmCommonHeader.setTimestamp(Instant.now().toString());
return lcmCommonHeader;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java
index 36527ec887..55e0ea3e5d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java
@@ -35,7 +35,7 @@ public class LcmFlags {
private String force;
@JsonProperty("ttl")
- private int ttl;
+ private Integer ttl;
public String getMode() {
return mode;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java
index 8a2a142792..3bbafcaaa4 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java
@@ -29,16 +29,16 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
public class LcmStatus {
@JsonProperty(value = "code", required = true)
- private int code;
+ private Integer code;
@JsonProperty(value = "message", required = true)
private String message;
- public int getCode() {
+ public Integer getCode() {
return code;
}
- public void setCode(int value) {
+ public void setCode(Integer value) {
this.code = value;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java
index 1a3529d7c4..05de9b1c90 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java
@@ -32,7 +32,7 @@ public class SwToBeDownloadedElement {
private String swLocation;
@JsonProperty(value = "swFileSize")
- private long swFileSize;
+ private Long swFileSize;
@JsonProperty(value = "swFileCompression")
private String swFileCompression;
@@ -48,11 +48,11 @@ public class SwToBeDownloadedElement {
this.swLocation = value;
}
- public long getSwFileSize() {
+ public Long getSwFileSize() {
return swFileSize;
}
- public void setSwFileSize(long value) {
+ public void setSwFileSize(Long value) {
this.swFileSize = value;
}