Add support for common rules across types 95/78495/1
authormark.j.leonard <mark.j.leonard@gmail.com>
Thu, 14 Feb 2019 13:51:11 +0000 (13:51 +0000)
committermark.j.leonard <mark.j.leonard@gmail.com>
Thu, 14 Feb 2019 13:51:11 +0000 (13:51 +0000)
commit13b3d5d42bae10ce2733c86814177c3e31eb2014
tree9ece0ac87d1725891a0bcaed8c186af0b74d563a
parentc9cdd245b2b575164a11785ab7a4710395f950c7
Add support for common rules across types

Refactor the Rule Driven Validator implementation for loading the Groovy
rules. Firstly, support multiple top-level folders. Secondly, include
each top-level folder in the set of paths to search for *.groovy files.

Pull a common rule up to the top-level to remove the duplication.

Add tests to exercise the exception handling code.

Change-Id: Ib70fe03ab5b1f2f8c1711760236b07850aaaa398
Issue-ID: AAI-2155
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
bundleconfig/etc/rules/aai-event/entity-generic-vnf.groovy
bundleconfig/etc/rules/common_rules.groovy [moved from bundleconfig/etc/rules/spike-event/common_rules.groovy with 57% similarity]
src/main/java/org/onap/aai/validation/ruledriven/RuleDrivenValidator.java
src/main/java/org/onap/aai/validation/ruledriven/rule/GroovyRule.java
src/main/java/org/onap/aai/validation/ruledriven/rule/Rule.java
src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java
src/test/java/org/onap/aai/validation/ruledriven/rule/TestConfigurationLoader.java
src/test/java/org/onap/aai/validation/ruledriven/validator/TestDataDictionary.java
src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java
src/test/resources/rule-driven-validator/missing_oxm/dummy_event_type/oxm_missing.groovy [moved from bundleconfig/etc/rules/gizmo-event/common_rules.groovy with 58% similarity]