Blob Blame History Raw
From f62091cb5d9bfd150a70fed51a98117b9e2172ab Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac@redhat.com>
Date: Wed, 5 Aug 2015 10:01:12 +0200
Subject: [PATCH 2/4] fencing: Fix required options if --port-as-ip is used

---
 fence/agents/lib/fencing.py.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 89c3379..f14d7e0 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -700,6 +700,10 @@ def check_input(device_opt, opt):
 	else:
 		all_opt["login"]["required"] = "0"
 
+	if device_opt.count("port_as_ip"):
+		all_opt["ipaddr"]["required"] = "0"
+		all_opt["port"]["required"] = "0"
+
 	if device_opt.count("fabric_fencing"):
 		all_opt["action"]["default"] = "off"
 		all_opt["action"]["help"] = "-o, --action=[action]          Action: status, off (default) or on"
-- 
1.9.3