30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
|
|
From db77cd138eede869b31ac71782be674d39a1377c Mon Sep 17 00:00:00 2001
|
||
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||
|
|
Date: Tue, 23 Apr 2024 13:15:06 +0200
|
||
|
|
Subject: [PATCH] doc: writing-python-agents: add description of is_probe() and
|
||
|
|
distro()
|
||
|
|
|
||
|
|
---
|
||
|
|
doc/dev-guides/writing-python-agents.md | 4 ++++
|
||
|
|
1 file changed, 4 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/doc/dev-guides/writing-python-agents.md b/doc/dev-guides/writing-python-agents.md
|
||
|
|
index 9bf89d09..1b05e23b 100644
|
||
|
|
--- a/doc/dev-guides/writing-python-agents.md
|
||
|
|
+++ b/doc/dev-guides/writing-python-agents.md
|
||
|
|
@@ -52,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.
|
||
|
|
|
||
|
|
--
|
||
|
|
2.25.1
|
||
|
|
|