Blame SOURCES/bz1390915-monitor_port_as_ip.patch

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