Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commit... Commit: 86b5f9df0c82d3271476191c3561a062fb5d4186 Parent: 11182a89cf217b3cb9cf6b170e405310bbb365a9 Author: Lon Hohberger lhh@redhat.com AuthorDate: Fri Nov 13 18:16:12 2009 -0500 Committer: Fabio M. Di Nitto fdinitto@redhat.com CommitterDate: Tue Apr 20 14:39:05 2010 +0200
fence: add fence agent -> rng generator
Signed-off-by: Lon Hohberger lhh@redhat.com --- fence/agents/lib/fence2rng.xsl | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/fence/agents/lib/fence2rng.xsl b/fence/agents/lib/fence2rng.xsl new file mode 100644 index 0000000..56f5859 --- /dev/null +++ b/fence/agents/lib/fence2rng.xsl @@ -0,0 +1,23 @@ +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform%22%3E +<xsl:output method="text" indent="yes"/> +<xsl:template name="capitalize"> + <xsl:param name="value"/> + <xsl:variable name="normalized" select="translate($value, '_abcdefghijklmnopqrstuvwrxyz', '-ABCDEFGHIJKLMNOPQRSTUVWRXYZ')"/> + <xsl:value-of select="$normalized"/> +</xsl:template> +<xsl:template match="/resource-agent"> + <!-- <xsl:value-of select="@name"/> --> + <group> + <optional> + <attribute name="option"> <!-- deprecated; for compatibility. use "action" --> + </optional><xsl:for-each select="parameters/parameter"> + xsl:choose<xsl:when test="@required = 1 or @primary = 1"> + <attribute name="<xsl:value-of select="@name"/>" rha:description="<xsl:value-of select="normalize-space(shortdesc)"/>" /></xsl:when>xsl:otherwise + <optional> + <attribute name="<xsl:value-of select="@name"/>" rha:description="<xsl:value-of select="normalize-space(shortdesc)"/>" /> + </optional></xsl:otherwise> + </xsl:choose></xsl:for-each> + </group> + +</xsl:template> +</xsl:stylesheet>