Blob Blame History Raw
From 43b32a3bc37e49c9e5e4a68228e6dc845c79a2c4 Mon Sep 17 00:00:00 2001
From: John Ruemker <jruemker@redhat.com>
Date: Thu, 22 Oct 2015 13:30:42 -0400
Subject: [PATCH 2/2] fence_brocade: Fix incorrect return when getting status
 for "on", "off"

---
 fence/agents/brocade/fence_brocade.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index e5a5063..5257bcc 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -36,7 +36,7 @@ def get_power_status(conn, options):
 			status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on"
 			outlets[tokens[0]] = ("", status)
 
-	if options["--action"] == "status":
+	if ["list", "monitor"].count(options["--action"]) == 0:
 		(_, status) = outlets[options["--plug"]]
 		return status
 	else:
-- 
2.4.3