summaryrefslogtreecommitdiffstats
path: root/policy-endpoints
AgeCommit message (Collapse)AuthorFilesLines
2022-04-08Move dependency handling for Jackson to parentliamfallon1-17/+17
All jackson version handling is done in parent. Issue-ID: POLICY-4070 Change-Id: I43331d5d8cf3db054d9dc75038b5a3ea96c3d77f Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-07Add separate version for Jackson annotationsliamfallon1-2/+2
Issue-ID: POLICY-4070 Change-Id: Ia742732bab1870d06fbbddc74180b995763bb442 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-03-09Update snapshot and/or references of policy/common to latest snapshotsliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-3982 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ie568311ebab28837dd70fad6f603fd14d356318e
2021-12-14remove apache-log4j-extras deps from endpointsjhh1-0/+4
Issue-ID: POLICY-3862 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7f8f42e2980fb8f545773599f5ebecabaacf7234
2021-11-30Use prometheus libraries defined in parent pomRashmi Pujar1-4/+1
Depends on https://gerrit.onap.org/r/c/policy/parent/+/125974 for build to pass. Issue-ID: POLICY-3760 Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca> Change-Id: I255bf085e0d33e09c1fdd3aea373f3c497074a85
2021-11-24Update snapshot of policy/common to 1.10.1-SNAPSHOTliamfallon1-1/+1
*** This commit is generated by a PF release script *** This commit updates the snapshot of the repo to the next patch version. Issue-ID: POLICY-3827 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I4ce7c53f5df1e0e1ad954146240899230a45d945
2021-10-13Bump policy/common master to 1.10.0-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I3710faca8799cfdbf0d6c75ae286b1765ddf6b97 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-10-13Bump policy/common to 1.9.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I599ac2e36c45ba6882c95681a531da8b57efbb58 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-09-13Bump snapshot versionliamfallon1-1/+1
Issue-ID: POLICY-3587 Change-Id: I11043890dfd4dfbc19ec24eb15a546745393d105 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-08-23Support multiple filters in RestServerJim Hahn2-8/+58
Added an API to RestServer so that multiple Filters may be provided. Issue-ID: POLICY-3531 Change-Id: I21f474c01d58237c744d1d70f5b39c2c90fdb401 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-23Disable prometheus by default in policy/commona.sreekumar1-1/+1
Change-Id: I30acac6ea84bfb032994e81a93f38443818a0d1a Issue-ID: POLICY-3538 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-08-18Add topic checkerJim Hahn2-1/+380
Added a method to check the readiness of a bidirectional topic. Issue-ID: POLICY-3531 Change-Id: I2fefae7ba1ea5ed9ed33140717d05828e6dec94d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-18Integrating prometheus with Policy componentsa.sreekumar13-41/+292
With this change, all PF components can export prometheus metrics by default. The prometheus metrics servlet will be running on /metrics servletPath.. If the metrics shouldn't be exported, just add a flag "promethus": false in the restServerParameters of default configuration file. This brings up prometheus servlet on /metrics servletPath. Also as part of standard servlet support, "servletUriPath" and "servletClass" are 2 other fields added to RestServerParameters which can be used to add standard servlets. This can be revisited later if needed. Basically, any servlet can be added by passing these fields, for example, to add prometheus metrics servlet on /test/metrics, add the below to restServerParameters: "servletUriPath": "/test/metrics", "servletClass": "io.prometheus.client.exporter.MetricsServlet" In addition, we can later go to individual components and add more metrics, say for e.g., deployedPoliciesCounter/undeployedPoliciesCounter etc on PAP, executedEvents/failedEvents etc on PDP and so on. This will look something like below, for e.g. in policy-pap component: io.prometheus.client.Counter counter = Counter.build() .name("policies_deployed_total") .help("Number of policies deployed.").register() Whenever a policy is deployed, just call counter.inc() Usage of code like above in the individual component will expose such data as well as part of the exposed metrics. Change-Id: Id667f27b15c012398421ba657b5324cc1d82cf1f Issue-ID: POLICY-3524 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-07-02Merge "Use UUID for topic consumer instance"Jim Hahn2-11/+36
2021-07-02Wait after fetch exception on topicJim Hahn2-10/+52
When dmaap is inaccessible for some reason, the topic source frequently enters a fast fail loop, rapidly filling up the log. Modified the code to wait the configured fetchTimeout when this occurs. With any luck, this will also fix the sporadic kubernetes crash-fail loops sometimes seen with the xacml-pdp pod. Modified to limit how long it will sleep after a failure, regardless of the fetchTimeout that was specified. Issue-ID: POLICY-3457 Change-Id: I88e360fb1d31197b46f4959e5ea0ea2d741ad25c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-01Use UUID for topic consumer instanceJim Hahn2-11/+36
Modified the code so that if the consumer group is defined, but the consumer instance is not, then policy-endpoints will generate a UUID for the consumer instance. Made the logic a little more straight-forward in response to a review comment. Issue-ID: POLICY-3405 Change-Id: If74440bdb01525bc463a28e5b8a9a2eca89a855a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-29Address sonars in commonJim Hahn1-1/+2
Fixed: - use "var" - duplicate code block Issue-ID: POLICY-3284 Change-Id: I8cd7f2588353a2e7702c90d37d7b9f972634dca9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-22Move Validators and RestClientParameters in policy-commonFrancescoFioraEst1-0/+56
Issue-ID: POLICY-3402 Change-Id: I7479027e3ea1e960266264c2d13cd69e2103710b Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
2021-06-18Merge "Fix new checkstyle issues in policy-common"Jim Hahn2-3/+4
2021-06-18Fix new checkstyle issues in policy-commonJim Hahn2-3/+4
The new version of checkstyle identified new issues. Fixed those. Issue-ID: POLICY-3284 Change-Id: I2a8bf2b460fda7972ce573f14df5af52d46c9993 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-17Use lombok in policy-endpointsJim Hahn24-399/+104
Issue-ID: POLICY-3394 Change-Id: I8dfb0814d5cc544b2c334dc11a3e69ef407f163f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-24Merge "Enhance toString methods in factory classes"Jim Hahn15-113/+38
2021-05-21Fix sonar duplicate code issueJim Hahn2-50/+109
Issue-ID: POLICY-3284 Change-Id: I78c3a8ac92e18e2b0088eb07e27a4e97866d6182 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-21Enhance toString methods in factory classesJim Hahn15-113/+38
The factory classes in policy-endpoints have toString() methods that return "[]" for their list contents. Updated the code to provide a list of the keys rather than just an empty list. Also replaced some toString() methods with lombok. Also replace StringBuilder with concatenation in some cases. Issue-ID: POLICY-3298 Change-Id: I64fca21a4b009f7e09fcc482b5d156753fb7e680 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Change java.util.regex to re2jJim Hahn10-10/+10
Sonar complains about java.util.regex. Thought I used re2j when creating all of the patterns, but apparently not. Fixed that oversight. Issue-ID: POLICY-3284 Change-Id: Idbec112ab0d4c3b477ce357f8a556d95e4dea083 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-06Fix sonars in policy-commonJim Hahn25-113/+134
Fixed sonars: - use "var" instead of actual type name - re-interrupt threads - use rej2 split() instead of String split() Issue-ID: POLICY-3285 Change-Id: I82261e0b8a53ee5c5264556fbf5cec37454f014e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-29Remove GroupValidationResultJim Hahn4-22/+22
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Added Size annotation, used to verify minimum lengths of maps and collections. Added ClassName annotation, used to verify that a property contains the name of a class that is actually in the classpath. Added another addResult() method to make it easier when replacing calls to GroupValidationResult setResult() method with BeanValidationResult. Issue-ID: POLICY-2059 Change-Id: Id4da24886908723006624c5d53edeb034102299d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-25Use self-signed-cert property for HTTP clientsJim Hahn1-5/+4
Currently, the HttpClient code sets self-signed-certs to true whenever https is specified. This is insecure. Modified the code to set the value based on the property, defaulting to false. Issue-ID: POLICY-3145 Change-Id: Ie88cf2411ae44a7c53bc8943f615a74c5b87d1aa Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-12Remove more unnecessary plugins from commonJim Hahn1-42/+1
Issue-ID: POLICY-3126 Change-Id: I2f39e14c9cea0ec58709e24995aab536f2df7990 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Bump version to 1.9.0 in commonJim Hahn1-1/+1
Issue-ID: POLICY-3105 Change-Id: I1fd654fef96a1e41f150ea13baf39acc882f6bb2 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-23Bump version to 1.8.1-SNAPSHOT in commonJim Hahn1-1/+1
Issue-ID: POLICY-3088 Change-Id: I1cc2d1d26c337d67b0ecadd852e43b603902415e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-11Fix sonars from depeendency upgradeJim Hahn1-3/+3
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner. Issue-ID: POLICY-2914 Change-Id: Iaf10f676c380adb9785e836cb15792596b378e4e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-10More sonar issues in commonJim Hahn3-32/+29
Addressed the issues: - use of eq() in verify() - remove @NamedQueries - use computeIfAbsent() Issue-ID: POLICY-2914 Change-Id: I265bc98f0f326e7b4ce86c25e68fc4859bd7fb02 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-04Fixing sonar issues in policy-commona.sreekumar10-18/+28
Change-Id: I4dce0dbdf71d01fbb59e9bf861d1af1ab49e5ae7 Issue-ID: POLICY-2914 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-29Remove server-side filtering from policy-endpointsJim Hahn5-163/+6
ONAP DMaaP Message Router no longer supports server-side filtering. Removed it from policy-endpoints. Issue-ID: POLICY-2881 Change-Id: I08157f7699608af63992dec78a61c5f9c55037b9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-29Include jackson jar in policy-endpointsJim Hahn1-0/+6
Issue-ID: POLICY-2878 Change-Id: Ibfe4c220c7b15bb0b752537d080481350a1332e4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Bump common master to 1.8.0 SNAPSHOTJim Hahn1-1/+1
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Id812dfd1406f8567a17ce4037eaa8cf8e7e4be26 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-28New sonars in policy-commonJim Hahn2-5/+27
Addressed the following sonars: - too many assertions in a test case - use parameterized test method Disabled production sonars for util-test, as the entire module is only used for testing other modules. Issue-ID: POLICY-2650-sonar Change-Id: If49775a6c95855dcd9601ee0d833bb00741b1550 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Bump common to 1.7.2Jim Hahn1-1/+1
Issue-ID: POLICY-2789 Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-20Remove jackson from policy-commonJim Hahn9-251/+2
Issue-ID: POLICY-1528 Change-Id: Ic4b9314a770e53cefb93776bfede35591363690e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-09Bump policy/common to 1.7.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I75fef54eb4bad2cb4b1430618d0ac3de4ecb9493 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-01Updating common dependenciesRossC1-1/+1
Issue-ID: POLICY-2387 Change-Id: Ib2b14f66f6416ca3b8d6353bb6aa19fa2f41ebbb Signed-off-by: RossC <ross.carter@est.tech>
2020-06-29Fix issues in common for new sonar rulesJim Hahn4-8/+11
Addressed issues reported due to updates to the sonar rules: - invoke only one method in a junit lambda - complete the assertion - add DOCTYPE to html Issue-ID: POLICY-2650 Change-Id: Ib8b8a2e4736cc23849c0f7aef972ffa3365a3e00 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-25Merge "Fix deprecated method in policy-common"Pamela Dragosh1-2/+3
2020-06-25Fix Junit failed after AAF version change 2.1.21Utkarsh Jauhari1-0/+7
Issue-ID: POLICY-2623 Signed-off-by: Utkarsh Jauhari <uj426b@att.com> Change-Id: I86c5b6efac8f62dd0d4ba576d8ec49cfa63a58bb
2020-06-24Fix deprecated method in policy-commonJim Hahn1-2/+3
Probably due to a jar update, some methods are now deprecated. Fixed them. Issue-ID: POLICY-2650 Change-Id: I48aabd4552faaf88671dfbe6556dc739a8c94809 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-18Changes for checkstyle 8.32liamfallon4-6/+6
Issue-ID: POLICY-2188 Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-17Cleanup various sonar issues in policy-commonJim Hahn16-48/+39
Addressed the following issues: - unused imports - unused method parameters - use assertEquals, assertSame instead of assertTrue - provide the parametrized type for this generic Also fixed some checkstyle issues: - removed blank lines between "import" groups Issue-ID: POLICY-2650 Change-Id: I004bb650ac10c49ccd0fc405f6959896fec39f9b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-02Code changes for dmaap-client upgradeJim Hahn1-4/+11
Issue-ID: POLICY-1996 Change-Id: Id8a3acf9406c6acada4c3ffee679f2baf819cded Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-28jetty-servlets now defined in oparentPamela Dragosh1-3/+0
latest oparent has this new dependency in it. Issue-ID: POLICY-2319 Change-Id: If3b9f64caa41923da1fabc6183434fc21ec00548 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>