fence-agents: master - fence: add fence agent -> rng generator

Fabio M. Di Nitto fabbione at fedoraproject.org
Tue Apr 20 13:24:43 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=86b5f9df0c82d3271476191c3561a062fb5d4186
Commit:        86b5f9df0c82d3271476191c3561a062fb5d4186
Parent:        11182a89cf217b3cb9cf6b170e405310bbb365a9
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Fri Nov 13 18:16:12 2009 -0500
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Tue Apr 20 14:39:05 2010 +0200

fence: add fence agent -> rng generator

Signed-off-by: Lon Hohberger <lhh at 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">
+<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">
+      &lt;!-- <xsl:value-of select="@name"/> --&gt;
+      &lt;group&gt;
+        &lt;optional&gt;
+          &lt;attribute name="option"&gt; &lt;!-- deprecated; for compatibility.  use "action" --&gt;
+        &lt;/optional&gt;<xsl:for-each select="parameters/parameter">
+	<xsl:choose><xsl:when test="@required = 1 or @primary = 1">
+        &lt;attribute name="<xsl:value-of select="@name"/>" rha:description="<xsl:value-of select="normalize-space(shortdesc)"/>" /&gt;</xsl:when><xsl:otherwise>
+        &lt;optional&gt;
+          &lt;attribute name="<xsl:value-of select="@name"/>" rha:description="<xsl:value-of select="normalize-space(shortdesc)"/>" /&gt;
+        &lt;/optional&gt;</xsl:otherwise>
+		</xsl:choose></xsl:for-each>
+      &lt;/group&gt;
+
+</xsl:template>
+</xsl:stylesheet>


More information about the cluster-commits mailing list