Blame SOURCES/bz1449183-fence_ipmilan-hexadecimal-key-auth.patch

4822a5
diff -uNr a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
4822a5
--- a/fence/agents/ipmilan/fence_ipmilan.py	2017-09-29 13:16:33.097610593 +0200
4822a5
+++ b/fence/agents/ipmilan/fence_ipmilan.py	2017-09-29 13:30:15.340293733 +0200
4822a5
@@ -72,6 +72,9 @@
4822a5
 	if options.has_key("--privlvl"):
4822a5
 		cmd += " -L " + options["--privlvl"]
4822a5
 
4822a5
+	if "--hexadecimal-kg" in options:
4822a5
+		cmd += " -y " + options["--hexadecimal-kg"]
4822a5
+
4822a5
 	# --action / -o
4822a5
 	cmd += " chassis power " + action
4822a5
 
4822a5
@@ -136,6 +139,14 @@
4822a5
 		"shortdesc" : "Bridge IPMI requests to the remote target address",
4822a5
 		"order": 1
4822a5
 	}
4822a5
+	all_opt["hexadecimal_kg"] = {
4822a5
+		"getopt" : ":",
4822a5
+		"longopt" : "hexadecimal-kg",
4822a5
+		"help" : "--hexadecimal-kg=[key]         Hexadecimal-encoded Kg key for IPMIv2 authentication",
4822a5
+		"required" : "0",
4822a5
+		"shortdesc" : "Hexadecimal-encoded Kg key for IPMIv2 authentication",
4822a5
+		"order": 1
4822a5
+	}
4822a5
 	all_opt["obsolete_ip"] = {
4822a5
 		"getopt" : "i:",
4822a5
 		"longopt" : "obsolete-ip",
4822a5
@@ -156,7 +167,7 @@
4822a5
 
4822a5
 	device_opt = ["ipaddr", "login", "no_login", "no_password", "passwd",
4822a5
 		"diag", "lanplus", "auth", "cipher", "privlvl", "sudo",
4822a5
-		"ipmitool_path", "method", "target", "obsolete_ip", "timeout"]
4822a5
+		"ipmitool_path", "method", "target", "hexadecimal_kg", "obsolete_ip", "timeout"]
4822a5
 	define_new_opts()
4822a5
 
4822a5
 	all_opt["power_wait"]["default"] = 2
4822a5
diff -uNr a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml
4822a5
--- a/tests/data/metadata/fence_idrac.xml	2017-09-29 13:16:33.133610272 +0200
4822a5
+++ b/tests/data/metadata/fence_idrac.xml	2017-09-29 13:59:22.124806409 +0200
4822a5
@@ -12,6 +12,11 @@
4822a5
 		<content type="integer" default="623"  />
4822a5
 		<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
4822a5
 	</parameter>
4822a5
+	<parameter name="hexadecimal_kg" unique="0" required="0">
4822a5
+		<getopt mixed="--hexadecimal-kg=[key]" />
4822a5
+		<content type="string"  />
4822a5
+		<shortdesc lang="en">Hexadecimal-encoded Kg key for IPMIv2 authentication</shortdesc>
4822a5
+	</parameter>
4822a5
 	<parameter name="port" unique="0" required="0" deprecated="1">
4822a5
 		<getopt mixed="-n, --plug=[ip]" />
4822a5
 		<content type="string"  />
4822a5
diff -uNr a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml
4822a5
--- a/tests/data/metadata/fence_ilo3.xml	2017-09-29 13:16:33.133610272 +0200
4822a5
+++ b/tests/data/metadata/fence_ilo3.xml	2017-09-29 13:59:22.123806418 +0200
4822a5
@@ -12,6 +12,11 @@
4822a5
 		<content type="integer" default="623"  />
4822a5
 		<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
4822a5
 	</parameter>
4822a5
+	<parameter name="hexadecimal_kg" unique="0" required="0">
4822a5
+		<getopt mixed="--hexadecimal-kg=[key]" />
4822a5
+		<content type="string"  />
4822a5
+		<shortdesc lang="en">Hexadecimal-encoded Kg key for IPMIv2 authentication</shortdesc>
4822a5
+	</parameter>
4822a5
 	<parameter name="port" unique="0" required="0" deprecated="1">
4822a5
 		<getopt mixed="-n, --plug=[ip]" />
4822a5
 		<content type="string"  />
4822a5
diff -uNr a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml
4822a5
--- a/tests/data/metadata/fence_ilo4.xml	2017-09-29 13:16:33.134610263 +0200
4822a5
+++ b/tests/data/metadata/fence_ilo4.xml	2017-09-29 13:59:22.123806418 +0200
4822a5
@@ -12,6 +12,11 @@
4822a5
 		<content type="integer" default="623"  />
4822a5
 		<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
4822a5
 	</parameter>
4822a5
+	<parameter name="hexadecimal_kg" unique="0" required="0">
4822a5
+		<getopt mixed="--hexadecimal-kg=[key]" />
4822a5
+		<content type="string"  />
4822a5
+		<shortdesc lang="en">Hexadecimal-encoded Kg key for IPMIv2 authentication</shortdesc>
4822a5
+	</parameter>
4822a5
 	<parameter name="port" unique="0" required="0" deprecated="1">
4822a5
 		<getopt mixed="-n, --plug=[ip]" />
4822a5
 		<content type="string"  />
4822a5
diff -uNr a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml
4822a5
--- a/tests/data/metadata/fence_imm.xml	2017-09-29 13:16:33.134610263 +0200
4822a5
+++ b/tests/data/metadata/fence_imm.xml	2017-09-29 13:59:22.123806418 +0200
4822a5
@@ -12,6 +12,11 @@
4822a5
 		<content type="integer" default="623"  />
4822a5
 		<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
4822a5
 	</parameter>
4822a5
+	<parameter name="hexadecimal_kg" unique="0" required="0">
4822a5
+		<getopt mixed="--hexadecimal-kg=[key]" />
4822a5
+		<content type="string"  />
4822a5
+		<shortdesc lang="en">Hexadecimal-encoded Kg key for IPMIv2 authentication</shortdesc>
4822a5
+	</parameter>
4822a5
 	<parameter name="port" unique="0" required="0" deprecated="1">
4822a5
 		<getopt mixed="-n, --plug=[ip]" />
4822a5
 		<content type="string"  />
4822a5
diff -uNr a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml
4822a5
--- a/tests/data/metadata/fence_ipmilan.xml	2017-09-29 13:16:33.134610263 +0200
4822a5
+++ b/tests/data/metadata/fence_ipmilan.xml	2017-09-29 13:35:55.835265303 +0200
4822a5
@@ -12,6 +12,11 @@
4822a5
 		<content type="integer" default="623"  />
4822a5
 		<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
4822a5
 	</parameter>
4822a5
+	<parameter name="hexadecimal_kg" unique="0" required="0">
4822a5
+		<getopt mixed="--hexadecimal-kg=[key]" />
4822a5
+		<content type="string"  />
4822a5
+		<shortdesc lang="en">Hexadecimal-encoded Kg key for IPMIv2 authentication</shortdesc>
4822a5
+	</parameter>
4822a5
 	<parameter name="port" unique="0" required="0" deprecated="1">
4822a5
 		<getopt mixed="-n, --plug=[ip]" />
4822a5
 		<content type="string"  />