summaryrefslogtreecommitdiff
path: root/heatclient/v1
diff options
context:
space:
mode:
authorhuangtianhua <huangtianhua@huawei.com>2016-10-18 10:32:01 +0800
committerhuangtianhua <huangtianhua@huawei.com>2016-10-20 02:15:20 +0000
commit0ac4a80dada9a7fb9ee13d965c496b2b7341a4d5 (patch)
treedc44ac242b9d145b8f6a6e9e53834659759780cf /heatclient/v1
parentc14e1827f67df9293a63fbe26f336c83f0593514 (diff)
downloadpython-heatclient-0ac4a80dada9a7fb9ee13d965c496b2b7341a4d5.tar.gz
Return condition functions based on the filter param
Add 'with_condition_func' filter param for API template-function-list, if the param set to true, the response will include the condition functions. Change-Id: Ia7b4da71ed5c3da105dd23917e4921a96e445026 Closes-Bug: #1625505
Diffstat (limited to 'heatclient/v1')
-rw-r--r--heatclient/v1/template_versions.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/heatclient/v1/template_versions.py b/heatclient/v1/template_versions.py
index 0bfc0a1..325cc96 100644
--- a/heatclient/v1/template_versions.py
+++ b/heatclient/v1/template_versions.py
@@ -35,11 +35,19 @@ class TemplateVersionManager(base.BaseManager):
"""
return self._list('/template_versions', 'template_versions')
- def get(self, template_version):
+ def get(self, template_version, **kwargs):
"""Get a list of functions for a specific resource_type.
:param template_version: template version to get the functions for
"""
url_str = '/template_versions/%s/functions' % (
parse.quote(encodeutils.safe_encode(template_version), ''))
+
+ params = {}
+ if 'with_condition_func' in kwargs:
+ with_condition_func = kwargs.pop('with_condition_func')
+ params.update({'with_condition_func': with_condition_func})
+ if params:
+ url_str += '?%s' % parse.urlencode(params, True)
+
return self._list(url_str, 'template_functions')