From 21362791e6488bb36f543f0319b195e24f239dcb Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 10 Nov 2020 11:39:51 -0500 Subject: Allow mixed case in check of prov-status Apparently SO/AAI in Frankfurt are setting the prov-status to "active" instead of "ACTIVE". Modified the code to ignore case when comparing. Issue-ID: POLICY-2890-prov-status2 Change-Id: I9e868d320dadcb3ac51570718d10f33d0011ae47 Signed-off-by: Jim Hahn --- .../policy/drools/apps/controller/usecases/UsecasesEventManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'controlloop/common/controller-usecases/src/main/java') diff --git a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java index d92fbcfad..091b26b2d 100644 --- a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java +++ b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java @@ -707,8 +707,9 @@ public class UsecasesEventManager extends ControlLoopEventManager implements Ste */ private static boolean isProvStatusInactive(VirtualControlLoopEvent event) { Map aai = event.getAai(); - return !(PROV_STATUS_ACTIVE.equals(aai.getOrDefault(VSERVER_PROV_STATUS, PROV_STATUS_ACTIVE)) - && PROV_STATUS_ACTIVE.equals(aai.getOrDefault(GENERIC_VNF_PROV_STATUS, PROV_STATUS_ACTIVE))); + return !(PROV_STATUS_ACTIVE.equalsIgnoreCase(aai.getOrDefault(VSERVER_PROV_STATUS, PROV_STATUS_ACTIVE)) + && PROV_STATUS_ACTIVE.equalsIgnoreCase( + aai.getOrDefault(GENERIC_VNF_PROV_STATUS, PROV_STATUS_ACTIVE))); } /** -- cgit 1.2.3-korg