aboutsummaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/test
AgeCommit message (Collapse)AuthorFilesLines
2024-11-07Fix references and organize dependencies in policy-drools afteradheli.tavares5-22/+26
splitting policy-endpoints and message-bus in policy-common Issue-ID: POLICY-5131 Change-Id: I0696fa2d692c794f332491bc15c106baff84a603 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-09-23Increase code coverage overalladheli.tavares13-190/+458
Issue-ID: POLICY-5068 Change-Id: I1763d3c00392ac655a998cd2fb869748a7323812 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-07-19Uplift json schema validator libraryadheli.tavares1-22/+10
Issue-ID: POLICY-5084 Change-Id: I426cd992895d4ce4b840ac1ab479152f954cceaf Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-02-09Removing deprecated DMAAP libraryadheli.tavares18-213/+221
Issue-ID: POLICY-4402 Change-Id: I4ce5b303cb3a775010683d3c7102b0bd065280ea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-01-09Drools support for kafka topicsadheli.tavares5-63/+105
Issue-ID: POLICY-4201 Change-Id: I91676c168c676018aa1079943747f16917f50a49 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-10-04Remove AAF from drools-pdpadheli.tavares1-70/+62
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-9/+4
Issue-ID: POLICY-4676 Change-Id: I85a0f6303b30cd0405d63be003c9288f59a9d6b7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-08-28Remove pdp statistics implementations from drools-pdprameshiyer273-87/+0
Issue-ID: POLICY-4109 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I9fd807e4df5392cef680202ad80c7cc269d7b349
2023-08-07Remove db based statistics from drools-pdpRam Krishna Verma1-25/+0
Removing the db based statistics from xacml-pdp, in favour of the prometheus based option. Issue-ID: POLICY-4109 Change-Id: I0bc7dbe55f13881fb792bd485cecff1dfc898dc0 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-10-19Support optional cluster name in policy enginejhh8-25/+27
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-03-08remove init, mdc, and controller logging featuresjhh1-3/+3
Issue-ID: POLICY-3922 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8267ea17c3340e47f85b54c641ddb14672776f70
2022-03-01Add controllers and remote servers healthchecksjhh1-1/+0
Issue-ID: POLICY-3977 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4fd4db29f99989a2ef11b08f66f28535bfd15a36 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-02-15Fix intermittent failure in metrics testrameshiyer271-2/+1
When the registry is cleared, it removes the Prometheus counters that are initialized by static definition causing the metrics test to fail. This issue occurs when this test is not invoked first in the order of test execution in feature-lifecycle. Issue-ID: POLICY-3832 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I9a55910bc39dbe1ad9f1153809bdf78bac3040b1
2022-02-14Handle metadata policy-id as objectjhh2-13/+20
Issue-ID: POLICY-3832 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I60b4c3b9f8d6f74161d2e9532b3c3adba10cdc6b
2022-02-02add prometheus deploy countsjhh1-3/+26
Issue-ID: POLICY-3761 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ib5dd109457049ac30269d68fcb803cb4a0426c92 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-08-09Merge "Use lombok in drools-pdp #3"Ram Krishna Verma3-9/+8
2021-08-06Use slf4j Marker from common repoTaka Cho5-19/+19
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-pdp #3Jim Hahn3-9/+8
Updated feature-healthcheck thru feature-pooling-dmaap. Issue-ID: POLICY-3397 Change-Id: Ia7b00a521cdb82ed0eb22bdaed03d02665fbbff1 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-08Update pdp statistics to count deploy/undeploy separately.adheli.tavares2-119/+153
Issue-ID: POLICY-3383 Change-Id: If8f1555aa0c509a35f4dd1821ddc5dd2f7294d2f Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-06-29Use unique name in drools PdpMessagesJim Hahn6-17/+17
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-05-31Remove policies field references from testswaynedunican4-9/+4
Remove policies field references from drools-pdp as this has since been removed from the PdpUpdate class in policy-models Issue-ID: POLICY-3339 Change-Id: Ib47408f54318a861fc569beed683e5cffcb2738e Signed-off-by: waynedunican <wayne.dunican@est.tech> Signed-off-by: WayneDunican <wayne.dunican@est.tech>
2021-05-07sonars policy-utils and feature-lifecyclejhh1-2/+1
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaf7423f840fb39a27c3e5fd293159d1336d5557a
2021-05-03support for PAP delta updatesjhh5-98/+141
Issue-ID: POLICY-3187 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I91b343feb28fdff6b2391387e51defbdcfbe7b0f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-03-03enable viewing lifecycle statistics with telemetryjhh1-3/+4
Issue-ID: POLICY-3121 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I25e8c4439c0a6beabe532c17cc58919f369f17f0 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-22Merge "support policy execution counts in lifecycle"Ram Krishna Verma1-1/+27
2021-02-22support policy execution counts in lifecyclejhh1-1/+27
Issue-ID: POLICY-3033 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic9150b9b76a04ee39cb0c0a78081ad22b21dcd02
2021-02-18support pdp-type configuration for PAP statusjhh4-3/+11
Issue-ID: POLICY-3070 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaddd9bac102cbe79626fe91d78a457dcfd4cb1fb Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-18deploy stats in lifecycle modulejhh5-16/+94
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-12Fix sonars from dependency 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. Changed one to openMocks() because using the Runner caused it to fail on jenkins, but not in the local eclipse. Also fixed a type safety issue with EMPTY_LIST. Issue-ID: POLICY-2909 Change-Id: Iea9420190f208d7de3bf3ad531515c92e0fab83f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-27sync policies when native artifact policies addedjhh10-35/+781
interoperability between native and non-native policies present several difficulties. The code submitted operates in deltas where deploy and undeploy operations are performed on the deltas of the updates. In order to support interoperability, policies not part of a delta update may need to be reapplied. For example, in the case when the delta is just a new native controller artifact, we should go through the set of already deployed policies and reapply non-native policies as long as the policy types that the native artifact policy supports. Issue-ID: POLICY-2762 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ieb8e5e17862e9d607433a1d4e86a026725d73498 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-01-11sort deploy and undeploy policy listsjhh1-0/+172
An order is imposed in the deployment and undeployment actions when the list of active policies is retrieved from PAP. This is to ensure that the operations are applied in a sane way, for example to try to prevent to undeploy policies before deleting a controller, etc .. The deployment order is 1) native controller, 2) native rule, and 3) non-native policies. The undeployment order is 1) non-native, 2) native rule, and 3) native controller policies. Issue-ID: POLICY-2762 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Icb15dcec87fd5d9917ee152ab15ca7277e13590a
2021-01-04Changed identifiers to concept identifiersliamfallon4-16/+20
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-11-18verify schema validation for any policy typejhh6-23/+200
Issue-ID: POLICY-2880 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0cc6e8967d42d347415857dc77976f2b8ab86516 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-11-17support for not validated policy typesjhh2-23/+59
Issue-ID: POLICY-2880 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id816bb3edd44c34a342cd7ada95dd8f2f9d1b0a6 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-08-25Address more sonars in drools-pdpJim Hahn1-3/+6
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-25block status operations until controllers readyjhh3-4/+23
Status messages to the PAP won't be send until all mandatory resources specified in the lifecycle.pdp.policytypes property are functional. Issue-ID: POLICY-2669 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia9d4c678fcfbdb232059d0827235845ee11f1201 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-08-20remove legacy operational policies supportjhh12-106/+46
Issue-ID: POLICY-2765 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6066b8040add53ed32572a71854f3f7094bc41d6
2020-07-06Checkstyle fixes to drools-pdpJim Hahn1-7/+7
Issue-ID: POLICY-2696 Change-Id: I7f80737c52e3f16e03803118d92411e4ac39c5fb Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn1-5/+5
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-06-11Merge "do strict validation before domain conversion"Pamela Dragosh2-4/+57
2020-06-10do strict validation before domain conversionjhh2-4/+57
need to perform a validation pass as the validation combined with putting a domain model object tree together run into problems when dealing with integers that are passed as strings. Issue-ID: POLICY-2577 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I06a2b6e8dc7e0442c2503b6d978deddbf652d830 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-05-26Tests must specify serialization providerJim Hahn1-1/+6
When GSON is made the default serialization provider, several junits break. Modified them to specify the GsonJackson provider, which is what the REST classes use in production. Issue-ID: POLICY-1526 Change-Id: If1bcb955d7411cf747a14a0bf1dc069b02e2f2ea Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-14native controller generates invalid propertiesjhh4-30/+135
Additional instrumetation and tests have been added as well. Issue-ID: POLICY-2489 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I65df586f3a44acf3d6f825ebfb8bd73107255a1f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-04-06Address sonar issues in drools-pdpJim Hahn3-4/+4
Addressed the following sonar issues: - add "final" to public static fields - commented code; some were bogus - just updated the comments so sonar is happy - use "{}" instead of string concatenation - junit should assert something - when using logger, invoke compute-intensive tasks conditionally - use superclass name instead of subclass name to access static fields - don't always return the same value - remove "transient" from fields of classes that aren't Serializable - don't nest try/catch blocks - use appropriate class name in Logger.getLogger() - use Predicate<T> instead of Function<T,Boolean> - remove unused parameters from private methods - either log or throw - remove duplicate methods - use remove() TLS instead of set(null) - null check is implicit in instanceof check - do something with return value - don't use volatile - don't return "null" list; used Optional instead - add no-arg constructor to non-Serializable superclass - add callSuper=true for EqualsAndHashCode - don't declare "throws XXX" where XXX is a subclass of RuntimeException - remove serialVersionUID field if the class isn't Serializable Also addressed some eclipse warnings: - unused fields - suppress generic typic cast warnings Issue-ID: POLICY-2305 Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-01Sync controller capabilities as controllers bouncejhh3-61/+321
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-22Fix op policies distribution to controllersjhh12-32/+419
Fix a bug when distributing a policy to the right controller plus additional junits to catch similar issues. Issue-ID: POLICY-2356 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I25fefa64ad54c55e6516ae18c6895b6de9407419 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-10policy routing and reorg into policy-domainsjhh10-776/+139
- 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-03Undeploy support for drools policies.jhh5-14/+94
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4c5ed6752a32c9c2391cf03dd56cb2f1abc32dfd Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-27Undeploy support for native rules PDP-D policies.jhh1-36/+58
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic829bda9dbbb54d8883df6c642c1895cd7936823
2020-02-26Undeploy support for native rules PDP-D policies.jhh6-6/+161
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaaf5e13a5db286928952bcb3e4cc0f526b0b133c