summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2016-01-26 21:07:26 +0100
committerJan Pokorný <jpokorny@redhat.com>2016-02-01 23:53:47 +0100
commitb4bdd4d60818f0a3176cd6682b7d140f7886e551 (patch)
tree7a153e25f7423b704d0828f66342a8cd1b413481 /filters
parent5eb89e491c9c869005ae99f1a99cdbcbae3cd7e6 (diff)
downloadclufter-b4bdd4d60818f0a3176cd6682b7d140f7886e551.tar.gz
clufter-b4bdd4d60818f0a3176cd6682b7d140f7886e551.tar.xz
clufter-b4bdd4d60818f0a3176cd6682b7d140f7886e551.zip
filters/ccsflat2cibprelude[vm]: propagate stop timeout
As this is to be applied regardless the __enforce_timeouts flag in this particular case. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'filters')
-rw-r--r--filters/cluster/rm/vm/__init__.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/filters/cluster/rm/vm/__init__.py b/filters/cluster/rm/vm/__init__.py
index 47aed09..fee9fbd 100644
--- a/filters/cluster/rm/vm/__init__.py
+++ b/filters/cluster/rm/vm/__init__.py
@@ -1,5 +1,5 @@
# -*- coding: UTF-8 -*-
-# Copyright 2015 Red Hat, Inc.
+# Copyright 2016 Red Hat, Inc.
# Part of clufter project
# Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt)
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
@@ -42,6 +42,23 @@ ccsflat2cibprelude = '''\
rg2hb_xsl('snapshot', req=None)
) + '''\
</instance_attributes>
+
+ <!-- OPERATIONS -->
+ <xsl:variable name="VmStop"
+ select="action[
+ @name = 'stop'
+ and
+ number(@timeout) &gt; 0
+ ]"/>
+ <xsl:if test="$VmStop">
+ <operations>
+''' + (
+ rg2hb_xsl("stop", "{concat($VmStop/@timeout, 's')}",
+ req=abs, op=True)
+) + '''\
+ </operations>
+ </xsl:if>
+
</xsl:when>
'''