From 5a3663bda14603109c1e51670a29bf783195ab21 Mon Sep 17 00:00:00 2001 From: Prema Bhatt Date: Wed, 12 Sep 2018 11:16:41 -0700 Subject: Update GenericHealthCheck to send vnfHostIpAddress Change-Id: Ia0adb8784e81001ca0b54bfa62b12f28060114cf Issue-ID: SO-1024 Signed-off-by: Prema Bhatt --- .../bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java | 2 ++ .../infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java | 2 ++ 2 files changed, 4 insertions(+) (limited to 'bpmn/so-bpmn-tasks') 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 772def739b..61162f4d85 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 @@ public class GenericVnfHealthCheck { 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 @@ public class GenericVnfHealthCheck { 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 3aaf15cf11..9f0bb910e6 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 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest { 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 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest { 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); -- cgit 1.2.3-korg