From 86ed03f8adee56c050c73018537371c230a664a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 08:50:17 +0200 Subject: Adding upstream version 4.12.1. Signed-off-by: Daniel Baumann --- agents/powerman/fence_powerman.py | 257 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100755 agents/powerman/fence_powerman.py (limited to 'agents/powerman') diff --git a/agents/powerman/fence_powerman.py b/agents/powerman/fence_powerman.py new file mode 100755 index 0000000..7aeeaf1 --- /dev/null +++ b/agents/powerman/fence_powerman.py @@ -0,0 +1,257 @@ +#!@PYTHON@ -tt +import os +import time +from datetime import datetime +import sys +import subprocess +import re +import atexit +sys.path.append("@FENCEAGENTSLIBDIR@") +from fencing import * +from fencing import is_executable, fail_usage, run_delay +import logging + +#### important!!! ####### +class PowerMan: + """Python wrapper for calling powerman commands + + This class makes calls to a powerman deamon for a cluster of computers. + The make-up of such a call looks something like: + $ pm -h elssd1:10101