[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.01-2-g3938413



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=3938413c0a2ef819d15da44f7e2eaaa5129cf135

The branch, master has been updated
       via  3938413c0a2ef819d15da44f7e2eaaa5129cf135 (commit)
       via  385be1c43c0d9d7fa5cd2522611ecab94cb43c6b (commit)
      from  9ed5eebf3af21237ca0ff76e5d525d6f37d91ac7 (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 3938413c0a2ef819d15da44f7e2eaaa5129cf135
Author: Marek 'marx' Grac <mgrac redhat com>
Date:   Tue May 13 17:26:56 2008 +0200

    [FENCE] Fix problem with different menu for admin/user for APC
    
    In APC user/admin can see a different menu and they have to use different sequence
    of keystrokes to access Outlet Controls. Previously only support for user was
    provided.

commit 385be1c43c0d9d7fa5cd2522611ecab94cb43c6b
Author: Marek 'marx' Grac <mgrac redhat com>
Date:   Tue May 13 17:00:57 2008 +0200

    [FENCE] Fix name of the option in fencing library
    
    We were testing for option 'plug_no' but in every other file we have 'port'.

-----------------------------------------------------------------------

Summary of changes:
 fence/agents/apc/fence_apc.py  |   26 ++++++++++++++++++++++++--
 fence/agents/lib/fencing.py.py |    2 +-
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index 80ee471..c9a0571 100755
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -30,13 +30,23 @@ def get_power_status(conn, options):
 		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
 
 		version = 0
+		admin = 0
+
 		if (None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before)):
 			version = 2
 		else:
 			version = 3
 
+		if (None == re.compile('.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before)):
+			admin = 0
+		else:
+			admin = 1
+
 		if version == 2:
-			conn.send("2\r\n")
+			if admin == 0:
+				conn.send("2\r\n")
+			else:
+				conn.send("3\r\n")
 		else:
 			conn.send("2\r\n")
 			conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
@@ -68,13 +78,22 @@ def set_power_status(conn, options):
 		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
 
 		version = 0
+		admin = 0
 		if (None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before)):
 			version = 2
 		else:
 			version = 3
 
+		if (None == re.compile('.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before)):
+			admin = 0
+		else:
+			admin = 1
+
 		if version == 2:
-			conn.send("2\r\n")
+			if admin == 0:
+				conn.send("2\r\n")
+			else:
+				conn.send("3\r\n")
 		else:
 			conn.send("2\r\n")
 			conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
@@ -84,6 +103,9 @@ def set_power_status(conn, options):
 			conn.send("\r\n")
 		conn.send(options["-n"]+"\r\n")
 		conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+		if admin == 1:
+			conn.send("1\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)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index edfd462..b0de573 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -260,7 +260,7 @@ def check_input(device_opt, opt):
 	if 1 == (options.has_key("-p") and options.has_key("-S")):
 		fail_usage("Failed: You have to enter password or password script")
 
-	if (0 == options.has_key("-n")) and (device_opt.count("plug_no")):
+	if (0 == options.has_key("-n")) and (device_opt.count("port")):
 		fail_usage("Failed: You have to enter plug number")
 
 	if options.has_key("-S"):


hooks/post-receive
--
Cluster Project


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]