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