diff options
author | Andrew Butcher <abutcher@afrolegs.com> | 2016-12-13 16:56:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 16:56:58 -0500 |
commit | 002fdef1769baccdd6c90a4caa8c0028ec9559db (patch) | |
tree | b3a4b13fa37e3f28faea80ac847736d4459f3f3b | |
parent | 1ed762a31e0a50f4a21d1cc1ede6588cff71932c (diff) | |
parent | 8fc936578f9cf2462148043ef3ff0470764d6cfd (diff) | |
download | openshift-002fdef1769baccdd6c90a4caa8c0028ec9559db.tar.gz openshift-002fdef1769baccdd6c90a4caa8c0028ec9559db.tar.bz2 openshift-002fdef1769baccdd6c90a4caa8c0028ec9559db.tar.xz openshift-002fdef1769baccdd6c90a4caa8c0028ec9559db.zip |
Merge pull request #2861 from luisfdez/fix/access_modes
Fix access_modes initialization
-rw-r--r-- | filter_plugins/oo_filters.py | 6 | ||||
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index c3f94feff..8fe85d8e2 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -708,7 +708,7 @@ class FilterModule(object): volume = params['volume']['name'] path = directory + '/' + volume size = params['volume']['size'] - access_modes = params['access_modes'] + access_modes = params['access']['modes'] persistent_volume = dict( name="{0}-volume".format(volume), capacity=size, @@ -721,7 +721,7 @@ class FilterModule(object): elif kind == 'openstack': volume = params['volume']['name'] size = params['volume']['size'] - access_modes = params['access_modes'] + access_modes = params['access']['modes'] filesystem = params['openstack']['filesystem'] volume_id = params['openstack']['volumeID'] persistent_volume = dict( @@ -762,7 +762,7 @@ class FilterModule(object): 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'] + access_modes = params['access']['modes'] persistent_volume_claim = dict( name="{0}-claim".format(volume), capacity=size, diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index a6f74168e..41ae07a48 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1994,7 +1994,9 @@ class OpenShiftFacts(object): options='*(rw,root_squash)' ), host=None, - access_modes=['ReadWriteOnce'], + access=dict( + modes=['ReadWriteOnce'] + ), create_pv=True, create_pvc=False ) @@ -2011,7 +2013,9 @@ class OpenShiftFacts(object): options='*(rw,root_squash)' ), host=None, - access_modes=['ReadWriteOnce'], + access=dict( + modes=['ReadWriteOnce'] + ), create_pv=True, create_pvc=False ) @@ -2027,7 +2031,9 @@ class OpenShiftFacts(object): directory='/exports', options='*(rw,root_squash)'), host=None, - access_modes=['ReadWriteMany'], + access=dict( + modes=['ReadWriteMany'] + ), create_pv=True, create_pvc=True ) |