Xacml PDP Register/Unregister Changes 69/83969/9
authorMichael Mokry <michael.mokry@att.com>
Tue, 2 Apr 2019 12:33:28 +0000 (07:33 -0500)
committerMichael Mokry <michael.mokry@att.com>
Fri, 5 Apr 2019 21:18:24 +0000 (16:18 -0500)
commit5dd6d165a0b3ee88563e5bcabd4c2a7fc42a676b
tree7ccbffea7dc53835b375d63fd4cbd6bde54c3286
parent9bf471abe906598ffd2cd280d372e7cb9474a418
Xacml PDP Register/Unregister Changes

1) Modified activator
- Extend and use ServiceManagerContainer
- add topicSink and topicSource properties to TopicEndpoint
manager
2) Added PAP registration class
3) Added PDP message formatting class
4) Added PDP State Change listener to listen for state change and send
back PDP Status.. then start heartbeat if not started already
5) Added Heartbeat publisher code to send heartbeat status on periodic
interval
6) UPDATE: Made changes to satisfy Jim's review comments
7) Added code to XacmlPdpApplicationManager to get supportedPolicyTypes
8) UPDATE: more changes to satisfy Jim's latest review comments
9) Fixed the failed Junits causing build failure
10) Made change to use NetworkUtil for getting PdpStatus name value per
Jorge's comment

Still need to in separate review:
1) Write Junits for new code

Registration and heartbeat flow as I understand it:
1) PDP starts and sends initial status to PAP with PASSIVE state
2) PDP listens for State Change from the PAP
3) PDP sends updated Active state to the AP
4) PDP begins sending periodic heartbeat status to the PAP

Change-Id: Iafa06ae3f1ee195c7da3710a12d9c095c5413ec2
Issue-ID: POLICY-1449
Signed-off-by: Michael Mokry <michael.mokry@att.com>
21 files changed:
main/pom.xml
main/src/main/java/org/onap/policy/pdpx/main/comm/XacmlPdpHeartbeatPublisher.java [new file with mode: 0644]
main/src/main/java/org/onap/policy/pdpx/main/comm/XacmlPdpMessage.java [new file with mode: 0644]
main/src/main/java/org/onap/policy/pdpx/main/comm/XacmlPdpPapRegistration.java [new file with mode: 0644]
main/src/main/java/org/onap/policy/pdpx/main/comm/listeners/XacmlPdpStateChangeListener.java [new file with mode: 0644]
main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManager.java
main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestServer.java
main/src/main/java/org/onap/policy/pdpx/main/rest/provider/HealthCheckProvider.java
main/src/main/java/org/onap/policy/pdpx/main/rest/provider/StatisticsProvider.java
main/src/main/java/org/onap/policy/pdpx/main/startstop/Main.java
main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpCommandLineArguments.java
main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java
main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpRestServer.java
main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpStatistics.java
main/src/test/java/org/onap/policy/pdpx/main/startstop/TestMain.java
main/src/test/java/org/onap/policy/pdpx/main/startstop/TestXacmlPdpActivator.java
main/src/test/resources/parameters/topic.properties [new file with mode: 0644]
packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
packages/policy-xacmlpdp-tarball/src/main/resources/etc/topic.properties [new file with mode: 0644]
pom.xml