From: mgrac@sourceware.org <mgrac@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-53-gb5ab5af
Date: 6 May 2008 15:03:11 -0000 [thread overview]
Message-ID: <20080506150311.6143.qmail@sourceware.org> (raw)
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".
http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=b5ab5afac7d6cd8c696b46bacb022ae528d636fe
The branch, RHEL4 has been updated
via b5ab5afac7d6cd8c696b46bacb022ae528d636fe (commit)
from 82270e2e03d662a31e7372fa1abfcbd65feb30a7 (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 b5ab5afac7d6cd8c696b46bacb022ae528d636fe
Author: Marek 'marx' Grac <mgrac@redhat.com>
Date: Tue May 6 16:50:00 2008 +0200
[FENCE] Fix #444615: Support for 24 port APC fencing device
Fixed in the new version of python fencing agent. But there was still a problem
because there is major change of interface between firmware v2.7.x and v3.5.x.
After this patch both types of firmware version should work.
-----------------------------------------------------------------------
Summary of changes:
fence/agents/apc/fence_apc.py | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index a588236..e132f10 100755
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -8,6 +8,7 @@
## Model Firmware
## +---------------------------------------------+
## AP7951 AOS v2.7.0, PDU APP v2.7.3
+## AP7941 AOS v3.5.7, PDU APP v3.5.6
##
## @note: ssh is very slow on AP7951 device
#####
@@ -27,7 +28,20 @@ def get_power_status(conn, options):
try:
conn.send("1\r\n")
conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
- conn.send("2\r\n")
+
+ version = 0
+ if (None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before)):
+ version = 2
+ else:
+ version = 3
+
+ if version == 2:
+ conn.send("2\r\n")
+ else:
+ conn.send("2\r\n")
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ conn.send("1\r\n")
+
while 1 == conn.log_expect(options, [ options["-c"], "Press <ENTER>" ], SHELL_TIMEOUT):
result += conn.before
conn.send("\r\n")
@@ -52,11 +66,27 @@ def set_power_status(conn, options):
try:
conn.send("1\r\n")
conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
- conn.send("2\r\n")
+
+ version = 0
+ if (None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before)):
+ version = 2
+ else:
+ version = 3
+
+ if version == 2:
+ conn.send("2\r\n")
+ else:
+ conn.send("2\r\n")
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ conn.send("1\r\n")
+
while 1 == conn.log_expect(options, [ options["-c"], "Press <ENTER>" ], SHELL_TIMEOUT):
conn.send("\r\n")
conn.send(options["-n"]+"\r\n")
conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ if version == 3:
+ conn.send("1\r\n")
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
conn.send(action+"\r\n")
conn.log_expect(options, "Enter 'YES' to continue or <ENTER> to cancel :", SHELL_TIMEOUT)
conn.send("YES\r\n")
hooks/post-receive
--
Cluster Project
reply other threads:[~2008-05-06 15:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080506150311.6143.qmail@sourceware.org \
--to=mgrac@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.