summaryrefslogtreecommitdiffstats
path: root/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig
diff options
context:
space:
mode:
authorPierre Rioux <pierre.rioux@amdocs.com>2018-09-20 00:45:11 -0400
committerPierre Rioux <pierre.rioux@amdocs.com>2018-09-20 00:45:18 -0400
commitc39f4efede368be7ebe2a4c23e21ef396ffaed9c (patch)
tree70f00efe40a7262594c8844478e84f9960a4caf4 /kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig
parent3c13425d83fabdf0e4b2aa515c841319e2450ae0 (diff)
fixing attribute comparison rule
Change-Id: I81d9139e80b7d7e6432f178d107a28b4135ca0e2 Issue-ID: LOG-434 Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
Diffstat (limited to 'kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig')
-rw-r--r--kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy13
1 files changed, 9 insertions, 4 deletions
diff --git a/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy b/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy
index c6699091f7..3f91f8bf71 100644
--- a/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy
+++ b/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy
@@ -213,14 +213,19 @@ rule {
java.util.Map ndcb = getAttributes(slurper.parseText(ndcbItems.toString()))
java.util.Map aai = getAttributes(slurper.parseText(aaiItems.toString()))
- ndcb.each{ ndcbKey, ndcbValueList ->
+ boolean result = true
+ ndcb.any{ ndcbKey, ndcbValueList ->
def aaiValueList = aai.get("$ndcbKey")
aaiValueList.each{ aaiValue ->
if(!ndcbValueList.any{ it == "$aaiValue" }) {
- return false
+ result = false
}
}
+ if(result == false) {
+ // break out of 'any' loop
+ return true
+ }
}
- return true
+ return result
'''
-} \ No newline at end of file
+}