diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-09-19 14:37:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-19 14:37:11 -0400 |
commit | de7bd345d356589af4e1064fdafbb048d520d69b (patch) | |
tree | ff4179999ad8b0f2ef48bc654bc6388482a63f8d | |
parent | 3c3459b95fefd88cc58aa4ee23661fecaea254b4 (diff) | |
parent | 49d3ab1672111365a94c1ae6d133fb70cf29f103 (diff) | |
download | openshift-de7bd345d356589af4e1064fdafbb048d520d69b.tar.gz openshift-de7bd345d356589af4e1064fdafbb048d520d69b.tar.bz2 openshift-de7bd345d356589af4e1064fdafbb048d520d69b.tar.xz openshift-de7bd345d356589af4e1064fdafbb048d520d69b.zip |
Merge pull request #2467 from abutcher/issue2464
Do not create volume claims for hosted components when storage type is object.
-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, |