Fixing issue where PdpHeartbeats are incorrectly processed by PAP 46/120946/1
authora.sreekumar <ajith.sreekumar@bell.ca>
Tue, 27 Apr 2021 15:51:45 +0000 (16:51 +0100)
committerRam Krishna Verma <ram_krishna.verma@bell.ca>
Tue, 27 Apr 2021 21:09:17 +0000 (21:09 +0000)
commit243d345e2b908c4e969652b04c3ad9f4a4b5d0e6
treef53d5b8730750e70226b1ab3009600f44ebb636b
parentdd0cc8aa1e69c7c37c1e4e283476a0e65a4b13af
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>
(cherry picked from commit cc70129c67ed6284c3d13593e6b19e19d73d3084)
main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java