Blob Blame History Raw
From 05a6bf8619560b559bfb0ea3688635935a96ca94 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac@redhat.com>
Date: Thu, 19 Mar 2015 21:28:22 +0100
Subject: [PATCH 5/5] fence_ipmilan: Un-set default cipher

Previously, the default cipher was left to ipmitool, in one of latest releases we have changed it
to cipher=0. This commit removes this default and uses --cipher for ipmitool only when explicitly
set by user.

Resolves: rhbz#1203877
---
 fence/agents/ipmilan/fence_ipmilan.py | 4 ++--
 tests/data/metadata/fence_idrac.xml   | 2 +-
 tests/data/metadata/fence_ilo3.xml    | 2 +-
 tests/data/metadata/fence_ilo4.xml    | 2 +-
 tests/data/metadata/fence_imm.xml     | 2 +-
 tests/data/metadata/fence_ipmilan.xml | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
index eaff7b7..8490837 100644
--- a/fence/agents/ipmilan/fence_ipmilan.py
+++ b/fence/agents/ipmilan/fence_ipmilan.py
@@ -53,7 +53,8 @@ def create_command(options, action):
 		cmd += " -P ''"
 
 	# --cipher / -C
-	cmd += " -C " + options["--cipher"]
+	if "--cipher" in options:
+		cmd += " -C " + options["--cipher"]
 
 	# --port / -n
 	if options.has_key("--ipport"):
@@ -96,7 +97,6 @@ def define_new_opts():
 		"help" : "-C, --cipher=[cipher]          Ciphersuite to use (same as ipmitool -C parameter)",
 		"required" : "0",
 		"shortdesc" : "Ciphersuite to use (same as ipmitool -C parameter)",
-		"default" : "0",
 		"order": 1
 	}
 	all_opt["privlvl"] = {
diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml
index 26a2758..dcb3235 100644
--- a/tests/data/metadata/fence_idrac.xml
+++ b/tests/data/metadata/fence_idrac.xml
@@ -61,7 +61,7 @@
 	</parameter>
 	<parameter name="cipher" unique="0" required="0">
 		<getopt mixed="-C, --cipher=[cipher]" />
-		<content type="string" default="0"  />
+		<content type="string"  />
 		<shortdesc lang="en">Ciphersuite to use (same as ipmitool -C parameter)</shortdesc>
 	</parameter>
 	<parameter name="privlvl" unique="0" required="0">
diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml
index c1e01ae..e6a48bc 100644
--- a/tests/data/metadata/fence_ilo3.xml
+++ b/tests/data/metadata/fence_ilo3.xml
@@ -61,7 +61,7 @@
 	</parameter>
 	<parameter name="cipher" unique="0" required="0">
 		<getopt mixed="-C, --cipher=[cipher]" />
-		<content type="string" default="0"  />
+		<content type="string"  />
 		<shortdesc lang="en">Ciphersuite to use (same as ipmitool -C parameter)</shortdesc>
 	</parameter>
 	<parameter name="privlvl" unique="0" required="0">
diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml
index bbba9a0..e7b0d60 100644
--- a/tests/data/metadata/fence_ilo4.xml
+++ b/tests/data/metadata/fence_ilo4.xml
@@ -61,7 +61,7 @@
 	</parameter>
 	<parameter name="cipher" unique="0" required="0">
 		<getopt mixed="-C, --cipher=[cipher]" />
-		<content type="string" default="0"  />
+		<content type="string"  />
 		<shortdesc lang="en">Ciphersuite to use (same as ipmitool -C parameter)</shortdesc>
 	</parameter>
 	<parameter name="privlvl" unique="0" required="0">
diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml
index addfcd4..8fbdddd 100644
--- a/tests/data/metadata/fence_imm.xml
+++ b/tests/data/metadata/fence_imm.xml
@@ -61,7 +61,7 @@
 	</parameter>
 	<parameter name="cipher" unique="0" required="0">
 		<getopt mixed="-C, --cipher=[cipher]" />
-		<content type="string" default="0"  />
+		<content type="string"  />
 		<shortdesc lang="en">Ciphersuite to use (same as ipmitool -C parameter)</shortdesc>
 	</parameter>
 	<parameter name="privlvl" unique="0" required="0">
diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml
index d15e352..199490c 100644
--- a/tests/data/metadata/fence_ipmilan.xml
+++ b/tests/data/metadata/fence_ipmilan.xml
@@ -61,7 +61,7 @@
 	</parameter>
 	<parameter name="cipher" unique="0" required="0">
 		<getopt mixed="-C, --cipher=[cipher]" />
-		<content type="string" default="0"  />
+		<content type="string"  />
 		<shortdesc lang="en">Ciphersuite to use (same as ipmitool -C parameter)</shortdesc>
 	</parameter>
 	<parameter name="privlvl" unique="0" required="0">
-- 
1.9.3