Merge "Add onap-ca.crt to docker"
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 ca1acc5..47e3642 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 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 ca87ad6..053ac5e 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 @@
 
 @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;
 }
 
 }
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
index 80b978e..a08d8ca 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
@@ -66,7 +66,7 @@
 	
 	@Test
 	public void healthCheckFormatTest()  throws Exception {
-		String payloadResult = "{\"request-parameters\":{\"vnf-name\":\"vnfName1\"},\"configuration-parameters\":{\"vnf_name\":\"vnfName1\"}}";
+		String payloadResult = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"vnfHostIpAddress1\\\"}}";
 		Optional<String> payloadClient = PayloadClient.healthCheckFormat("vnfName1", "vnfHostIpAddress1"); 
 		assertEquals(payloadResult, payloadClient.get());
 	}	
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
index 772def7..61162f4 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -67,6 +67,7 @@
 			execution.setVariable("vnfId", vnfId);
 			execution.setVariable("vnfName", vnfName);
 			execution.setVariable("oamIpAddress", oamIpAddress);
+			execution.setVariable("vnfHostIpAddress", oamIpAddress);
 			execution.setVariable("msoRequestId", gBBInput.getRequestContext().getMsoRequestId());
 			execution.setVariable("action", actionCategory);
 			execution.setVariable("controllerType", controllerName);
@@ -93,6 +94,7 @@
 			payloadInfo.put("vnfName", execution.getVariable("vnfName"));
 			payloadInfo.put("vfModuleId",execution.getVariable("vfModuleId"));
 			payloadInfo.put("oamIpAddress",execution.getVariable("oamIpAddress"));
+			payloadInfo.put("vnfHostIpAddress",execution.getVariable("vnfHostIpAddress"));
 			//PayloadInfo contains extra information that adds on to payload before making request to appc
 			appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType);
 		
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
index 3aaf15c..9f0bb91 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
@@ -84,6 +84,7 @@
 		payloadInfo.put("vnfName", "testVnfName");
 		payloadInfo.put("vfModuleId", "testVfModuleId");
 		payloadInfo.put("oamIpAddress", "testOamIpAddress");
+		payloadInfo.put("vnfHostIpAddress", "testOamIpAddress");
 		execution.setVariable("action", Action.HealthCheck.toString());
 		execution.setVariable("msoRequestId", msoRequestId);
 		execution.setVariable("controllerType", controllerType);
@@ -91,6 +92,7 @@
 		execution.setVariable("vnfName", "testVnfName");
 		execution.setVariable("vfModuleId", "testVfModuleId");
 		execution.setVariable("oamIpAddress", "testOamIpAddress");
+		execution.setVariable("vnfHostIpAddress", "testOamIpAddress");
 		execution.setVariable("payload", payload);
 		
 		doNothing().when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType);