public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: "Marek Grác" <marx@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: fence-agents: master - fence_apc: #491640 - APC Fence Agent does not work with non-admin account Date: Mon, 23 Mar 2009 13:43:00 -0000 [thread overview] Message-ID: <20090323134258.784B012015A@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=9a58017d523a2a56fd5a060d335500aacbd0dfba Commit: 9a58017d523a2a56fd5a060d335500aacbd0dfba Parent: 7bc7d1679680090b5a4b34d051c65041e16facd7 Author: Marek 'marx' Grac <mgrac@redhat.com> AuthorDate: Mon Mar 23 14:41:06 2009 +0100 Committer: Marek 'marx' Grac <mgrac@redhat.com> CommitterDate: Mon Mar 23 14:41:06 2009 +0100 fence_apc: #491640 - APC Fence Agent does not work with non-admin account APC Fence agent does not work with non-admin account with firmware v3.5.x --- fence/agents/apc/fence_apc.py | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index 46e992f..f40ffeb 100755 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -106,7 +106,8 @@ def set_power_status(conn, options): conn.log_expect(options, options["-c"], SHELL_TIMEOUT) version = 0 - admin = 0 + admin2 = 0 + admin3 = 0 switch = 0 if (None != re.compile('.* MasterSwitch plus.*', re.IGNORECASE | re.S).match(conn.before)): @@ -129,19 +130,23 @@ def set_power_status(conn, options): version = 3 if (None == re.compile('.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before)): - admin = 0 + admin2 = 0 else: - admin = 1 + admin2 = 1 if switch == 0: if version == 2: - if admin == 0: + if admin2 == 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) + if (None == re.compile('.*2- Outlet Restriction.*', re.IGNORECASE | re.S).match(conn.before)): + admin3 = 0 + else: + admin3 = 1 conn.send("1\r\n") else: conn.send(options["-s"] + "\r\n") @@ -152,10 +157,10 @@ def set_power_status(conn, options): conn.log_expect(options, options["-c"], SHELL_TIMEOUT) if switch == 0: - if admin == 1: + if admin2 == 1: conn.send("1\r\n") conn.log_expect(options, options["-c"], SHELL_TIMEOUT) - if version == 3: + if admin3 == 1: conn.send("1\r\n") conn.log_expect(options, options["-c"], SHELL_TIMEOUT) else:
reply other threads:[~2009-03-23 13:43 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=20090323134258.784B012015A@lists.fedorahosted.org \ --to=marx@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).