summaryrefslogtreecommitdiffstats
path: root/filter_plugins
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-07-10 14:02:10 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-07-10 14:02:10 -0400
commit042aadae4f815b0a5e8fce324b167bf4d6b57878 (patch)
treecde89cad94715e98d475ac440bd9d2fa65327d12 /filter_plugins
parent14bde2f7d99b2a0f01259834135bbdc324bcac70 (diff)
parent1830191258b9148b6ce286fa63d30c41e048a146 (diff)
downloadopenshift-042aadae4f815b0a5e8fce324b167bf4d6b57878.tar.gz
openshift-042aadae4f815b0a5e8fce324b167bf4d6b57878.tar.bz2
openshift-042aadae4f815b0a5e8fce324b167bf4d6b57878.tar.xz
openshift-042aadae4f815b0a5e8fce324b167bf4d6b57878.zip
Merge pull request #337 from kwoodson/create_host
example: create host using ansible zabbix module.
Diffstat (limited to 'filter_plugins')
-rw-r--r--filter_plugins/oo_filters.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index 0f3f4fa9e..4e4a7309d 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -223,6 +223,15 @@ class FilterModule(object):
# Gather up the values for the list of keys passed in
return [x for x in data if x[filter_attr]]
+ @staticmethod
+ def oo_build_zabbix_list_dict(values, string):
+ ''' Build a list of dicts with string as key for each value
+ '''
+ rval = []
+ for value in values:
+ rval.append({string: value})
+ return rval
+
def filters(self):
''' returns a mapping of filters to methods '''
return {
@@ -235,5 +244,6 @@ class FilterModule(object):
"oo_ec2_volume_definition": self.oo_ec2_volume_definition,
"oo_combine_key_value": self.oo_combine_key_value,
"oo_split": self.oo_split,
- "oo_filter_list": self.oo_filter_list
+ "oo_filter_list": self.oo_filter_list,
+ "oo_build_zabbix_list_dict": self.oo_build_zabbix_list_dict
}