summaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2023-10-04Remove AAF from drools-pdpadheli.tavares3-24/+14
Issue-ID: POLICY-4592 Change-Id: Ibe7fb63017f862bdab4a80444a00324040b1ab87 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Upgrade java-17 in drools-pdpadheli.tavares3-20/+20
Issue-ID: POLICY-4676 Change-Id: I85a0f6303b30cd0405d63be003c9288f59a9d6b7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-02-10Removing Drools-pdp swagger annotationslapentafd1-681/+392
Added swagger extracted documentation in openapi.yaml for lifecycle, legacy, management and healthcheck. Added new endpoint to retrieve the generated swagger.json Modified endpoint in telemetry tool Issue-ID: POLICY-3465 Change-Id: I003aaf128b1a4991ffe6b79f0659d1bd0137b52d Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2023-01-31Upgrade and clean up dependenciesliamfallon1-1/+1
- Upgrade Hibernate - Upgrade Mockito - Upgrade Mockserver - Remove Powermock (no longer supported) and replace with spring-test ReflectionTestUtils - Upgrade Spring Framework - Add spring-security to allow authentication on unit tests using MockMVC Minor clean-up - Replace deprecated authorization configuraiton on spring boot applications with SecurityFilterChain bean - Change @LocalPort include on tests to use test include rather than runtime include - Remove unused imports - Remove unused constants and variables - Add deprecation annotations where required Issue-ID: POLICY-4482 Change-Id: Ibc2097f6d832a893c9e99a01b79121c28ba878ad Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-10-31Remove lombok public access in locking gettersjhh1-6/+6
Issue-ID: POLICY-4428 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I3c0be2c6e5ad4b723424f20eb39acb654605b235
2022-10-19Support optional cluster name in policy enginejhh3-8/+43
This allows also for correlation with running pod hostnames in the case of multiple drools pdp flavors coexist. Issue-ID: POLICY-4403 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I81affeeec622e6c0e9627651bf34c0775a796827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-02-10restore coders toolset toStringjhh1-4/+12
This is to reduce verbosity introduced by lombok @ToString, Issue-ID: POLICY-3895 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7b6b3490b508e6ccb094da87d6f0f64a7e859277 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-02-09add policy_executions_latency_seconds summaryjhh1-1/+34
Issue-ID: POLICY-3761 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I9867472784d8f153b6955ce95b34de250f60f558
2022-01-26restore manual toString coder methodsjhh2-12/+17
The changes to use the generic lombok ToString caused excessive verbosity when the coder objects are logged, hence restoring the older manual toString() methods back. Issue-ID: POLICY-3895 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Idd875172cbb066d13294aeb31fb85577dad127c1 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-09-03Reduce coder verbosity in logsJim Hahn1-2/+13
After switching to lombok ToString, the log messages for the coder class have become very long. Switched back to the original toString() method, which only logs the keysets rather than the whole content of the coder maps. Left the other additions of lombok ToString in drools-pdp as is, because they all looked appropriate, upon further review. Addressed review comments: - added comment about why lombok isn't used Issue-ID: POLICY-3397 Change-Id: I08ea8c49908b33fc3b8c8ba6de4ac4bd1474660a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-26Fix sonars in drools-pdpJim Hahn2-2/+0
Fixed sonars: - use "var" - override "equals" - unused imports Also changed some of the JPA queries to make them typed queries. Issue-ID: POLICY-3289 Change-Id: Ib3a00be322d8d00ba492673708439cacfe2c7fc4 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-06Use slf4j Marker from common repoTaka Cho3-9/+11
using slf4j Marker from common repo Issue-ID: POLICY-3087 Change-Id: Iefbd6fa9ab2dfa6388508cb6ffd6cf1358b45ccc Signed-off-by: Taka Cho <takamune.cho@att.com>
2021-08-05Use lombok in drools-pdpJim Hahn25-775/+195
Updated policy-management thru policy-utils. Issue-ID: POLICY-3397 Change-Id: Ie9498fe912e8338ddc32a40774c3cb63d84f079a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-07nosonar on admin logging level functionjhh1-7/+2
Issue-ID: POLICY-3077 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ieae80c77db297271c9de3958d321bfe4b88acce3 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-06-29Use unique name in drools PdpMessagesJim Hahn1-2/+8
Also modified distributed locking to use the unique name, in case the DB is shared. Issue-ID: POLICY-3410 Change-Id: I046a9ffdcb62f3d84d7d388a1e64bcf025fbbf75 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-28Update policy-drools-pdp for checkstyle 8.43liamfallon1-40/+41
Updates are indentation changes on annotations. Issue-ID: POLICY-3209 Change-Id: I7b55b2affa3e16afb0c0f8398b902a04f13c4db0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-18Fix new checkstyle issues in drools-pdpJim Hahn1-4/+4
The new version of checkstyle identified new issues. Fixed those. Also addressed sonar "var" issues. Issue-ID: POLICY-3289 Change-Id: I3a18d3988202dca6f3c87f2aa1810bf803a9d14d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-16use lombok NonNull instead of other leaked importsjhh3-3/+3
Issue-ID: POLICY-3397 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ie0f2009e9c9d219405f5ccbdd648304c66460b1e
2021-06-15filter logging input data per sonar security issuejhh2-11/+16
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iad22a581a6bd98e7e210162d30ec7741972669d2
2021-06-14Use re2j pattern for sonar vulnerabilitiesjhh2-18/+14
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id6d58b5c8ac5f7715286f21274ccf5eea9155fd2
2021-05-18Fix sonar vulnerabilities logging user inputjhh1-2/+2
Issue-ID: POLICY-3230 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I05fb50ef3c4b6da0603e75084554e061a27a2202
2021-05-12fix telemetry related sonar security issuesjhh3-15/+56
Issue-ID: POLICY-3257 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic599b593abbc999c4e6a6fd4bc72acd5ec6e09f9
2021-05-10interrupted exception and var usage sonarsjhh1-38/+53
Issue-ID: POLICY-3230 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I50a4ee81f0a1c97df25732a4e4507e8b7f8c8e4d
2021-05-07sonars policy-utils and feature-lifecyclejhh3-45/+32
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaf7423f840fb39a27c3e5fd293159d1336d5557a
2021-03-09add no locking featurejhh1-0/+3
It provides an interface to applications for locking purposes that always succeeds. It does not deny acquiring resource locks. Issue-ID: POLICY-3114 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6aebb5f40e4176e0ff7b0e6c6d4042a79dd0b7a3 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-19remove TransMetric - not neededjhh4-12/+12
Issue-ID: POLICY-3033 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I626de45b528bb891c79900085bfe783fe248b3fa Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-18deploy stats in lifecycle modulejhh1-2/+7
Issue-ID: POLICY-3033 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaa78aa48064e8288265aeb498279e9d8324538d8 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-12Merge "support transaction reports in engine"Ram Krishna Verma4-13/+233
2021-02-11support transaction reports in enginejhh4-13/+233
Issue-ID: POLICY-3033 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id1f02c86be491d5145e74725f76953e294e2975c Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-10More sonars in drools-pdpJim Hahn1-2/+2
Addressed the following issues: - log user-controlled data; moved the "NOSONAR" to a different line - make constructors protected Issue-ID: POLICY-2909 Change-Id: Ic69c100af777779e791c38cc444dd2ea726258f2 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-28sonars - protected constructors and typecastingjhh5-11/+12
Issue-ID: POLICY-3017 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7e7e384db26e244e2514aec3c3579b7b7f92f8a1
2021-01-14add methods to check if a fact exists.jhh3-16/+68
Issue-ID: POLICY-2762 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic00d2a548dbc904e044d2310c7d5439a1cb708a5 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-01-04Changed identifiers to concept identifiersliamfallon2-10/+12
The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: I677cc1f8730001b300ab2041f2d57c2485cbc4ed Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-31Fix more sonars in drools-pdpJim Hahn2-21/+30
Fixed more sonars in drools-pdp: - remove commented code - don't throw generic Exception - unused field (made it protected instead of private) - log conditionally - cognitive complexity - too many break/continue - return empty list instead of null - Random() is not secure Fixed more eclipse warnings: - parameterize generic types Issue-ID: POLICY-2616-sonars3 Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-25Address more sonars in drools-pdpJim Hahn1-16/+8
Addressed the following sonars: - either log or rethrow - call "remove()" for thread-local-storage - use assertEquals - only one method call in exception test - swap arguments in assertEquals - add assertion to assertThatThrownBy() - explain @Ignore Also addressed eclipse warnings: - unused fields and methods Issue-ID: POLICY-2616 Change-Id: I6590c0d2b103885bc933014d48bf5fd92401cd80 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-24exit jvm when detecting configuration problemsjhh2-2/+60
It follows the same approach that in other policy components by throwing a runtime-exception vs System.exit(x). Issue-ID: POLICY-2752 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iba508fc7095b060373742849e394c8fdd2a2334f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-07-21Merge "Support multiple Policy/Controller types using 'controller.type' ↵Jorge Hernandez6-17/+147
property"
2020-07-21Support multiple Policy/Controller types using 'controller.type' propertyStraubs, Ralph (rs8887)6-17/+147
It provides a feature base to allow for custom Policy and Drools Controllers. Issue-ID: POLICY-2415 Change-Id: Ibe3f11e3ecd925537ffd03d2420bb3b8214029c9 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-07-20Remove jackson from drools-pdpJim Hahn8-83/+3
Issue-ID: POLICY-1528 Change-Id: I616c48d62c63f8f213ec012f8746509471c38f89 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn4-13/+9
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-09Disable sonar main args for drools-pdpJim Hahn1-1/+6
Issue-ID: POLICY-2305 Change-Id: If056c7e9179e245fafd6badc70ff9eee78fb23b3 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-08Address more sonar issues in drools-pdpJim Hahn2-3/+3
Addressed the following sonar issues: - use of "synchronized" - use Files.delete() instead of File.delete() Issue-ID: POLICY-2305 Change-Id: Id55628fe12d9d764616e57321382a70cb5704ba1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-07Address sonar issues in policy-managementJim Hahn16-150/+147
Addressed the following sonar issues: - modified code to specify the correct class name in the getLogger() call - use equals() instead of "==" for string comparison - remove deprecated code - use ',' instead of "," in indexOf - remove code that is commented out; typically bogus, so the comment was adjusted to satisfy sonar - missing assert in junits - use "{}" instead of concatenation when using logger - either log or rethrow - put arguments for assertEquals() in the correct order - remove "return" statements from the end of void methods - don't always return the same value; just disabled sonar as refactoring would have obfuscated the code - cognitive complexity; used eclipse auto-refactoring to extract out chunks of code into separate methods - don't pass array of classes to class.getDeclaredMethod(); use ellided arguments instead - fix argument count in logger calls - remove unnecessary casts - don't use "volatile" - make methods "synchronized" to match parent class definitions Issue-ID: POLICY-2305 Change-Id: Ie96418f696da4ae6c2ca8d4a914371469e695419 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-01Sync controller capabilities as controllers bouncejhh2-4/+7
As native policies introduce temporality in policy types supported as they are removed and added, the associated policy types that can be honored at a a given time, may need to adjust. A significan portion of this review is dedicated to multi-policy junits and telemetry instrumentation. Issue-ID: POLICY-2459 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I62bbc03411446849eaa55c9b1524220dc13c2cb0 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-26native policy use engine for top-down processingjhh2-21/+50
This will ensure proper invocation of all feature hooks. Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8d1666bb5e9526faa588e4f613674e080181d4ba Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-10policy routing and reorg into policy-domainsjhh4-89/+4
- Native Drools Controller Policy support. - Move domain policies into the policy-domains project. - Route legacy/compliant operational policies to one or all controller supporting the policy's policy type. - Enhancements to scripts to invoke commands external to the container. Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id41f04d10a28d2ea86bdd41334e499c28d0438ae Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-02http server/client managementjhh4-29/+213
This is to support the new actor architecture configuration. Issue-ID: POLICY-1625 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ieda56be38b8572d75a5fbb3775067ab537310aa1
2020-02-26Undeploy support for native rules PDP-D policies.jhh3-9/+16
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaaf5e13a5db286928952bcb3e4cc0f526b0b133c
2020-02-11Move model base classes outside feature-lifecyclejhh2-0/+86
So, it can be used in drools-application without a feature dependency. Issue-ID: POLICY-2360 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1cf75bdd8739c35ea9b590896b177a519363e3d5
2020-02-06Store DomainMaker in PolicyEngine.jhh2-3/+22
Since this is going to be used in drools-applications, better to have it globally, reusing underlying "schema resources" rather than maintaining one or more instances in drools-applications. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0e339e77ea6281308be00381c7eda2cc9f4d6ac1