Update Pdp policy status during registration or State change 44/118044/6
authora.sreekumar <ajith.sreekumar@bell.ca>
Thu, 18 Feb 2021 14:13:29 +0000 (14:13 +0000)
committera.sreekumar <ajith.sreekumar@bell.ca>
Fri, 19 Feb 2021 15:21:56 +0000 (15:21 +0000)
commitde818b6638b3fe537017fd103c0b9997b707dce0
tree3bd3da682c03c6bcac15104ab10a39738f29ad1b
parentcd8c7690c302973da1811be81a5453aef7469c10
Update Pdp policy status during registration or State change

The Pdp Policy Status is not updated during the pdp heartbeat
handling/registration flow, or during State change.
When a PDP goes down the pdppolicystatus gets cleared. But when the PDP
comes back online, PAP deploys the right policies into it, but the
deployment status was not getting updated.
Similarly, when the State is changed to PASSIVE, the status should be
undeployed, and when the state is changed back to ACTIVE, then the
status should be deployed for any active policies in any PDP.
These issues are fixed here.

Updating postman collection.

Also updating the csit test to check for 202 instead of 200 for the
deployment api response.

Change-Id: I1e05f22df23daaa8da8be1376413e995be2376f3
Issue-ID: POLICY-2526
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
main/src/main/java/org/onap/policy/pap/main/comm/PdpMessageGenerator.java
main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java
main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupStateChangeProvider.java
postman/pap-api-collection.json