Adding algorithm for Pdp registration 45/86545/5
authorramverma <ram.krishna.verma@est.tech>
Tue, 30 Apr 2019 08:53:31 +0000 (08:53 +0000)
committerRam Krishna Verma <ram.krishna.verma@est.tech>
Tue, 30 Apr 2019 11:17:17 +0000 (11:17 +0000)
commit7cab98ba7db4ae718124c762e5ea1fb25f8d447e
treec46fcc5ec12de5a99bb706c7b522d3ae34a99bfd
parent3bca010bdcb7b14d7bd3e7cd7b39ee1a562b27b4
Adding algorithm for Pdp registration

1) Adding algorithm for improving Pdp registration. The flow is:
When a new Pdp comes for registration, PAP will shortlist a list of
PdpGroups based on the supportedPolicyTypes reported by PdpStatus
message and the supportedPolicyTypes in the PdpSubGroup.
Then PAP will find the PdpGroup which needs the Pdp most in two ways:
1) If there is a subgroup with no Pdp's then that takes the priority.
2) Otherwise the Pdp is allocated to the PdpGroup with highest
difference value of desiredInstanceCount - currentInstanceCount.

2) Changing the preconfigured TosaPolicyType for apex to avoid
interference with legacy operational policies of drools.

Change-Id: I77584c3c030bc27903c11689acaca33148e27e3c
Issue-ID: POLICY-1630
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java
main/src/main/resources/PapDb.json