diff options
| -rw-r--r-- | filter_plugins/oo_filters.py | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index eeb04cb4e..ba9c3f931 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -735,13 +735,14 @@ class FilterModule(object):          if 'hosted' in hostvars['openshift']:              for component in hostvars['openshift']['hosted']:                  if 'storage' in hostvars['openshift']['hosted'][component]: -                    kind = hostvars['openshift']['hosted'][component]['storage']['kind'] -                    create_pv = hostvars['openshift']['hosted'][component]['storage']['create_pv'] -                    create_pvc = hostvars['openshift']['hosted'][component]['storage']['create_pvc'] -                    if kind != None and create_pv and create_pvc: -                        volume = hostvars['openshift']['hosted'][component]['storage']['volume']['name'] -                        size = hostvars['openshift']['hosted'][component]['storage']['volume']['size'] -                        access_modes = hostvars['openshift']['hosted'][component]['storage']['access_modes'] +                    params = hostvars['openshift']['hosted'][component]['storage'] +                    kind = params['kind'] +                    create_pv = params['create_pv'] +                    create_pvc = params['create_pvc'] +                    if kind not in [None, 'object'] and create_pv and create_pvc: +                        volume = params['volume']['name'] +                        size = params['volume']['size'] +                        access_modes = params['access_modes']                          persistent_volume_claim = dict(                              name="{0}-claim".format(volume),                              capacity=size, | 
