summaryrefslogtreecommitdiffstats
path: root/filter_plugins
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2016-09-20 14:34:16 +0200
committerLénaïc Huard <lhuard@amadeus.com>2016-09-20 15:49:04 +0200
commit06cd13f98ab0a4b18861c5af8aae4d76e12c633e (patch)
tree3dff16b44c52a755519c267436b311b8356ed27e /filter_plugins
parente092de714dc09a86a0ff26c648eec2033a3b9952 (diff)
downloadopenshift-06cd13f98ab0a4b18861c5af8aae4d76e12c633e.tar.gz
openshift-06cd13f98ab0a4b18861c5af8aae4d76e12c633e.tar.bz2
openshift-06cd13f98ab0a4b18861c5af8aae4d76e12c633e.tar.xz
openshift-06cd13f98ab0a4b18861c5af8aae4d76e12c633e.zip
Update the OpenStack dynamic inventory script
Diffstat (limited to 'filter_plugins')
-rw-r--r--filter_plugins/oo_filters.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index eeb04cb4e..7b4eb59c8 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -546,7 +546,7 @@ class FilterModule(object):
return certificates
@staticmethod
- def oo_pretty_print_cluster(data):
+ def oo_pretty_print_cluster(data, prefix='tag_'):
""" Read a subset of hostvars and build a summary of the cluster
in the following layout:
@@ -573,8 +573,8 @@ class FilterModule(object):
returns 'value2'
"""
for tag in tags:
- if tag[:len(key)+4] == 'tag_' + key:
- return tag[len(key)+5:]
+ if tag[:len(prefix)+len(key)] == prefix + key:
+ return tag[len(prefix)+len(key)+1:]
raise KeyError(key)
def _add_host(clusters,