diff -uNr a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py --- a/fence/agents/ipmilan/fence_ipmilan.py 2017-05-04 14:32:36.357497106 +0200 +++ b/fence/agents/ipmilan/fence_ipmilan.py 2017-05-04 14:37:32.567801127 +0200 @@ -39,9 +39,18 @@ cmd += " -I lanplus" else: cmd += " -I lan" + # --ip / -a cmd += " -H " + options["--ip"] + # --port / -n + if options.has_key("--ipport"): + cmd += " -p " + options["--ipport"] + + # --target + if "--target" in options: + cmd += " -t " + options["--target"] + # --username / -l if options.has_key("--username") and len(options["--username"]) != 0: cmd += " -U " + quote(options["--username"]) @@ -60,10 +69,6 @@ if "--cipher" in options: cmd += " -C " + options["--cipher"] - # --port / -n - if options.has_key("--ipport"): - cmd += " -p " + options["--ipport"] - if options.has_key("--privlvl"): cmd += " -L " + options["--privlvl"] @@ -123,6 +128,14 @@ "default" : "@IPMITOOL_PATH@", "order": 200 } + all_opt["target"] = { + "getopt" : ":", + "longopt" : "target", + "help" : "--target=[targetaddress] Bridge IPMI requests to the remote target address", + "required" : "0", + "shortdesc" : "Bridge IPMI requests to the remote target address", + "order": 1 + } all_opt["obsolete_ip"] = { "getopt" : "i:", "longopt" : "obsolete-ip", @@ -141,9 +154,9 @@ def main(): atexit.register(atexit_handler) - device_opt = ["ipaddr", "login", "no_login", "no_password", "passwd", "diag", - "lanplus", "auth", "cipher", "privlvl", "sudo", "ipmitool_path", "method", - "obsolete_ip", "timeout"] + device_opt = ["ipaddr", "login", "no_login", "no_password", "passwd", + "diag", "lanplus", "auth", "cipher", "privlvl", "sudo", + "ipmitool_path", "method", "target", "obsolete_ip", "timeout"] define_new_opts() all_opt["power_wait"]["default"] = 2 diff -uNr a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py --- a/fence/agents/lib/fencing.py.py 2017-05-04 14:32:36.408496642 +0200 +++ b/fence/agents/lib/fencing.py.py 2017-05-04 14:33:30.160007419 +0200 @@ -845,7 +845,7 @@ device_opt.count("login") and (device_opt.count("no_login") == 0): fail_usage("Failed: You have to set login name") - if device_opt.count("ipaddr") and not options.has_key("--ip") and not options.has_key("--managed"): + if device_opt.count("ipaddr") and not options.has_key("--ip") and not options.has_key("--managed") and not options.has_key("--target"): fail_usage("Failed: You have to enter fence address") if device_opt.count("no_password") == 0: diff -uNr a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml --- a/tests/data/metadata/fence_idrac.xml 2017-05-04 14:32:36.410496624 +0200 +++ b/tests/data/metadata/fence_idrac.xml 2017-05-04 14:33:30.160007419 +0200 @@ -74,6 +74,11 @@ Ciphersuite to use (same as ipmitool -C parameter) + + + + Bridge IPMI requests to the remote target address + diff -uNr a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml --- a/tests/data/metadata/fence_ilo3.xml 2017-05-04 14:32:36.411496614 +0200 +++ b/tests/data/metadata/fence_ilo3.xml 2017-05-04 14:33:30.161007410 +0200 @@ -74,6 +74,11 @@ Ciphersuite to use (same as ipmitool -C parameter) + + + + Bridge IPMI requests to the remote target address + diff -uNr a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml --- a/tests/data/metadata/fence_ilo4.xml 2017-05-04 14:32:36.411496614 +0200 +++ b/tests/data/metadata/fence_ilo4.xml 2017-05-04 14:33:30.161007410 +0200 @@ -74,6 +74,11 @@ Ciphersuite to use (same as ipmitool -C parameter) + + + + Bridge IPMI requests to the remote target address + diff -uNr a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml --- a/tests/data/metadata/fence_imm.xml 2017-05-04 14:32:36.412496605 +0200 +++ b/tests/data/metadata/fence_imm.xml 2017-05-04 14:33:30.162007401 +0200 @@ -74,6 +74,11 @@ Ciphersuite to use (same as ipmitool -C parameter) + + + + Bridge IPMI requests to the remote target address + diff -uNr a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml --- a/tests/data/metadata/fence_ipmilan.xml 2017-05-04 14:32:36.412496605 +0200 +++ b/tests/data/metadata/fence_ipmilan.xml 2017-05-04 14:33:30.162007401 +0200 @@ -74,6 +74,11 @@ Ciphersuite to use (same as ipmitool -C parameter) + + + + Bridge IPMI requests to the remote target address +