summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2016-01-30 03:06:28 +0100
committerJan Pokorný <jpokorny@redhat.com>2016-02-01 23:54:42 +0100
commitfa4f3b95920ed7c5446cf6847e5811fd7688e833 (patch)
tree10a305b390f4460a2e2bab106632d0024b22c3e5
parent4ce864157ab0259d3a7a9440b7ca748f7de536f4 (diff)
downloadclufter-fa4f3b95920ed7c5446cf6847e5811fd7688e833.tar.gz
clufter-fa4f3b95920ed7c5446cf6847e5811fd7688e833.tar.xz
clufter-fa4f3b95920ed7c5446cf6847e5811fd7688e833.zip
filters/cibcompact2cib[resources]: cond. use of $Monitor
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--filters/cib/configuration/resources/__init__.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/filters/cib/configuration/resources/__init__.py b/filters/cib/configuration/resources/__init__.py
index f43dcbd..cee51c5 100644
--- a/filters/cib/configuration/resources/__init__.py
+++ b/filters/cib/configuration/resources/__init__.py
@@ -694,9 +694,15 @@ cibcompact2cib = ('''\
<xsl:when test="name() = 'operations'">
<xsl:copy>
<xsl:apply-templates select="@*|*"/>
- <op id="{concat($ResPrefix, '-OP-monitor')}"
- name="monitor"
- interval="{$Monitor/@value}"/>
+ <xsl:if test="not(
+ op[@name = 'monitor']
+ )
+ and
+ $Monitor">
+ <op id="{concat($ResPrefix, '-OP-monitor')}"
+ name="monitor"
+ interval="{$Monitor/@value}"/>
+ </xsl:if>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
@@ -706,7 +712,9 @@ cibcompact2cib = ('''\
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
- <xsl:if test="not(operations)">
+ <xsl:if test="not(operations)
+ and
+ $Monitor">
<operations>
<op id="{concat(@id, '-OP-monitor')}"
name="monitor"