diff options
author | Alexis de Talhouƫt <alexis.de_talhouet@bell.ca> | 2018-09-20 12:50:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-20 12:50:10 +0000 |
commit | ee1730ec19d9aa8b57d00a702885f1ccb624aba1 (patch) | |
tree | bb49447b0e995bafcb0179ec47f12d0958e833b7 /kubernetes/pomba | |
parent | ff8157150f623cc23424b7b6927a77eec81cb3f5 (diff) | |
parent | c39f4efede368be7ebe2a4c23e21ef396ffaed9c (diff) |
Merge "fixing attribute comparison rule"
Diffstat (limited to 'kubernetes/pomba')
-rw-r--r-- | kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy | 13 |
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 +} |