aboutsummaryrefslogtreecommitdiffstats
path: root/policy-utils/src/test
AgeCommit message (Collapse)AuthorFilesLines
2019-08-29Remove AlertSeverity from logback in drools-pdpJim Hahn2-12/+6
Merged severity and AlertSeverity in the MDC, and updated the logback xml files accordingly. The logback patterns for the metrics log had a place for both Severity and AlertSeverity; the latter was replaced with an empty place-holder so-as to maintain the same position for the other fields. Change-Id: Ic0977e1133cc4219394f2d71ca8ebae080620e0b Issue-ID: POLICY-1989 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-13Fix sonar issues in drools-pdpJim Hahn1-77/+77
Address sonar issue, "Move constants to a class or enum", by moving them from interfaces to classes: ActiveStandbyFeatureApi StateManagementFeatureApi PolicyResourceLockFeatureApi PolicySessionFeatureApi DroolsController DroolsControllerFeatureApi PolicyControllerFeatureApi PolicyEngineFeatureApi HealthCheck SystemPersistence EventProtocolCoder PolicyController PolicyEngine TestTransaction MdcTransaction Address sonar issue, "Move constants to a class or enum", by change the interface to a class: DroolsProperties Address sonar issue, "Override the "equals" method in this class", by adding equals & hashCode to: DroolsPdpEntity DroolsPdpImpl Use lombok for a number of getters & setters. Address sonar issue, "Define a constant instead of duplicating this literal" in: DroolsPdpsElectionHandler JpaDroolsPdpsConnector MavenDroolsController GenericEventProtocolCoder GsonProtocolCoderToolset RestManager Address sonar issue, "Remove the parentheses around the parameter" in: MavenDroolsController Address sonar issue, "Replace this lambda with a method reference" in: LifecycleFsm Address sonar issue, "Move this constructor to comply with Java Code Conventions" in: LifecycleStateRunning Address sonar issue, "Replace this 'switch' statement by 'if' statements to increase readability", as specified in: PolicyEngineManager Address sonar issue, "Rename field to prevent any misunderstanding/clash with field" in: MdcTransactionImpl Address sonar issue, "Either log or rethrow this exception", in: RestManager Address sonar issue, "Rename this constant name to" uppercase, by replacing enums with static lists in: RestManager Addressed review comments: Fixed license dates. Renamed getSiteName/setSiteName methods to getSite/setSite in the interface to match the field names in the implementation classes. Renamed *Instance classes to *Constants. Next round of review comments. Change-Id: I1c26af9f194833dd773f2b25dc5f60cde163201c Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-16Fix checkstyle issues in policy-utilsJim Hahn1-96/+96
Also deleted the checkstyle suppression file. Change-Id: I51c69bce644204435fa8131c14132e0384b4e886 Issue-ID: POLICY-1909 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-01move all hard install config to environment varsJorge Hernandez1-1/+15
+ support multiple system properties files with variable interpolation loaded at initialization + support of configurable JVM options (-X, etc ..). + rearrange aaf configuration to avoid {{}} installation variables and use dynamic enviroment variables. + miscellaneous clean up in areas touched and checkstyle. Change-Id: I71ad839778e17eb57c098a2c5cc2bf96e468669a Issue-ID: POLICY-1524 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-02-12Support of environment variables in propertiesJorge Hernandez2-1/+18
Change-Id: I5028ad3b4fb63a96607915e8b424dd2e57696bf0 Issue-ID: POLICY-1514 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-09-08Fix checkstyle in utilsPamela Dragosh6-276/+265
Just focusing on the policy-utils submodule. Issue-ID: POLICY-882 Change-Id: I9f2ecac8f435f2d743b1fafc477d320b10852bdc Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-07-25Copy policy-endpoints from drools-pdp to commonmmis1-39/+0
Removed policy-endpoints, and 3 classes from policy-core. Replaced refenences to the deleted classes with references to the corresponding classes in policy-common Issue-ID: POLICY-967 Change-Id: I547cde4894424b8f40b7ddd4e2342ebb729cb588 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-04-03Add api-resource-locks featureJim Hahn1-0/+84
Added ResourceLockFeatureAPI, to provide an interface for PolicyGuard to use to access other locking mechanisms. Move lock API to policy-core. Changed the interface and added Callback support. Added a class to invoke the API implementers. Changed to set a future instead of expecting the callback to implement the future interface. Also refactored, creating "lock" sub-package. Add junit tests. Increase junit coverage. IsLocked & isLockedBy should check all arguments. Make ImplFuture protected instead of public. Simplify locking - move callback support to an optional feature. Move Reference class to policy-utils. Return plain Future instead of LockRequestFuture. Change-Id: I65154d33833914b4332e02d1ef2512f4c5f09b16 Issue-ID: POLICY-577 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-03-26l2 management maturity pdp-dJorge Hernandez4-2/+328
configurable log location metric/audit log for transaction metrics conforming to new field definition. support metrics/audits records with custom logback filters so they are not intrusive with developer log testing. Change-Id: I7a4dcc6790b85539e613ad8705e731e7298ce106 Issue-ID: POLICY-533 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-02-20Sonar fixes to drools-pdpJim Hahn1-2/+2
Fixed most of the instances of the following sonar issues: Moved array designator Used diamond operator Changed System.out/err to use a logger Changed several Thread.sleep() in test code to a single sleep() Useless assignments Replaced comparison with "" to string.isEmpty() Merged if's Replaced ArrayList with List in method returns Reordered type modifiers Reordered constructor methods Defined constants for literals, or replaced them with method calls Removed "throws Xxx" for subclasses of RuntimeException Combined identical "catch" blocks Re-interrupted the current thread after catching an InterruptedException Removed tests against the literal "false" Fix indentation of new makeTopicOperError() method. Fix exception variable name in new methods, logNoUebEncoder() and logNoDmaapEncoder(). Change-Id: Iddae5210553662f733b67333b372dec8c3fe2c94 Issue-ID: POLICY-336 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-02-08Merge "expose immutable list of filters to its users"Pamela Dragosh1-0/+60
2018-02-07expose immutable list of filters to its usersJorge Hernandez1-0/+60
+ additional related junits Change-Id: I00293cd9aa911dfb3d658cad4ee0441ad3410e9c Issue-ID: POLICY-164 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-02-01Reduce technical debt add coveragePamela Dragosh4-14/+109
* add empty constructor message * remove unnecessary exception declaration * add @FunctionalInterface declaration * switched around public static per java conventions * fixed up JUnit ordering * added some trivial JUnit tests to bump coverage > 70% Issue-ID: POLICY-460 Change-Id: I13b6de29f66d692143b06180feed76dd6332d6cf Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-12Added junits for policy-util classesMagnusen, Drew (dm741q)2-0/+127
Added junits to increase coverage of the policy-util module. Patch 1: Moved Parent and Child class to within ReflectionUtilTest class. Issue-ID: POLICY-214 Change-Id: Ic5882c02a65ba1c924ec1381901a2a971fe72911 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-07-28[POLICY-72] replace openecomp for drools-pdpGuo Ruijing1-1/+1
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
2017-06-22[POLICY-30] remove problematic layersJorge Hernandez2-39/+13
add configurability through telemetry API Change-Id: I77ebde12a417d421b98646c32dc74824f4494c2e Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-01[POLICY-9,POLICY-18] warnings + Controller hooksJorge Hernandez1-8/+5
1. clean up policy-utils warnings. drools-pdp project has no warnings now. 2. add new Policy Controller hooks for feature programmability. Change-Id: Ie991320e23e73118b235018d15ea66340a841a89 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-02-14Initial OpenECOMP policy/drools-pdp commitPamela Dragosh2-0/+230
Change-Id: I0072ccab6f40ed32da39667f9f8523b6d6dad2e2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>