Merge "Fix _is_share_clone_compatible for NetApp NFS storage" into stable/mitaka

This commit is contained in:
Jenkins 2016-09-13 16:42:25 +00:00 committed by Gerrit Code Review
commit 55debcdfa5
2 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,7 @@ POOL_NAME = 'aggr1'
SHARE_IP = '192.168.99.24'
EXPORT_PATH = '/fake/export/path'
NFS_SHARE = '%s:%s' % (SHARE_IP, EXPORT_PATH)
HOST_STRING = '%s@%s#%s' % (HOST_NAME, BACKEND_NAME, POOL_NAME)
HOST_STRING = '%s@%s#%s' % (HOST_NAME, BACKEND_NAME, NFS_SHARE)
NFS_HOST_STRING = '%s@%s#%s' % (HOST_NAME, BACKEND_NAME, NFS_SHARE)
FLEXVOL = 'openstack-flexvol'
NFS_FILE_PATH = 'nfsvol'

View File

@ -318,6 +318,8 @@ class NetAppCmodeNfsDriver(nfs_base.NetAppNfsDriver):
def _is_share_clone_compatible(self, volume, share):
"""Checks if share is compatible with volume to host its clone."""
if share not in volume['host']:
return False
thin = self._is_volume_thin_provisioned(volume)
compatible = self._share_has_space_for_clone(share,
volume['size'],