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
commit3877c41d07e7c79ae64a17b6a495901299ecfe08 (patch)
tree2fb504f23b71e595f7d7b961ed7ff42ea782f3f0 /doc
parentReleasing progress-linux version 1:4.13.0-1~progress7.99u1. (diff)
downloadresource-agents-3877c41d07e7c79ae64a17b6a495901299ecfe08.tar.xz
resource-agents-3877c41d07e7c79ae64a17b6a495901299ecfe08.zip
Merging upstream version 1:4.14.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc')
-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.