summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_management/filter_plugins/oo_management_filters.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/roles/openshift_management/filter_plugins/oo_management_filters.py b/roles/openshift_management/filter_plugins/oo_management_filters.py
index 06bc0796d..3b7013d9a 100644
--- a/roles/openshift_management/filter_plugins/oo_management_filters.py
+++ b/roles/openshift_management/filter_plugins/oo_management_filters.py
@@ -1,5 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
+"""
+Filter methods for the management role
+"""
+
def oo_filter_container_providers(results):
"""results - the result from posting the API calls for adding new
@@ -8,14 +12,15 @@ providers"""
for result in results:
if 'results' in result['json']:
# We got an OK response
- r = result['json']['results'][0]
- all_results.append("Provider '{}' - Added successfully".format(r['name']))
+ res = result['json']['results'][0]
+ all_results.append("Provider '{}' - Added successfully".format(res['name']))
elif 'error' in result['json']:
# This was a problem
all_results.append("Provider '{}' - Failed to add. Message: {}".format(
result['item']['name'], result['json']['error']['message']))
return all_results
+
class FilterModule(object):
""" Custom ansible filter mapping """