Blame SOURCES/bz1390915-monitor_port_as_ip.patch

bf1da4
From a22d964c8a4d21fa3cca5f4b8e284319d77c4779 Mon Sep 17 00:00:00 2001
bf1da4
From: Marek 'marx' Grac <mgrac@redhat.com>
bf1da4
Date: Mon, 27 Jul 2015 11:02:31 +0200
bf1da4
Subject: [PATCH] fencing: If --port-as-ip is used then monitor action should
bf1da4
 be 'status', not 'list'
bf1da4
bf1da4
Resolves: rhbz#1390915
bf1da4
---
bf1da4
 fence/agents/lib/fencing.py.py | 5 +++--
bf1da4
 1 file changed, 3 insertions(+), 2 deletions(-)
bf1da4
bf1da4
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
bf1da4
index 1cc1eb0..8fa81c7 100644
bf1da4
--- a/fence/agents/lib/fencing.py.py
bf1da4
+++ b/fence/agents/lib/fencing.py.py
bf1da4
@@ -940,8 +940,9 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list=None,
bf1da4
 
bf1da4
 		## Process options that manipulate fencing device
bf1da4
 		#####
bf1da4
-		if options["--action"] in ["list", "list-status"] or \
bf1da4
-			((options["--action"] == "monitor") and 1 == options["device_opt"].count("port")):
bf1da4
+		if (options["--action"] in ["list", "list-status"]) or \
bf1da4
+			((options["--action"] == "monitor") and 1 == options["device_opt"].count("port") and \
bf1da4
+			0 == options["device_opt"].count("port_as_ip")):
bf1da4
 
bf1da4
 			if 0 == options["device_opt"].count("port"):
bf1da4
 				print "N/A"
bf1da4
-- 
bf1da4
2.4.11
bf1da4