1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>
<xsl:template match="cib">
<h2>Cluster Configuration: <xsl:value-of select="@admin_epoch"/>.<xsl:value-of select="@epoch"/>.<xsl:value-of select="@num_updates"/></h2>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="cluster_property_set">
<li>
Property Set: <xsl:value-of select="@id"/>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="node">
<li>
<b>Node <xsl:value-of select="@uname"/></b> (<xsl:value-of select="@id"/>)
<xsl:apply-templates select="node()"/>
</li>
</xsl:template>
<xsl:template match="primitive">
<li>
<b>Resource
<xsl:value-of select="@class"/>::<xsl:value-of select="@type"/>:<xsl:value-of select="@id"/>
</b>
<ul>
<xsl:apply-templates select="node()"/>
Preferred Locations:
<xsl:call-template name="location_prefs">
<xsl:with-param name="resource" select="@id"/>
</xsl:call-template>
</ul>
</li>
</xsl:template>
<xsl:template name="location_prefs">
<xsl:parameter name="resource"/>
<xsl:for-each select="/cib/configuration/constraints/rsc_location">
<xsl:if test="@rsc = $resource">
<xsl:apply-templates/>
</xsl:if>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
<xsl:template match="group">
<li>
<h4>Resource Group <xsl:value-of select="@id"/></h4>
<ul><xsl:apply-templates/></ul>
</li>
</xsl:template>
<xsl:template match="clone">
<li>
<h4>Cloned Resource <xsl:value-of select="@id"/></h4>
<ul><xsl:apply-templates/></ul>
</li>
</xsl:template>
<xsl:template match="op">
<li>
<xsl:value-of select="@name"/>:
interval=<xsl:value-of select="@interval"/>
timeout=<xsl:value-of select="@timeout"/>
</li>
</xsl:template>
<xsl:template match="instance_attributes">
Options: <xsl:value-of select="@id"/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="rsc_location">
Location: <xsl:value-of select="@rsc"/>
<ul><xsl:apply-templates/></ul>
</xsl:template>
<xsl:template match="rule">
<ul><xsl:apply-templates/></ul>
</xsl:template>
<xsl:template match="expression">
<li>
<xsl:value-of select="@attribute"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@operation"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@value"/>
<xsl:text> </xsl:text>
(score=<xsl:value-of select="../@score"/>)
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="attributes/nvpair">
<li>
<xsl:value-of select="@name"/>="<xsl:value-of select="@value"/>"
</li>
</xsl:template>
<xsl:template match="crm_config">
<h3>Cluster Options</h3>
<ul><xsl:apply-templates/></ul>
</xsl:template>
<xsl:template match="nodes">
<h3>Available Nodes</h3>
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="resources">
<h3>Configured Resources</h3>
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="constraints">
<h3>Inter-Resource Relationships</h3>
<xsl:apply-templates select="rsc_colocation"/>
<xsl:apply-templates select="rsc_order"/>
</xsl:template>
<xsl:template match="configuration">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="attributes">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="operations">
Operations:
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="status"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="*">
<div>
<ul>
<font color="#777777">Unknown Object: </font>
<xsl:value-of select="name()"/>
<p><xsl:apply-templates select="@*"/></p>
<xsl:apply-templates select="node()" />
</ul>
</div>
</xsl:template>
<xsl:template match="@*">
<xsl:value-of select="name()"/>
<xsl:text>=</xsl:text>
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</xsl:template>
</xsl:stylesheet>
|