From cb95fd31402c4e9478b4ad06ed476f2afc94d983 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Feb 27 2020 11:05:58 +0000 Subject: Merge #554 `docs: Explain remote rule test it there is no policy` --- diff --git a/docs/package-specific-policies.rst b/docs/package-specific-policies.rst index 825fdc8..1af91e8 100644 --- a/docs/package-specific-policies.rst +++ b/docs/package-specific-policies.rst @@ -160,7 +160,7 @@ To check if the remote policies are loaded correctly, we can call the Greenwave decision API. Those are the data for the request, we can save them in a ``data.json`` file: -:: +.. code-block:: json { "decision_context": "bodhi_update_push_stable", @@ -177,6 +177,19 @@ the ``RemoteRule``. You can verify that looking at the ``/api/v1.0/policies`` endpoint. Example: https://greenwave.fedoraproject.org/api/v1.0/policies +If there is no applicable policy in Greenwave configuration yet, the field +``decision_context`` can be replaced with ``rules``, e.g.: + +.. code-block:: json + + { + "rules": [{"type": "RemoteRule", "required": true}]}, + "product_version": "fedora-28", + "subject_type": "koji_build", + "subject_identifier": "python-ansi2html-1.1.1-114.fc28", + "verbose": true + } + To call the API we can now use this command (in this example we are using the Fedora Greenwave instance in production):