Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=53f... Commit: 53fce21aa1b568e3ae65393f1fbce826a3d5c7ef Parent: ae7be075867909d08ec2bfbae8a7847a1a838580 Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Mon Oct 25 16:57:00 2010 +0200 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Fri Feb 25 10:04:48 2011 +0100
library: Metadata are not correct if agent does not support on/off
Metadata actions are generated according to option io_fencing. Currently only fence_sanbox is affected as fence_ifmib accepts both enable/disable and on/off (so io_fencing is not used)
Resolves: rhbz#488959 --- fence/agents/lib/fencing.py.py | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index be2a44e..de8bd90 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -487,9 +487,14 @@ def metadata(avail_opt, options, docs): print "\t</parameter>" print "</parameters>" print "<actions>" - print "\t<action name="on" />" - print "\t<action name="off" />" - print "\t<action name="reboot" />" + if avail_opt.count("io_fencing") == 0: + print "\t<action name="on" />" + print "\t<action name="off" />" + print "\t<action name="reboot" />" + else: + print "\t<action name="enable" />" + print "\t<action name="disable" />" + print "\t<action name="status" />" print "\t<action name="list" />" print "\t<action name="monitor" />"
cluster-commits@lists.fedorahosted.org