public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* Cluster Project branch, STABLE2, updated. cluster-2.03.02-9-ga0ed251
@ 2008-05-14 11:48 mgrac
  0 siblings, 0 replies; only message in thread
From: mgrac @ 2008-05-14 11:48 UTC (permalink / raw)
  To: cluster-cvs, cluster-devel

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=a0ed2514cefac4256ba981ffb758210665885e6f

The branch, STABLE2 has been updated
       via  a0ed2514cefac4256ba981ffb758210665885e6f (commit)
       via  d89fb5dd2d92f3e32e02e84a875b9baab5b7286d (commit)
      from  a6b6a30358fd5e247a37e2fe493ef6a683174b66 (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 a0ed2514cefac4256ba981ffb758210665885e6f
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 d89fb5dd2d92f3e32e02e84a875b9baab5b7286d
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-14 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-14 11:48 Cluster Project branch, STABLE2, updated. cluster-2.03.02-9-ga0ed251 mgrac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).