summaryrefslogtreecommitdiffstats
path: root/filter_plugins
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-09-22 14:22:10 -0400
committerGitHub <noreply@github.com>2016-09-22 14:22:10 -0400
commit1933ffb3ddf54c07034aabb2c5b4b43c07b6b54c (patch)
tree749ab46825850dc108010334b9936925bf3d353a /filter_plugins
parent0d5f1e214a98869e74599aa02ff5739ee6f7f002 (diff)
parent06cd13f98ab0a4b18861c5af8aae4d76e12c633e (diff)
downloadopenshift-1933ffb3ddf54c07034aabb2c5b4b43c07b6b54c.tar.gz
openshift-1933ffb3ddf54c07034aabb2c5b4b43c07b6b54c.tar.bz2
openshift-1933ffb3ddf54c07034aabb2c5b4b43c07b6b54c.tar.xz
openshift-1933ffb3ddf54c07034aabb2c5b4b43c07b6b54c.zip
Merge pull request #2473 from lhuard1A/openstack_inventory
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 ba9c3f931..1c12f2e07 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,