diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-02-05 13:17:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-05 13:17:57 -0500 |
commit | a965c28ab7ca6ac93c70e4a2415316ddaf52812e (patch) | |
tree | 7da0c11ef0426553991cd3527d91bcd2854f42c2 /roles/lib_openshift/src/test/integration/filter_plugins | |
parent | ec0983dc4bc96573e3f7f958aea7040c15c1db81 (diff) | |
parent | 4b054d7da5f404dfd8eb238b617e4dcf7dc93b17 (diff) | |
download | openshift-a965c28ab7ca6ac93c70e4a2415316ddaf52812e.tar.gz openshift-a965c28ab7ca6ac93c70e4a2415316ddaf52812e.tar.bz2 openshift-a965c28ab7ca6ac93c70e4a2415316ddaf52812e.tar.xz openshift-a965c28ab7ca6ac93c70e4a2415316ddaf52812e.zip |
Merge pull request #3249 from kwoodson/oc_label
Adding oc_label to lib_openshift.
Diffstat (limited to 'roles/lib_openshift/src/test/integration/filter_plugins')
-rw-r--r-- | roles/lib_openshift/src/test/integration/filter_plugins/filters.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/test/integration/filter_plugins/filters.py b/roles/lib_openshift/src/test/integration/filter_plugins/filters.py new file mode 100644 index 000000000..6990a11a8 --- /dev/null +++ b/roles/lib_openshift/src/test/integration/filter_plugins/filters.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# vim: expandtab:tabstop=4:shiftwidth=4 +''' +Custom filters for use in testing +''' + + +class FilterModule(object): + ''' Custom filters for use in integration testing ''' + + @staticmethod + def label_dict_to_key_value_list(label_dict): + ''' Given a dict of labels/values, return list of key: <key> value: <value> pairs + + These are only used in integration testing. + ''' + + label_list = [] + for key in label_dict: + label_list.append({'key': key, 'value': label_dict[key]}) + + return label_list + + def filters(self): + ''' returns a mapping of filters to methods ''' + return { + "label_dict_to_key_value_list": self.label_dict_to_key_value_list, + } |