Running PDP-D in Eclipse

This tutorial is intended for developers who would like to run the PDP-D in an Eclipse environment. It is assumed that the drools-pdp git project has been imported in an Eclipse workspace.

Starting the PDP-D

For the Amsterdam release, the project directory will look as follows assuming all drools-pdp projects were selected when importing.

../_images/RunEcl_drools_pdp_project.png

Right click on policy-management hover over “Run As” and select “Java Application”

../_images/RunEcl_run_as.png

Search for “Main” in the pop up and select the Main with the package “org.onap.policy.drools.system” and click “OK”.

../_images/RunEcl_main.png

The PDP-D will start running; the console will display output.

../_images/RunEcl_console_output.png

Interacting with the PDP-D

To interact with the PDP-D, the Telemetry API can be used. A simple GET on the engine will show that the PDP-D is running in Eclipse.

curl -k --silent --user @1b3rt:31nst31n -X GET https://localhost:9696/policy/pdp/engine/ | python -m json.tool
../_images/RunEcl_telemetry.png

An HTTP 200 message for the GET request will also appear in the console in Eclipse.

../_images/RunEcl_pdpd_200.png

See also

To create a controller and run a control loop, refer to Modifying the Release Template.

End of Document