Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Issue-ID: POLICY-2086
Change-Id: I891feb05d2e964ae8d4454d30672ffc77c1da555
Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
|
|
Issue-ID: POLICY-3836
Signed-off-by: isaac <isaac.adorno@att.com>
Change-Id: Ia4ed2595984f68bf75ca9dacb6aa76f04a306224
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- 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>
|
|
Added code to validate the parameters of the REST calls. As it turned
out, validation only needed to be added to one call.
Issue-ID: POLICY-2542
Change-Id: Ia9aabf75e06d6d5f996be9e3ed804218319f70c2
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The Keystore is no longer needed in the tarball, as it is supplied
externally by the CSITs and Helm charts. Deleted that file.
Also modified the junits to use utils-test to generates keystores at
runtime, thus deleted the junit keystore file, too.
Issue-ID: POLICY-3143
Change-Id: I2b0c4868613e0923aad87844dd16f3ac236d4291
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-3139
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I728118f2eb691dddb93b36c832eb4c8a72e0d5af
|
|
Removed old code that tracked the status using a cache. Modified the
code to use the status found in the DB instead.
Issue-ID: POLICY-2648
Change-Id: I4f1f5201eff7b3352631f50d67c40349ac7f2014
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-2900
Change-Id: I986074f69bef24ca894adc38eaf8b3ca4b4dc5a2
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
The legacy operational policy type for apex has been removed in Guilin release.
Removing it fron pdpGroup config in PAP.
Issue-ID: POLICY-2857
Change-Id: Iddf2e6b6301dbab3addcbff4c806142f4cf8e6c6
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
|
|
Issue-ID: POLICY-2827
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I95db673538947cccc39bb5a389ab3f544fa91af8
|
|
Changing the policy component health check to fail if the required
PDP instances are down or not registered with PAP.
The check is performed by comparing the "currentInstanceCount"
& "desiredInstanceCount" fields of PdpSubGroup.
Issue-ID: POLICY-2718
Change-Id: Iad1075d0812f4ef166dfed4f110eff4d9e5f995e
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
|
|
Modified PAP to discard any messages old than 10 minutes so that
if PAP is unable to communicate with DMaaP and then suddently gets
flooded, it will discard old messages.
Updates per review comments
- made the "max message age" configurable, with a default of 10 minutes
Issue-ID: POLICY-2170
Change-Id: I541c03aabf29482af12a07f51eeb5888bbafbf31
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-2402
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6386a6185089bfcc4358db2a0bdfe7a977b23992
|
|
Policy models now throws an exception with a 404 code when policies are
not found. This change amends PAP to cope with this change.
Note: This change should be merged directly after the following
policy-models patch:
https://gerrit.onap.org/r/c/policy/models/+/101544
Issue-ID: POLICY-1402
Change-Id: Id38af4b2ad65797592c077e276861b962bc53ea2
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Modified the code as follows:
Until all PDPs have responded (or been removed), no notifications for
their associated policies will be generated. However, once a response
has been received for every PDP, then a notification is generated.
For deployed policies, the notifications will continue to be generated
as PDPs move back and forth between the success and failed states, as
long as the policy is not undeployed.
For undeployed policies, on the other hand, no additional notifications
will be generated once all PDPs have successfully undeployed the policy.
However, until that point, like with deployed policies, notifications
will continue to be generated as PDPs move back and forth between the
success and failed states.
Added notification verifications in deploy and undeploy end-to-end tests.
Issue-ID: POLICY-2347
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I7d18dad1a7500e1efb7074e89ddaca4b1d368965
|
|
|
|
Issue-ID: POLICY-2303
Change-Id: Ide10256556a20e2ab3977ab2cfd876dd82e44390
Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
|
|
Issue-ID: POLICY-1629
Signed-off-by: ning.xi <ning.xi@est.tech>
Change-Id: I104fc448d27a282c01e7f54db300f918374b8d07
|
|
Change-Id: I09b373a511eaa20603d4d2de71a2a5a6bf652b3b
Issue-ID: POLICY-2315
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
Issue-ID: POLICY-1689
Change-Id: I3b84094e217c8cda115efdbf3444e92f08013a7c
Signed-off-by: Hengye <yehui.wang@est.tech>
|
|
Modified the deploy controller and provider to only update the
policies within a group, while leaving the other fields unchanged.
Added delta operations so that only additions or deletions need
be included instead of providing the complete list of policies.
Change-Id: Id2b69dac15f97b8a898f459f8d3f09216fc3618e
Issue-ID: POLICY-2274
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Create an API to create/update PdpGroups.
Policies are not allowed to be deployed as part of PDPGroup
create/update operation. There will be a separate API as part of
POLICY-2274 to deploy policies into individual group/subgroups.
Change-Id: I4e2cb43fefe08b22d6f70a1db7c026e83f0ebde0
Issue-ID: POLICY-2273
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
During heartbeat processing, if the pdp instance is not found in the DB
then registering the pdp again. So that it doesn't go out of sync.
Added related test cases.
Issue-ID: POLICY-2158
Change-Id: I557e2397536fd5b3a2783ec89d75ca0e43dcf9d0
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Adding pdpGroup as the matching condition for registration of Pdps.
Removing the check of supported policy types in pdp heartbeat.
Adding check of policies in pdp heartbeat.
Adding comprehensive unit test coverage (98%) for the heartbeat
listener.
Issue-ID: POLICY-2231
Change-Id: I0fb961717c74656c5f1b6937b6c3a1410382a76e
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Allow supported policy types to end with ".*", which causes the prefix
to be matched when new policies are deployed. This entailed updates
in three areas:
- when a subgroup is added via the group api
- when a subgroup is updated via the group api
- when a policy is deployed via the simple api
Issue-ID: POLICY-1636
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I4ae15971481ce5b2042b5d6fdfd16e11ad099c50
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
As part of this, added code to pre-load the deployed policy tracker
by reading the policies and groups from the DB.
Change-Id: Ifc6c787d114a3a7add4ea54acc1cc969d6c3ca1c
Issue-ID: POLICY-2024
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Updated existing PAP code to make use of new notification classes.
Change-Id: I4637ad92ac4f432f215cfc837e672c75074d88b5
Issue-ID: POLICY-1841
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This review adapts policy-pap for the change in the structure
of the toasca service template from a list of maps to a plain map.
There is only a change to one test file.
Issue-ID: POLICY-2047
Change-Id: Ieeeeb43d8f0300d075b3072b67f8d459def27ee7
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Issue-ID: POLICY-1988
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I3e7d08621b6ac529f3517de8c2b910d2fa7c5151
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
1) The properties in the topic.properties file is moved into overall
config json file and the topic.properties file is removed.
2) Common parameters such as RestServer and Topic related parameters
from policy-common is used.
Change-Id: I390bbe3cda101a69e7ce614404ecdfbf98598dd2
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
|
|
Adding PdpGroup healthcheck REST API in PAP to return the health status
of all the Pdps registered with this PAP instance. The healthcheck
status will be based on the regular heartbeat coming from the pdps.
Change-Id: Ia0f1603b513bf62ce1df3058427dc6ccaf179cb3
Issue-ID: POLICY-1770
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
The policies listed in a "PDP Group Deploy" request may not have
fully qualified versions. Modified the code to replace the versions
in the request with fully qualified versions.
Also improved performance by avoiding look-ups of policies that
are already in the subgroup.
Change-Id: I37899c2b45228b97a80b7ef44f69694ba57e8f4a
Issue-ID: POLICY-1784
Signed-off-by: jrh3 <jrh3@att.com>
|
|
Added heart beat interval to the PDP-UPDATE message sent in response
to a heart beat message received from a PDP.
Added timers to detect missing heart beats and remove the PDP from
the DB - PdpTracker.
Modified current heart beat listener to update PdpTracker when a
heart beat is received.
Allow 3 missed heart beats instead of 2.
Change-Id: I81621fefbe494e0c4d6f0b9767b00b2a9dd398d8
Issue-ID: POLICY-1795
Signed-off-by: jrh3 <jrh3@att.com>
|
|
PAP should not allow multiple versions of a policy to be deployed
to the same PDP. Modified the code to reject deployment requests
where a different version of the policy is already deployed. This
impacts both the PDP-Group-Deploy and the Simple-Deploy REST APIs.
Change-Id: I586b764951c20228d0d80ec8326869215e970fdf
Issue-ID: POLICY-1785
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
When a subgroup is deleted via the PDP Group create/update API,
any PDPs in the subgroup should have all of its policies undeployed.
In the process, refactored addOrUpdateSubGroups() out of updateGroup().
Change-Id: I0750802bfb133a655e38493a868744b512ca3fb4
Issue-ID: POLICY-1803
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
When a group is created, PAP should verify that the "supported types"
exist in the DB.
Address potential sonar issue.
Address potential sonar issue in similar block of code.
Change-Id: Ib830550bc37d4ebe42c8782f3f874e463f3f51c2
Issue-ID: POLICY-1688
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added test that checks sunny day scenarios for the PAP REST API.
Uses real PAP components for everything except DMaaP. PDPs are
simulated.
Change-Id: If2adc3b1523b477c3efd3eb83fb7a7b04f40fa24
Issue-ID: POLICY-1670
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Add configurtion files that work with the DMaaP simulator.
Issue-ID: POLICY-1643
Change-Id: I8e387163ab190b9610669029720ccf7b9989cfdf
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Moved methods into nested class of PdpModifyRequestMap. Note: they
will have to be moved back out when the broadcast capability is
added.
Removed extra "continue" from Publisher.
Rather than remove unused parameters and cause significant clutter
to the code, chose to use the parameters in a logger call for RequestImpl.
Removed unnecessary cast from UpdateReq.
Use version constant in PapRestControllerV1.
Log exception in PdpGroupQueryControllerV1.
Log exception in PdpGroupStateChangeControllerV1.
Shortened functional in PdpGroupDeleteProvider.
Removed unnecessary type parameters from PdpGroupDeployProvider.
Removed unneeded parameter and exception from ProviderBase.
Extracted common string from Main.
Shorted functionals in PapActivator.
Changed uses of getCanonicalName() to getName(); the former only has
limited use, while the latter is typically what is wanted and is
actually required whenever forClass(name) is used.
Fix junit tests broken by rename of ToscaPolicy version from
"typeVersion" to "type_version".
Change-Id: Ia00e1b3541c9e25b196a951e45681f67aa7f1bfe
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The deploy/undeploy APIs used by CLAMP only pass the major number
when specifying a policy-version. Modified the code to handle
policy-versions of the form, major or major.minor.
Change-Id: I3251df162984f287bd1430b8e46da675b4c265ee
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|