Gitweb:
http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=b33546...
Commit: b33546058c4114cf8fc65e207cf1c6e42325fd3b
Parent: 96d7a8383197e3d34c201139445ff177d870ff62
Author: Ondrej Mular <omular(a)redhat.com>
AuthorDate: Fri May 2 07:15:49 2014 -0400
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon May 5 10:47:18 2014 +0200
fencing: added option "on_target"
added option "on_target" for agents that need attribute "on_target" in
metadata
Signed-off-by: Marek 'marx' Grac <mgrac(a)redhat.com>
---
fence/agents/lib/fencing.py.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 0539a2f..76c2cd1 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -370,6 +370,10 @@ all_opt = {
"shortdesc" : "Method to fence (onoff|cycle)",
"default" : "onoff",
"choices" : [ "onoff", "cycle" ],
+ "order" : 1},
+ "on_target": {
+ "getopt" : "",
+ "help" : "",
"order" : 1}
}
@@ -521,7 +525,10 @@ def metadata(avail_opt, options, docs):
print "<actions>"
if avail_opt.count("fabric_fencing") == 1:
## do 'unfence' at the start
- print "\t<action name=\"on\" automatic=\"1\"/>"
+ if avail_opt.count("on_target") == 1:
+ print "\t<action name=\"on\" on_target=\"1\"
automatic=\"1\"/>"
+ else:
+ print "\t<action name=\"on\" automatic=\"1\"/>"
else:
print "\t<action name=\"on\" automatic=\"0\"/>"
print "\t<action name=\"off\" />"