Cluster Project branch, master, updated. gfs-kernel_0_1_22-104-g4a91131
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".
The branch, master has been updated
via 4a91131c548a5127431255f47ad96889cb1f4d07 (commit)
from 2c60eddf3d7bedfd452c9583a7e957103e1eaa16 (commit)Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 4a91131c548a5127431255f47ad96889cb1f4d07
Author: Marek 'marx' Grac <[email protected]> Date: Fri Mar 28 17:18:42 2008 +0100
fence/agents: WTI agents merged
Fencing devices from WTI can use password or login/password for loging in. This patch merge two fencing agents together so it will be same as old agent.
-----------------------------------------------------------------------
Summary of changes:
fence/agents/lib/fencing.py | 6 ++-
fence/agents/wti/wti-ips.py | 100 -------------------------------
fence/agents/wti/{wti-rsm.py => wti.py} | 22 ++++++-
3 files changed, 24 insertions(+), 104 deletions(-)
delete mode 100755 fence/agents/wti/wti-ips.py
rename fence/agents/wti/{wti-rsm.py => wti.py} (76%)fence/agents/lib/fencing.py +5 -1
@@ -59,6 +59,10 @@ all_opt = { "getopt" : "l:", "help" : "-l <name> Login name", "order" : 1 }, + "no_login" : { + "getopt" : "", + "help" : "", + "order" : 1 }, "passwd" : { "getopt" : "p:", "help" : "-p <password> Login password",
@@ -204,7 +208,7 @@ def check_input(device_opt, opt): if 0 == ["on", "off", "reboot", "status"].count(options["-o"].lower()): fail_usage("Failed: Unrecognised action '" + options["-o"] + "'") - if (0 == options.has_key("-l")) and (device_opt.count("login")): + if (0 == options.has_key("-l")) and device_opt.count("login") and (device_opt.count("no_login") == 0): fail_usage("Failed: You have to set login name") if 0 == options.has_key("-a"):
fence/agents/wti/wti-ips.py deleted +0 -100
100 lines not on this page · raw message
fence/agents/wti/wti.py renamed from fence/agents/wti/wti-rsm.py +19 -3
@@ -9,6 +9,7 @@ ## +-----------------+---------------------------+ ## WTI RSM-8R4 ?? unable to find out ?? ## WTI MPC-??? ?? unable to find out ?? +## WTI IPS-800-CE v1.40h (no username) ##### import sys, re, pexpect
@@ -61,7 +62,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "port" ] + "cmd_prompt", "secure", "port", "no_login" ] options = check_input(device_opt, process_input(device_opt))
@@ -69,12 +70,27 @@ def main(): ## Fence agent specific defaults ##### if 0 == options.has_key("-c"): - options["-c"] = [ "RSM>", "MPC>" ] + options["-c"] = [ "RSM>", "MPC>", "IPS>" ] ## ## Operate the fencing device + ## + ## @note: if there is not a login name then we assume that it is WTI-IPS + ## where no login name is used ##### - conn = fence_login(options) + if (0 == options.has_key("-l")): + try: + conn = fspawn ('telnet ' + options["-a"]) + conn.log_expect(options, "Password: ", SHELL_TIMEOUT) + conn.send(options["-p"]+"\r\n") + conn.log_expect(options, options["-c"], SHELL_TIMEOUT) + except pexpect.EOF: + fail(EC_LOGIN_DENIED) + except pexpect.TIMEOUT: + fail(EC_LOGIN_DENIED) + else: + conn = fence_login(options) + fence_action(conn, options, set_power_status, get_power_status) ##
hooks/post-receive
--
Cluster Project