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