diff options
author | Charles Cole <cc847m@att.com> | 2017-10-20 08:52:59 -0500 |
---|---|---|
committer | Charles Cole <cc847m@att.com> | 2017-10-23 11:16:59 -0500 |
commit | 140980d872f84e854d636a21ca872b251b15891b (patch) | |
tree | 160fa25a01657b2fd32c984dbe4ae4b0f106a12b /controlloop/common/actors/actor.vfc/src | |
parent | 2f1ee658482437e0c5b45451d20468411e2e2b6a (diff) |
Fix handling of aai 'get' errors
Now reject an event if the AAI get query for the event fails. Added test
cases for this behavior.
Fixed some issues from my previous pull request.
Issue-Id: POLICY-314
Change-Id: I674e95302a271423c307a88d061064e12e491a7a
Signed-off-by: Charles Cole <cc847m@att.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 | 9 |
1 files changed, 5 insertions, 4 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 814726256..7bf5a2826 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 @@ -72,13 +72,14 @@ public class VFCActorServiceProvider implements Actor { String serviceInstance = onset.AAI.get("service-instance.service-instance-id"); if (serviceInstance == null || "".equals(serviceInstance)) { - if(vnfResponse == null) //if the response is null, we haven't queried + AAIGETVnfResponse tempVnfResp = vnfResponse; + if(tempVnfResp == null) //if the response is null, we haven't queried { - vnfResponse = getAAIServiceInstance(onset); //This does the AAI query since we haven't already - if (vnfResponse == null) + tempVnfResp = getAAIServiceInstance(onset); //This does the AAI query since we haven't already + if (tempVnfResp == null) return null; } - serviceInstance = vnfResponse.serviceId; + serviceInstance = tempVnfResp.serviceId; } request.nsInstanceId = serviceInstance; request.requestId = onset.requestID; |