fence-agents: master - library: Metadata are not correct if agent does not support on/off
Marek Grác
marx at fedoraproject.org
Mon Oct 25 15:01:08 UTC 2010
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=c3491b707166d877037d0f65ce7117396398d6af
Commit: c3491b707166d877037d0f65ce7117396398d6af
Parent: 1c0b1d0952d7f79ba3797bfaefa8f73d234d271d
Author: Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate: Mon Oct 25 16:57:00 2010 +0200
Committer: Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Mon Oct 25 16:57:00 2010 +0200
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#623266
---
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 7e49649..65f88da 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -483,9 +483,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\" />"
More information about the cluster-commits
mailing list