Gitweb:
http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: d179778bce4f4f533e9aa9d9da9b3997b59dba70
Parent: 195f28293701ab6582e23c9d6cb796efab0dce52
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Fri Jul 1 13:10:37 2011 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Jul 1 13:10:37 2011 +0200
fence_drac5: Fix support for Dell DRAC CMC
Fix operation 'list' for Drac CMC and typo that causes python traceback
Resolves: rhbz#718194
---
fence/agents/drac5/fence_drac5.py | 4 ++--
fence/agents/lib/fencing.py.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py
index 256158a..53676ee 100644
--- a/fence/agents/drac5/fence_drac5.py
+++ b/fence/agents/drac5/fence_drac5.py
@@ -66,10 +66,10 @@ def get_list_devices(conn, options):
conn.sendline("getmodinfo")
list_re = re.compile("^([^\s]*?)\s+Present\s*(ON|OFF)\s*.*$")
+ conn.log_expect(options, options["-c"], int(options["-g"]))
for line in conn.before.splitlines():
if (list_re.search(line)):
outlets[list_re.search(line).group(1)] = ("",
list_re.search(line).group(2))
- conn.log_expect(options, options["-c"], int(options["-g"]))
elif options["model"] == "DRAC 5":
## DRAC 5 can be used only for one computer
pass
@@ -113,7 +113,7 @@ By default, the telnet interface is not enabled."
conn = fence_login(options)
if conn.before.find("CMC") >= 0:
- if 0 == options.has_key("-m") and 0 == ["monitor",
"list"].count(option["-o"].lower()):
+ if 0 == options.has_key("-m") and 0 == ["monitor",
"list"].count(options["-o"].lower()):
fail_usage("Failed: You have to enter module name (-m)")
options["model"]="DRAC CMC"
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index da5b07e..ec84bbc 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -767,7 +767,7 @@ def fence_action(tn, options, set_power_fn, get_power_fn,
get_outlet_list = None
## Process options that manipulate fencing device
#####
- if (options["-o"] == "list") and (0 ==
options["device_opt"].count("port")) and (0 ==
options["device_opt"].count("partition") and 0 ==
options["device_opt"].count("uuid")):
+ if (options["-o"] == "list") and (0 ==
options["device_opt"].count("port")) and (0 ==
options["device_opt"].count("partition") and 0 ==
options["device_opt"].count("uuid") and 0 ==
options["device_opt"].count("module_name")):
print "N/A"
return
elif (options["-o"] == "list" and get_outlet_list == None):