diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-12-19 11:04:47 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-01-09 10:21:18 +0100 |
commit | 573b466c3973021fccca745d2e2ce4921d1ba852 (patch) | |
tree | f9e1d0e78e7c1cbdc8e615bf21fc18913b007420 /utils_cib.py | |
parent | a12fb1f94171e61b0c93f2dbfaa5b171087f2a52 (diff) | |
download | clufter-573b466c3973021fccca745d2e2ce4921d1ba852.tar.gz clufter-573b466c3973021fccca745d2e2ce4921d1ba852.tar.xz clufter-573b466c3973021fccca745d2e2ce4921d1ba852.zip |
utils_*: add helpers as utilized in experimental plugins now
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'utils_cib.py')
-rw-r--r-- | utils_cib.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils_cib.py b/utils_cib.py index de2bba1..bf5d3a0 100644 --- a/utils_cib.py +++ b/utils_cib.py @@ -54,3 +54,11 @@ class ResourceSpec(object): ret += ('<xsl:attribute name="type">{0}</xsl:attribute>' .format(self._type)) return ret + + @property + def xsl_attrs_select(self): + ret = "@class='{0}'".format(self._class) + if self._provider is not None: + ret += " and @provider='{0}'".format(self._provider) + ret += " and @type='{0}'".format(self._type) + return ret |