diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-01-19 19:55:02 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-01-20 10:39:19 +0000 |
commit | 421a0843285f262b5cfc907ebd804ecd06d3fbe3 (patch) | |
tree | 6f5600a80fb7681be017cacdfd16b55a23d5cb70 /controlloop/common/actors/actor.vfc/src | |
parent | 7b6f0942e355b0405bc47e2e4d276e43c63edde1 (diff) |
Fix Tech Debt/JUnit on VFC POJOs
Making fields private, fixing field and methods to follow Java guidelines, and adding getter and setter methods.
Unit test added for all classes in org.onap.policy.vfc
Issue-ID: POLICY-455
Change-Id: I262337a816706cd5243849cd51e57689275545bf
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'controlloop/common/actors/actor.vfc/src')
-rw-r--r-- | controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java index dae60cb82..71c7cea25 100644 --- a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java +++ b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java @@ -82,19 +82,19 @@ public class VFCActorServiceProvider implements Actor { } serviceInstance = tempVnfResp.getServiceId(); } - request.nsInstanceId = serviceInstance; - request.requestId = onset.getRequestID(); - request.healRequest = new VFCHealRequest(); - request.healRequest.vnfInstanceId = onset.getAAI().get("generic-vnf.vnf-id"); - request.healRequest.cause = operation.getMessage(); - request.healRequest.additionalParams = new VFCHealAdditionalParams(); + request.setNSInstanceId(serviceInstance); + request.setRequestId(onset.getRequestID()); + request.setHealRequest(new VFCHealRequest()); + request.getHealRequest().setVnfInstanceId(onset.getAAI().get("generic-vnf.vnf-id")); + request.getHealRequest().setCause(operation.getMessage()); + request.getHealRequest().setAdditionalParams(new VFCHealAdditionalParams()); switch (policy.getRecipe().toLowerCase()) { case "restart": - request.healRequest.additionalParams.action = "restartvm"; - request.healRequest.additionalParams.actionInfo = new VFCHealActionVmInfo(); - request.healRequest.additionalParams.actionInfo.vmid = onset.getAAI().get("vserver.vserver-id"); - request.healRequest.additionalParams.actionInfo.vmname = onset.getAAI().get("vserver.vserver-name"); + request.getHealRequest().getAdditionalParams().setAction("restartvm"); + request.getHealRequest().getAdditionalParams().setActionInfo(new VFCHealActionVmInfo()); + request.getHealRequest().getAdditionalParams().getActionInfo().setVmid(onset.getAAI().get("vserver.vserver-id")); + request.getHealRequest().getAdditionalParams().getActionInfo().setVmname(onset.getAAI().get("vserver.vserver-name")); break; default: return null; |