Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   Cluster Project branch, STABLE2, updated. cluster-2.03.02-3-gd1e8717 (http://www.linux-archive.org/cluster-development/83061-cluster-project-branch-stable2-updated-cluster-2-03-02-3-gd1e8717.html)

05-06-2008 03:13 PM

Cluster Project branch, STABLE2, updated. cluster-2.03.02-3-gd1e8717
 
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=d1e87179a9 6c22fc8716e098cfe43cc652c3b50a

The branch, STABLE2 has been updated
via d1e87179a96c22fc8716e098cfe43cc652c3b50a (commit)
from 0410f5954519c45848aadab70c6dc0f61bfb2db2 (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 d1e87179a96c22fc8716e098cfe43cc652c3b50a
Author: Marek 'marx' Grac <mgrac@redhat.com>
Date: Tue May 6 16:50:00 2008 +0200

[FENCE] Fix #435154: 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 59c5083..80ee471 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
")
conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
- conn.send("2
")
+
+ 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
")
+ else:
+ conn.send("2
")
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ conn.send("1
")
+
while 1 == conn.log_expect(options, [ options["-c"], "Press <ENTER>" ], SHELL_TIMEOUT):
result += conn.before
conn.send("
")
@@ -52,11 +66,27 @@ def set_power_status(conn, options):
try:
conn.send("1
")
conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
- conn.send("2
")
+
+ 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
")
+ else:
+ conn.send("2
")
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ conn.send("1
")
+
while 1 == conn.log_expect(options, [ options["-c"], "Press <ENTER>" ], SHELL_TIMEOUT):
conn.send("
")
conn.send(options["-n"]+"
")
conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ if version == 3:
+ conn.send("1
")
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
conn.send(action+"
")
conn.log_expect(options, "Enter 'YES' to continue or <ENTER> to cancel :", SHELL_TIMEOUT)
conn.send("YES
")


hooks/post-receive
--
Cluster Project


All times are GMT. The time now is 11:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.