summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 21:04:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 21:04:41 +0000
commita51106ed6932423c25c7d464ef5c2d609bd62924 (patch)
treeb40cd0bcb45e9d56ee030c434e79351cfe57e1b3 /doc
parentAdding upstream version 1:4.13.0. (diff)
downloadresource-agents-a51106ed6932423c25c7d464ef5c2d609bd62924.tar.xz
resource-agents-a51106ed6932423c25c7d464ef5c2d609bd62924.zip
Adding upstream version 1:4.14.0.upstream/1%4.14.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--doc/dev-guides/writing-python-agents.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/dev-guides/writing-python-agents.md b/doc/dev-guides/writing-python-agents.md
index f26313f..1b05e23 100644
--- a/doc/dev-guides/writing-python-agents.md
+++ b/doc/dev-guides/writing-python-agents.md
@@ -5,8 +5,7 @@
A simple library for authoring resource agents in Python is
provided in the `ocf.py` library.
-Agents written in Python should be ideally compatible both with Python
-2.7+ and Python 3.3+.
+Agents written in Python should be compatible with Python 3.6+.
The library provides various helper constants and functions, a logging
implementation as well as a run loop and metadata generation facility.
@@ -53,7 +52,11 @@ logger.error("Something went terribly wrong.")
* `ocf_exit_reason`: Prints the exit error string to stderr.
* `have_binary`: Returns True if the given binary is available.
* `is_true`: Converts an OCF truth value to a Python boolean.
+* `is_probe`: Returns True when running a probe action. Used to return
+ OCF_NOT_RUNNING instead of error code that would cause unexpected actions
+ like fencing before starting the resource or when it is disabled.
* `get_parameter`: Looks up the matching `OCF_RESKEY_` environment variable.
+* `distro`: Returns <Distro>/<Version> or <Distro> if version info is unavailable.
* `Agent`: Class which helps to generate the XML metadata.
* `run`: OCF run loop implementation.