aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-07-20 16:34:59 +0100
committerliamfallon <liam.fallon@est.tech>2021-07-20 16:35:02 +0100
commit8216132d2a5a12f10610ab652a7ae68322bdbff9 (patch)
tree919562bc7e642c6e823fba7932d02bac27fac9da /docs
parent8bd2403907becf8a6d246408434fbceaa30ba745 (diff)
Document how to run the DMaaP simulator locally
Issue-ID: POLICY-3424 Change-Id: Iee6b3dd3cb0cb9aca28846e596286c287d8b645f Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'docs')
-rw-r--r--docs/development/devtools/devtools.rst44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/development/devtools/devtools.rst b/docs/development/devtools/devtools.rst
index 7eb5e064..fac06ac6 100644
--- a/docs/development/devtools/devtools.rst
+++ b/docs/development/devtools/devtools.rst
@@ -332,3 +332,47 @@ of such a test case.
See `this unit test case <https://github.com/onap/policy-clamp/blob/master/runtime/src/test/java/org/onap/policy/clamp/clds/it/HttpsItCase.java>`_
for the full example.
+Running the DMaaP Simulator during Development
+**********************************************
+It is sometimes convenient to run the DMaaP simulator during development. You can run it from the command line using Maven or from within your IDE.
+
+Running on the Command Line
++++++++++++++++++++++++++++
+1. Check out the policy models repository
+2. Go to the *models-sim/policy-models-simulators* subdirectory in the policy-models repo
+3. Run the following Maven command:
+
+ .. code-block:: bash
+
+ mvn exec:java -Dexec.mainClass=org.onap.policy.models.simulators.Main -Dexec.args="src/test/resources/simParameters.json"
+
+Running in Eclipse
+++++++++++++++++++
+1. Check out the policy models repository
+2. Go to the *models-sim/policy-models-simulators* module in the policy-models repo
+3. Specify a run configuration using the class *org.onap.policy.models.simulators.Main* as the main class
+4. Specify an argument of *src/test/resources/simParameters.json* to the run configuration
+5. Run the configuration
+
+Specifying a local configuration file
++++++++++++++++++++++++++++++++++++++
+
+You may specify a local configuration file instead of *src/test/resources/simParameters.json* on the command line or as an arument in the run configuration in eclipse:
+
+.. code-block:: json
+
+ {
+ "dmaapProvider": {
+ "name": "DMaaP simulator",
+ "topicSweepSec": 900
+ },
+ "restServers": [
+ {
+ "name": "DMaaP simulator",
+ "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1",
+ "host": "localhost",
+ "port": 3904,
+ "https": false
+ }
+ ]
+ }