cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/3] fencing: added option "on_target"
       [not found] <1435963968.10026117.1399028821359.JavaMail.zimbra@redhat.com>
@ 2014-05-02 11:15 ` Ondrej Mular
  0 siblings, 0 replies; only message in thread
From: Ondrej Mular @ 2014-05-02 11:15 UTC (permalink / raw)
  To: cluster-devel.redhat.com

added option "on_target" for agents that need attribute "on_target" in metadata

---
 fence/agents/lib/fencing.py.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

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\" />"
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-02 11:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1435963968.10026117.1399028821359.JavaMail.zimbra@redhat.com>
2014-05-02 11:15 ` [Cluster-devel] [PATCH 1/3] fencing: added option "on_target" Ondrej Mular

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).