a.sreekumar [Thu, 10 Mar 2022 17:56:48 +0000 (17:56 +0000)]
Fix PAP healthcheck response during failures
The healthcheck response that is returned by PAP is not inline with the
actual healthreport. Even when the report has
healthy:false, code:503, message:not alive
the response code stays 200. This is fixed, this also makes the improved
readiness probe in OOM to work properly with the healthcheck calls
Change-Id: Ib208e0a84bce74157aacbcad61a11dcf900c7c94
Issue-ID: POLICY-4030
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
liamfallon [Thu, 10 Mar 2022 09:12:57 +0000 (09:12 +0000)]
update references in policy/pap pom
updated references in the policy/pap pom
*** This commit is generated by a PF release script ***
Issue-ID: POLICY-3982
Signed-off-by: liamfallon <liam.fallon@est.tech>
Change-Id: Ia809db011a805e9bec71b5843dbf6a3b5b2ea30b
Signed-off-by: liamfallon <liam.fallon@est.tech>
a.sreekumar [Mon, 14 Feb 2022 11:11:11 +0000 (11:11 +0000)]
Fix swagger and improve exception handling
1) Swagger was getting generated in a different format
due to a serialization isue. It is fixed.
2) Improved exception handling by taking care of any exceptions
that could occur in and around database operations.
3) AAF enabling/disabling was done using spring profiles.
This is changed to using parameters, as it is more easier to configure
in an OOM helm chart deployment
Change-Id: If1bee01379ba5c4efac29822662896d8aa883fc8
Issue-ID: POLICY-3975
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Liam Fallon [Fri, 25 Feb 2022 13:40:54 +0000 (13:40 +0000)]
Merge "Add support for populating metadataSet in PAP tosca policy"
rameshiyer27 [Fri, 18 Feb 2022 17:27:13 +0000 (17:27 +0000)]
Add support for populating metadataSet in PAP tosca policy
MetadataSet fetched from the db and added to the policy metadata map
with the key "metadataSet" before sending to PDPs
Issue-ID: POLICY-3832
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I14064d82ba6877bd7560af7de7572b4813a98385
a.sreekumar [Mon, 21 Feb 2022 13:13:20 +0000 (13:13 +0000)]
Adding deployment metrics to PAP
Change-Id: I4b6a93045c1ddfd7fff037e7568b029e2e45b0b3
Issue-ID: POLICY-3757
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Liam Fallon [Fri, 18 Feb 2022 10:52:50 +0000 (10:52 +0000)]
Merge "Use classes from policy/common"
Ram Krishna Verma [Wed, 16 Feb 2022 17:12:20 +0000 (12:12 -0500)]
Use classes from policy/common
Use YamlHttpMessageConverter from policy/common.
Use CustomImplicitNamingStrategy from policy/common.
Fix few sonar issues.
Issue-ID: POLICY-3931
Change-Id: I4720761cbf8da464ec57541f9b19f8d124503e17
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
a.sreekumar [Thu, 17 Feb 2022 15:51:15 +0000 (15:51 +0000)]
Fix PAP issue with group config loading
1) PAP fails to start in OOM when no pdp group configuration file is
specified with the recent changes. This is fixed.
2) logback.xml file mounted in OOM is not used by PAP. This is also
fixed in this review.
Change-Id: I84096e1b100e2be20a9a2d95e1eb6ffc79486f29
Issue-ID: POLICY-3754
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
a.sreekumar [Tue, 15 Feb 2022 12:45:29 +0000 (12:45 +0000)]
Fix issue with GeneratedValue in PfGeneratedIdKey
Change-Id: If244237e4aa39e1f3184cab04ae7d5ad7e85e5fa
Issue-ID: POLICY-3897
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Ajith Sreekumar [Mon, 14 Feb 2022 14:11:41 +0000 (14:11 +0000)]
Merge "Add yaml support to pap api's"
Prakhar Pandey [Thu, 10 Feb 2022 19:14:13 +0000 (14:14 -0500)]
Improve PAP healthcheck api to verify DB connectivity
This commit improves PAP healthcheck API to enable verification of PAP to DB connectivity.
Issue-ID: POLICY-3763
Signed-off-by: Prakhar Pandey <prakhar.pandey@bell.ca>
Change-Id: I14353572a00e68a89161bcffd2ec3476b4a4c303
Ram Krishna Verma [Thu, 10 Feb 2022 19:35:12 +0000 (14:35 -0500)]
Add yaml support to pap api's
Adding yaml support to pap rest api's.
Along with related unit tests.
Issue-ID: POLICY-3864
Change-Id: I43bdbbd4151bcae5dcf4752a9385b115efa947d3
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
a.sreekumar [Mon, 7 Feb 2022 16:05:17 +0000 (16:05 +0000)]
Move PAP database provider to spring boot default
This review makes PAP talk to DB directly using the spring repositories
instead of going to policy-models-provider.
The models-provider methods that were just used by PAP (and not used
anymore) will be removed in a different review.
Also a bug identified with the usage of GeneratedValue in
PfGeneratedIdKey (which is just used by PAP in statistics & audit) will
also be fixed in a separate review as part of POLICY-3897.
CSIT changes: https://gerrit.onap.org/r/c/policy/docker/+/127033
WIP OOM review: https://gerrit.onap.org/r/c/oom/+/127035
Change-Id: Idb13ba7eb2767cc718672b582a6518fcfc95320f
Issue-ID: POLICY-3867
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
a.sreekumar [Mon, 7 Feb 2022 11:22:59 +0000 (11:22 +0000)]
Use spring boot actuator version 2.5.4
The actuator version 2.5.0 which is currently used contains
a bug where some jvm metrics are lost. So, upgrading the version
to fix this issue.
Change-Id: Ib1084f3ab879bc035a11e2e1c5c6a5bd55c0c15d
Issue-ID: POLICY-3913
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
a.sreekumar [Tue, 25 Jan 2022 15:19:40 +0000 (15:19 +0000)]
Create spring repository layer for PAP
This review adds the spring repository and service layers to PAP.
Once this is merged, the next work will be to actually use these
spring boot based services to talk to the db directly,
and not using policy-models-provider in PAP.
Change-Id: Ib086b8b405020cb452e51d6359dd1a69d0000f74
Issue-ID: POLICY-3869
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
waynedunican [Wed, 5 Jan 2022 14:56:44 +0000 (14:56 +0000)]
Remove references to MariaDB from resource files
Issue-ID: POLICY-2086
Change-Id: I891feb05d2e964ae8d4454d30672ffc77c1da555
Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
Ram Krishna Verma [Mon, 24 Jan 2022 20:10:52 +0000 (15:10 -0500)]
Disable statistics for default installations
As discussed during weekly call, with the move towards prometheus way of
monitoring policy framework components. There is no need to keep the
statistics flag turned on by default and utilize resources in processing
& storing them. Hence, turning off the flag here.
Will raise another review for OOM.
Won't cause any breakage to CSIT as we are already providing config
to enable the statistics there.
Issue-ID: POLICY-3156
Change-Id: I89962277a6b9aede713317336f776ea3ed9ffd65
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
isaac [Tue, 4 Jan 2022 22:34:20 +0000 (16:34 -0600)]
Adding totalPolicyDeployCounts updates to PapStasticsManager
Issue-ID: POLICY-3836
Signed-off-by: isaac <isaac.adorno@att.com>
Change-Id: Ia4ed2595984f68bf75ca9dacb6aa76f04a306224
a.sreekumar [Fri, 3 Dec 2021 11:27:32 +0000 (11:27 +0000)]
Migrate pap startup & controllers to spring boot
This commit migrates pap config, startup and controllers to spring boot.
Change-Id: Icf91d728160a23db614dfba6b40ddccd2f6163a5
Issue-ID: POLICY-3754
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
liamfallon [Thu, 2 Dec 2021 15:53:57 +0000 (15:53 +0000)]
Update snapshot and/or references of policy/pap to latest snapshots
*** This commit is generated by a PF release script ***
policy/pap updated to its latest own and reference snapshots
Issue-ID: POLICY-3827
Signed-off-by: liamfallon <liam.fallon@est.tech>
Change-Id: Ic4a5c01efd0a2682e88242f192d50f5b9e042c8e
liamfallon [Mon, 29 Nov 2021 11:33:17 +0000 (11:33 +0000)]
Update snapshot of policy/pap to 2.6.1-SNAPSHOT
*** This commit is generated by a PF release script ***
policy/pap is update from 2.6.0-SNAPSHOT to 2.6.1-SNAPSHOT
Issue-ID: POLICY-3827
Signed-off-by: liamfallon <liam.fallon@est.tech>
Change-Id: Ic2f4f6b0a395298a74a7f354122605c64bfe2566
liamfallon [Fri, 26 Nov 2021 12:07:33 +0000 (12:07 +0000)]
Release docker images for policy/pap: 2.6.0
*** This commit is generated by a PF release script ***
This commit releases the docker images for repo policy/pap.
Issue-ID: POLICY-3827
Signed-off-by: liamfallon <liam.fallon@est.tech>
Change-Id: Ief35f74ef48b3f153a3771dc41556fdbb943fbea
liamfallon [Fri, 26 Nov 2021 10:41:37 +0000 (10:41 +0000)]
Release policy/pap: 2.6.0
*** Release Phase 8: This commit is generated by a PF release script ***
This is the eigth phase in releasing images, it releases policy/pap.
Issue-ID: POLICY-3827
Signed-off-by: liamfallon <liam.fallon@est.tech>
Change-Id: I0597b46454feacd06fe96c6ddedafb00b39e9372
liamfallon [Thu, 25 Nov 2021 11:41:05 +0000 (11:41 +0000)]
Update parent and common references
*** Release Phase 7: This commit is generated by a PF release script ***
This is the seventh release phase, it updates parent, common and models
references in policy/pap.
Issue-ID: POLICY-3827
Signed-off-by: liamfallon <liam.fallon@est.tech>
Change-Id: If831839719c7ff87a9cc3778cd7c6803676d7469
Signed-off-by: liamfallon <liam.fallon@est.tech>
adheli.tavares [Wed, 3 Nov 2021 08:42:47 +0000 (08:42 +0000)]
Rename username for PAP operations.
Use an account other than healthcheck in PAP for provisioning of policies.
Issue-ID: POLICY-2744
Change-Id: I897f7a4fffbac2d4bbd9cceb059bae1794753aa7
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Ram Krishna Verma [Mon, 25 Oct 2021 22:08:39 +0000 (18:08 -0400)]
Point to snapshot dependency
Issue-ID: POLICY-3788
Change-Id: I2b8a9edfe7e84bcc2ec312c705875a68953cc9ba
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
waynedunican [Fri, 8 Oct 2021 08:06:25 +0000 (09:06 +0100)]
PAP S3P jmx file changes
Issue-ID: POLICY-3653
Change-Id: I4a7b033d6ba0356c46c571640e85c40253ec6ad5
Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
a.sreekumar [Thu, 14 Oct 2021 11:24:23 +0000 (12:24 +0100)]
Bump policy/pap to jakarta 2.6.0-SNAPSHOT
Change-Id: I2343607e6cf92488c6f74107ced8c4234d126d26
Issue-ID: POLICY-3696
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
a.sreekumar [Thu, 14 Oct 2021 10:58:10 +0000 (11:58 +0100)]
Bump policy/pap to 2.5.2-SNAPSHOT
Change-Id: Ifadbff28b39582016096865565d4b5c76f8dd027
Issue-ID: POLICY-3696
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
a.sreekumar [Thu, 14 Oct 2021 10:07:11 +0000 (11:07 +0100)]
Release policy-pap 2.5.1 docker artifacts
Change-Id: I637992c444a171d8ea1b16ca738f3b0151e1fa7f
Issue-ID: POLICY-3696
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
a.sreekumar [Thu, 14 Oct 2021 09:48:09 +0000 (10:48 +0100)]
Release policy-pap 2.5.1 maven artifacts
Change-Id: I8992fb6d0116ba8a5ced46c3703589119303aeee
Issue-ID: POLICY-3696
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
liamfallon [Wed, 13 Oct 2021 14:27:57 +0000 (15:27 +0100)]
Update parent/common/models/docker references
Issue-ID: POLICY-3696
Change-Id: Ie3cfd25c36e30d7e85448da48a27419252cea077
Signed-off-by: liamfallon <liam.fallon@est.tech>
Ram Krishna Verma [Tue, 14 Sep 2021 21:36:41 +0000 (17:36 -0400)]
Bump pap to 2.5.1-SNAPSHOT
Issue-ID: POLICY-3587
Change-Id: I525db19433347938645d31670729a9429ed0eb91
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Tue, 14 Sep 2021 20:27:19 +0000 (16:27 -0400)]
Release pap 2.5.0 docker image
Issue-ID: POLICY-3587
Change-Id: I25e68b0b3e88a7c376e50cb714a010f1946dc38f
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Tue, 14 Sep 2021 18:47:05 +0000 (14:47 -0400)]
Release pap 2.5.0 maven artifacts
Issue-ID: POLICY-3587
Change-Id: Ie29d403988c3034cc5ac4363e71cb6ad1019e10c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
liamfallon [Mon, 13 Sep 2021 15:42:20 +0000 (16:42 +0100)]
Use released common and models
Issue-ID: POLICY-3587
Change-Id: Ia5cfbb56c44284d459c7e019e2a69a0b9d6b2d70
Signed-off-by: liamfallon <liam.fallon@est.tech>
liamfallon [Thu, 9 Sep 2021 14:57:48 +0000 (15:57 +0100)]
Point at released policy-parent
Issue-ID: POLICY-3587
Change-Id: I0d9a61219cef4d78e8e17d79f218b88a569bde81
Signed-off-by: liamfallon <liam.fallon@est.tech>
Pamela Dragosh [Thu, 9 Sep 2021 13:36:22 +0000 (13:36 +0000)]
Merge "Update INFO.yaml"
liamfallon [Wed, 8 Sep 2021 11:24:59 +0000 (12:24 +0100)]
Update INFO.yaml
Update the INFO.yaml file with latest information.
Issue-ID: POLICY-3552
Change-Id: I269cb7142a9820356f9d4954d005bd5ea182c342
Signed-off-by: liamfallon <liam.fallon@est.tech>
jhh [Tue, 7 Sep 2021 00:24:08 +0000 (19:24 -0500)]
Decrease eclipselink verbosity to warning
Issue-ID: POLICY-3611
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ia7e2ccba793bf7e0ee686c874b395ff728d68af3
Jim Hahn [Thu, 2 Sep 2021 13:39:37 +0000 (09:39 -0400)]
Fix PAP PDP expiration timer
Added runtime exceptions to the "catch" clause so that the thread
associated with the PDP expiration timer will not terminate.
Also added to a few other "catch" clauses, particularly those in the
REST controllers.
Issue-ID: POLICY-3625
Change-Id: I9206121d3e9b91da593ae771e7586752b13949be
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 26 Aug 2021 17:34:22 +0000 (13:34 -0400)]
Use policy/docker image 2.3.0
Issue-ID: POLICY-3587
Change-Id: Ieedb4fc34a54306d74a3bf5b934ee36e2e07077f
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Tue, 24 Aug 2021 21:33:07 +0000 (17:33 -0400)]
Add dmaap connectivity check in pap
Add dmaap connectivity check in pap consolidated health check.
Make a rest call to fetch all the topics.
Verify POLICY-PDP-PAP topic is present.
Issue-ID: POLICY-2896
Change-Id: Ide39c70999eaca61205225c95b904e3009d41408
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Mon, 23 Aug 2021 19:02:51 +0000 (15:02 -0400)]
Fix junits broken by change in is-alive type
Issue-ID: POLICY-3531
Change-Id: I1e66779f4ac05862649828e79914e902a99400d3
Signed-off-by: Jim Hahn <jrh3@att.com>
a.sreekumar [Mon, 23 Aug 2021 14:29:14 +0000 (15:29 +0100)]
Enable prometheus by default in policy-pap
Change-Id: Id75de7a8c02531acb9c461e917be971feca94ffd
Issue-ID: POLICY-3538
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
ktimoney [Tue, 17 Aug 2021 15:59:09 +0000 (16:59 +0100)]
Update Policy Components not to create tables
Issue-ID: POLICY-3488
Change-Id: I945a19eb6bd7b943adaedc1ea836ec6030c9b001
Signed-off-by: ktimoney <kevin.timoney@est.tech>
Ajith Sreekumar [Tue, 10 Aug 2021 16:13:42 +0000 (16:13 +0000)]
Merge "Update postman collection for pap api's"
Ram Krishna Verma [Mon, 9 Aug 2021 20:01:24 +0000 (16:01 -0400)]
Update postman collection for pap api's
Update postman collection in pap to sync with recent changes made in audit & statistics api's.
Issue-ID: POLICY-3528
Change-Id: I38fe28cb6f7303ecb78f74c3546dee1962af9531
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Taka Cho [Mon, 9 Aug 2021 18:55:15 +0000 (14:55 -0400)]
use url resource for docker-tag -- pap
use groovy url resource from docker repo
to identify the tag for docker
Issue-ID: POLICY-3378
Change-Id: I1abd43ae0cd6f0ddc1060ccb525d2ba43e39f392
Signed-off-by: Taka Cho <takamune.cho@att.com>
Ram Krishna Verma [Thu, 5 Aug 2021 20:47:47 +0000 (16:47 -0400)]
Use lombok in pap
Issue-ID: POLICY-3399
Change-Id: I839f67ff02fdabcb4012a340f7a6a7528dc107e5
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Tue, 3 Aug 2021 22:03:10 +0000 (18:03 -0400)]
Update query params in audit api's
Updating query params in audit api's
to keep them in sync with statistics api's.
Issue-ID: POLICY-3527
Change-Id: I096436930450c263835ff8852edd40655de4fb0d
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Fri, 30 Jul 2021 18:54:35 +0000 (14:54 -0400)]
Add time ranges to PAP statistics API
Issue-ID: POLICY-3511
Change-Id: Ifc91e4732b3574da37f55658b23faf8a9f8091f5
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 30 Jul 2021 17:43:30 +0000 (17:43 +0000)]
Merge "Fix swagger tags in controllers"
Ram Krishna Verma [Thu, 29 Jul 2021 20:49:06 +0000 (16:49 -0400)]
Add audit api's to postman collection
Adding policy audit api's to the postman collection in pap.
Issue-ID: POLICY-3340
Change-Id: Ic549ad2e242dd611cac5434b5fc7b0ec052db3ac
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Thu, 29 Jul 2021 20:42:07 +0000 (16:42 -0400)]
Fix swagger tags in controllers
Fixing the swagger tags in controllers to match with documents.
Issue-ID: POLICY-3340
Change-Id: Ib30029cc4efa287348f5869f036b30cbab3db079
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ajith Sreekumar [Thu, 29 Jul 2021 13:38:31 +0000 (13:38 +0000)]
Merge "Add datetime format to audit api's"
Ram Krishna Verma [Tue, 27 Jul 2021 20:22:27 +0000 (16:22 -0400)]
Add datetime format to audit api's
Adding datetime format to audit api's
so that clients can send the request in one common format.
Changed the format to epoch timestamp.
Fixed review comments.
Issue-ID: POLICY-3340
Change-Id: I613ac02154a3e521ae97f7ac2e6129f642164b3f
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Wed, 28 Jul 2021 14:03:50 +0000 (10:03 -0400)]
Remove statistics record limits from PAP
policy/models statistics provider has now been enhanced to limit the
record counts. Stripped the code from PAP, as it's no longer needed
there. Also simplified the PAP statistics provider down to one query
method, taking a filter.
Issue-ID: POLICY-3511
Change-Id: I8a8797be191dc1f299b1c4084b0108a3ab89ff61
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Wed, 21 Jul 2021 22:24:57 +0000 (18:24 -0400)]
Add apis for policy audit
Adding api's to fetch policy audit records from db.
This is as per the design documented here -
https://wiki.onap.org/display/DW/PAP+REST+API+changes+for+Istanbul+release
Issue-ID: POLICY-3340
Change-Id: Iff80ab695d17ec38d4fe8ab98c0b95048cbae448
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ajith Sreekumar [Wed, 21 Jul 2021 11:35:59 +0000 (11:35 +0000)]
Merge "Use docker registry properties in pap"
Jim Hahn [Tue, 20 Jul 2021 13:57:03 +0000 (09:57 -0400)]
Use docker registry properties in pap
Issue-ID: POLICY-3374
Change-Id: Ibc4fe79ec588d5b7342d8d667d51d8b5662fd031
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 19 Jul 2021 15:21:33 +0000 (11:21 -0400)]
Use new RestClientParameters class in PAP
Replaced generic BusTopicParams with more specific RestClientParameters.
Issue-ID: POLICY-3456
Change-Id: Ic1a3acca5b651730fc74332c2c5d5bc36bccb790
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 13 Jul 2021 18:02:30 +0000 (14:02 -0400)]
Limit statistics record count
Modified PAP, for Honolulu only, to limit the number of statistics
records retrieved from the DB.
Also added the recordCount parameter to the REST APIs, because otherwise
it would only return one record.
Per review comments:
- removed default value annotation; relying on the Provider code to
change "0" to a reasonable default
Issue-ID: POLICY-3485
Change-Id: Ib0820cfda95672f1bc6f879dfd2ac172e7b42f0d
(cherry picked from commit
190b75c59bcc6f250446b627a96e4a12de52278f)
Signed-off-by: Jim Hahn <jrh3@att.com>
Dragosh, Pamela (pd1248) [Tue, 13 Jul 2021 14:34:15 +0000 (10:34 -0400)]
Update Pam's email INFO.yaml
Issue-ID: POLICY-3484
Change-Id: I3ba078199300574bd34dd3fd04022fa784fbd909
Signed-off-by: Dragosh, Pamela (pd1248) <pd1248@att.com>
adheli.tavares [Tue, 6 Jul 2021 15:49:41 +0000 (16:49 +0100)]
Update pdp statistics to count deploy/undeploy separately.
Issue-ID: POLICY-3383
Change-Id: Iec7875fb1fa6a4a360b8cfdff0b80f697a289de3
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Jim Hahn [Wed, 7 Jul 2021 12:26:04 +0000 (12:26 +0000)]
Merge "Use separate subscription for heartbeats"
Jim Hahn [Tue, 6 Jul 2021 20:03:22 +0000 (16:03 -0400)]
Fix NPE in UpdateReq.reconfigure()
While running CSIT to test heartbeat changes with multiple PAPs,
observed an NPE in UpdateReq.reconfigure(). Modified the code to
always use deployment lists instead of null lists.
Issue-ID: POLICY-3460
Change-Id: I884e091817e88309330139a01d060e286bd42008
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 6 Jul 2021 14:19:52 +0000 (10:19 -0400)]
Use separate subscription for heartbeats
Separated the heartbeat processing onto its own POLICY-HEARTBEAT topic,
still on the "real" (i.e., "effective") POLICY-PDP-PAP topic, like we
had originally been doing with the statistics. With this change,
statistics processing continues to be part of the heartbeat
class/processing, thus a separate class is not required to listen for,
and handle, statistics.
This new subscription uses a shared consumer group so that only one PAP
will process any given heartbeat message, which should reduce the
likelihood of DB contention and duplicate keys.
This also means that the "saveStatisticsInDb" flag will still be used,
which is a more obvious mechanism for controlling the storing of
statistics than the presence/absence of a topic in the config file.
Issue-ID: POLICY-3460
Change-Id: Ia07132b1c7aef006af86fddbe677fb1243a4e2c3
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 5 Jul 2021 12:13:20 +0000 (12:13 +0000)]
Revert "Add listener to collect PDP statistics"
This reverts commit
7b4a8ec06c8266f368a31cdafe75cf8a59304c83.
Reason for revert:
Decided to have the whole heartbeat processing use its own subscription, thus no need for a new class/topic just to collect statistics.
Issue-ID: POLICY-3405
Change-Id: I71580f877dae86a058ee881bc10f7bd1f57ff338
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 30 Jun 2021 21:36:34 +0000 (17:36 -0400)]
Add listener to collect PDP statistics
This new class will be tied into the existing code via the next review.
Issue-ID: POLICY-3405
Change-Id: I4317ccba3eda6863ce96a6db4ef20816e59a7f2d
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Tue, 29 Jun 2021 21:01:21 +0000 (17:01 -0400)]
Add ability to turn on/off pdp statistics
Adding an ability in pap to turn on/off processing of pdp statistics.
By default it will be turned on and can be changed via configuration.
Issue-ID: POLICY-3450
Change-Id: I093fe3f1390769f9acf2cfe85dd0d4edf0539de8
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Tue, 29 Jun 2021 21:12:06 +0000 (17:12 -0400)]
Fix sonars in pap
Fixed:
- indentation
- use isEmpty()
- use isZero()
Issue-ID: POLICY-3287
Change-Id: Idcfba3a6839a47c3136fca8500128990ed64dcb1
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 29 Jun 2021 16:19:21 +0000 (16:19 +0000)]
Merge "Set "source" name in PAP PdpMessages"
Jim Hahn [Tue, 29 Jun 2021 15:17:39 +0000 (15:17 +0000)]
Merge "PolicyAudit creation when deploy/undeploy triggered."
Jim Hahn [Mon, 28 Jun 2021 18:28:01 +0000 (14:28 -0400)]
Set "source" name in PAP PdpMessages
Used the unique name generator to initialize the PAP_NAME constant which
is then stuffed into the various outgoing PdpMessages.
Issue-ID: POLICY-3409
Change-Id: I45d26403b4f3de4b040cad779f29c82f35bacf42
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 28 Jun 2021 18:03:28 +0000 (18:03 +0000)]
Merge "Send pdp-update if PDP response doesn't match DB"
liamfallon [Mon, 28 Jun 2021 10:12:16 +0000 (11:12 +0100)]
Update pap for checkstyle 8.43
Updates are indentation changes on annotations.
Issue-ID: POLICY-3209
Change-Id: I3878ea476550e7522605e53bffa5c9c123030cdf
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Wed, 23 Jun 2021 20:27:20 +0000 (16:27 -0400)]
Send pdp-update if PDP response doesn't match DB
Because multiple PAPs can be updating the DB, it's possible that a
pdp-update sent by a PAP does not reflect the latest deployment data
in the DB. To solve that problem, modified code to compare any response
received from a PDP with what's in the DB, potentially generating a new
pdp-update (and/or pdp-state-change).
Issue-ID: POLICY-3426
Change-Id: I241994330d7645c0fffe66abc33de67d71d77250
Signed-off-by: Jim Hahn <jrh3@att.com>
adheli.tavares [Tue, 22 Jun 2021 12:50:52 +0000 (13:50 +0100)]
PolicyAudit creation when deploy/undeploy triggered.
Creates audits for policy when:
- deploy
- undeploy
- undeploy when failure
Issue-ID: POLICY-2899
Change-Id: Ib1a7cc4f826b5dceefcd5c7ba5250647f2cc0121
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Jim Hahn [Fri, 25 Jun 2021 17:09:00 +0000 (13:09 -0400)]
Fix broken junits
Some junits are broken since adding the expiration timer. Changed the
length of the heartbeat in an attempt to fix it.
Issue-ID: POLICY-3407
Change-Id: I81046476e243a0bf20ae9db9259be4464418e73e
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 23 Jun 2021 14:11:14 +0000 (10:11 -0400)]
Remove expired PDPs
Added code to remove PDPs for which no message has been received for a
while.
Added a max-age field to the request-map parameters, changing the
parameters class to use a Builder, in the process.
Deleted the PdpTracker class, as its functionality was replaced by the
expiration checker.
Changed port numbers in some tests, due to collisions in junit tests.
Issue-ID: POLICY-3407
Change-Id: Ifbfbc03b833a4f11ee5e910e256ee42e21a0afab
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 18 Jun 2021 21:41:15 +0000 (17:41 -0400)]
Update timestamp of PDP record
Modified the code to update the record timestamp when a heartbeat is
received from a PDP.
Also used Map operations instead of List operations to construct policy
deploy/undeploy lists so they can be constructed in O(N) instead of
O(N^2).
Issue-ID: POLICY-2898
Change-Id: Ic7b2b9a249fa0563b625e98855c79f96c6ee81d4
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 18 Jun 2021 17:57:03 +0000 (13:57 -0400)]
Fix new checkstyle issues in pap
The new version of checkstyle identified new issues. Fixed those.
Issue-ID: POLICY-3287
Change-Id: I18a34cbc6197266375981031106acc38385c69b5
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 15 Jun 2021 20:18:55 +0000 (16:18 -0400)]
Use new filtering methods in PAP
Modified PAP to use the new filter parameters classes instead of the old
methods that take lots of parameters.
Issue-ID: POLICY-3094
Change-Id: I46ac6d95a8f1e56ced8ed39474eb5a1031142dd7
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 10 Jun 2021 19:42:16 +0000 (15:42 -0400)]
Sonars in pap
Fixed sonars:
-use correct class name in logger
Issue-ID: POLICY-3287
Change-Id: I62fab4b48151d8f2ca32ad5d2951e7359210e2c0
Signed-off-by: Jim Hahn <jrh3@att.com>
jhh [Wed, 2 Jun 2021 17:27:51 +0000 (12:27 -0500)]
remove quoting the groups var in policy-pap.sh
Issue-ID: POLICY-3331
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Idccfa3761b9a7d9d8907f105a261c9c7c85e70c5
(cherry picked from commit
689ec7f2a61c0f5347d807f70244588590cd9b8a)
Jim Hahn [Tue, 1 Jun 2021 14:49:40 +0000 (10:49 -0400)]
Update junits for bean validator field name
Now that the bean validator uses the serialized field name in its error
messages, updated the junits to use the serialized names, too.
Issue-ID: POLICY-3333
Change-Id: I5d447851b72f460fa71e57936847664e2c789462
Signed-off-by: Jim Hahn <jrh3@att.com>
waynedunican [Wed, 2 Jun 2021 10:57:55 +0000 (11:57 +0100)]
Fix build failure and remove unused imports
Issue-ID: POLICY-3339
Change-Id: I0c9bd25e63b24ba3ac7e38a77e963fcdbaa4d26a
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Jim Hahn [Tue, 1 Jun 2021 14:42:08 +0000 (14:42 +0000)]
Merge "support external configuration of pdp groups"
jhh [Thu, 27 May 2021 19:41:11 +0000 (14:41 -0500)]
support external configuration of pdp groups
- modify policy-pap.sh to optionally provision
a custom group if such a file is present.
Issue-ID: POLICY-3331
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ib53bc14ee6b9471ab48f5a792b4283db3ed53b93
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
waynedunican [Mon, 10 May 2021 11:12:56 +0000 (12:12 +0100)]
Update PAP to check for deployed policies only
Have PAP compare the returned list against the delta deployment list instead of comparing against the full list of policies as is the current behaviour. Any references to "get" or "set" policies methods have also been removed
Issue-ID: POLICY-3263
Change-Id: I0efe03e835db3c4b2136f7e742bba0e78dc2ac44
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Signed-off-by: WayneDunican <wayne.dunican@est.tech>
Ram Krishna Verma [Thu, 13 May 2021 19:28:28 +0000 (15:28 -0400)]
Remove csit folder from policy/pap
The csit test files for all repos have been consolidated in policy/docker to maintain them at single place and allow us to trigger verify jobs in gerrit reviews.
Issue-ID: POLICY-3257
Change-Id: I8f80d6a8b56fd5c931f2ba1801c855c125d9704c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Thu, 6 May 2021 21:32:21 +0000 (17:32 -0400)]
Fix sonars in policy-pap
Fixed:
- use "var" instead of actual type
- remove unused parameter
- remove un-thrown exception from method declaration
- call isPresent() before Optional.get()
- check empty list before invoking doesNotContain()
Issue-ID: POLICY-3285
Change-Id: Ic90dccfd591c102ce29f14084f025b3ca69587dc
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Thu, 6 May 2021 19:30:11 +0000 (19:30 +0000)]
Merge "Query deployed policies by regex"
arkadiusz.adamski [Tue, 13 Apr 2021 10:23:28 +0000 (11:23 +0100)]
Query deployed policies by regex
- Query deployed policies by regex on the name, for a given policy type
Issue-ID: POLICY-2535
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: Ia2be683d044b22e4104ae14e2ce301882091c8ea
Ram Krishna Verma [Wed, 5 May 2021 16:55:29 +0000 (12:55 -0400)]
Remove deprecated robot methods in pap csit
Removing the deprecated methods from pap csit as they will be no longer supported by robot framework.
Issue-ID: POLICY-3257
Change-Id: I2aab85a6704ab12b732ef97e23db6acd60e0e7c0
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Mon, 3 May 2021 21:34:46 +0000 (21:34 +0000)]
Merge "Remove GroupValidationResult"
Jim Hahn [Tue, 27 Apr 2021 14:30:14 +0000 (10:30 -0400)]
Remove GroupValidationResult
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.
Issue-ID: POLICY-2059
Change-Id: I9597dc84e8a81ac5b8954bb2ce4ad0d7e2a3a4a7
Signed-off-by: Jim Hahn <jrh3@att.com>
a.sreekumar [Tue, 27 Apr 2021 15:51:45 +0000 (16:51 +0100)]
Fixing issue where PdpHeartbeats are incorrectly processed by PAP
The below 2 issues are fixed in this review:
1) When updating the policiesToBeUndeployed, the policies list in the
message itself was getting removed, which resulted in incorrect
processing. This was the reason for continuos UPDATE and STATE_CHANGE
messages from PAP to PDP.
2) In case if the policy list in heartbeat doesn't include one or more
policies that are supposed to be deployed(as per DB), the PAP should
send UPDATE messages to PDP asking to deploy them too. But this was
not working as the policiesToBeDeployed list was not getting
initialized properly before getting processed.
Change-Id: I06dbfd1d40bae8a510fc5500fbd38fb87c203c0d
Issue-ID: POLICY-3248
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>