summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorPrema Bhatt <pb6115@att.com>2018-09-12 11:16:41 -0700
committerPrema Bhatt <pb6115@att.com>2018-09-12 11:16:41 -0700
commit5a3663bda14603109c1e51670a29bf783195ab21 (patch)
treeb900a665ccff744bdb8b9bf07041a01ad1c7739c /bpmn/MSOCommonBPMN/src/main/java
parent1fa4f35a1525cdb36513cd43c171240699077f3b (diff)
Update GenericHealthCheck to send vnfHostIpAddress
Change-Id: Ia0adb8784e81001ca0b54bfa62b12f28060114cf Issue-ID: SO-1024 Signed-off-by: Prema Bhatt <pb6115@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java17
2 files changed, 16 insertions, 8 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
index ca1acc5963..47e36424dd 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
@@ -85,12 +85,9 @@ public class PayloadClient {
public static Optional<String> healthCheckFormat(String vnfName, String vnfHostIpAddress) throws JsonProcessingException{
HealthCheckAction payloadResult = new HealthCheckAction();
RequestParametersHealthCheck requestParams = new RequestParametersHealthCheck();
- ConfigurationParametersHealthCheck configParams = new ConfigurationParametersHealthCheck();
- requestParams.setVnfName(vnfName);
- configParams.setVnfName(vnfName);
- payloadResult.setConfigurationParameters(configParams);
+ requestParams.setVnfHostIpAddress(vnfHostIpAddress);
payloadResult.setRequestParameters(requestParams);
- return Optional.of(mapper.writeValueAsString(payloadResult));
+ return Optional.of((mapper.writeValueAsString(payloadResult)).replaceAll("\"", "\\\\\""));
}
public static Optional<String> snapshotFormat(String vmId, String identityUrl)throws JsonProcessingException{
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java
index ca87ad6d15..053ac5e741 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java
@@ -32,16 +32,27 @@ public class RequestParametersHealthCheck {
@JsonProperty("vnf-name")
private String vnfName;
-
+@JsonProperty("vnf-host-ip-address")
+private String vnfHostIpAddress;
@JsonProperty("vnf-name")
public String getVnfName() {
-return vnfName;
+ return vnfName;
}
@JsonProperty("vnf-name")
public void setVnfName(String vnfName) {
-this.vnfName = vnfName;
+ this.vnfName = vnfName;
+}
+
+@JsonProperty("vnf-host-ip-address")
+public void setVnfHostIpAddress(String vnfHostIpAddress) {
+ this.vnfHostIpAddress = vnfHostIpAddress;
+}
+
+@JsonProperty("vnf-host-ip-address")
+public String getVnfHostIpAddress() {
+ return vnfHostIpAddress;
}
}