From 50c786ff425de405252cccddea7ff776942ef671 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 8 May 2020 16:45:03 -0400 Subject: Final blacklist fix for multiple entries The last change wasn't quite right, this has multiple AndOf's under a single AnyOf. Multiple AnyOf's are treated as AND's, but what we really want is a set of OR's. Issue-ID: POLICY-2490 Change-Id: I7336643302ccf7982c91a9c082d17bcf0adb4ac8 Signed-off-by: Pamela Dragosh --- .../org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'applications/guard/src/main/java') diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java index 854f3260..8699fec0 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java @@ -492,13 +492,13 @@ public class GuardTranslator implements ToscaPolicyTranslator { // treated as an OR. // TargetType target = new TargetType(); + AnyOfType anyOf = new AnyOfType(); for (Object blacklisted : ((Collection) arrayBlacklisted)) { AllOfType allOf = new AllOfType(); this.addMatch(allOf, blacklisted, ToscaDictionary.ID_RESOURCE_GUARD_TARGETID); - AnyOfType anyOf = new AnyOfType(); anyOf.getAllOf().add(allOf); - target.getAnyOf().add(anyOf); } + target.getAnyOf().add(anyOf); // // Create our rule and add the target // -- cgit 1.2.3-korg