Merge "[NetApp] Fix default thin_provisioned volumes on AFF" into stable/train
This commit is contained in:
commit
fdb1253c51
|
@ -1557,11 +1557,10 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
|
|||
'size': six.text_type(size_gb) + 'g',
|
||||
'volume': volume_name,
|
||||
'volume-type': volume_type,
|
||||
'space-reserve': ('none' if thin_provisioned else 'volume'),
|
||||
}
|
||||
if volume_type != 'dp':
|
||||
api_args['junction-path'] = '/%s' % volume_name
|
||||
if thin_provisioned:
|
||||
api_args['space-reserve'] = 'none'
|
||||
if snapshot_policy is not None:
|
||||
api_args['snapshot-policy'] = snapshot_policy
|
||||
if language is not None:
|
||||
|
|
|
@ -2796,6 +2796,7 @@ class NetAppClientCmodeTestCase(test.TestCase):
|
|||
'volume': fake.SHARE_NAME,
|
||||
'volume-type': 'rw',
|
||||
'junction-path': '/%s' % fake.SHARE_NAME,
|
||||
'space-reserve': 'volume',
|
||||
}
|
||||
|
||||
self.client.send_request.assert_called_once_with('volume-create',
|
||||
|
@ -2843,6 +2844,28 @@ class NetAppClientCmodeTestCase(test.TestCase):
|
|||
self.client.enable_dedup.assert_called_once_with(fake.SHARE_NAME)
|
||||
self.client.enable_compression.assert_called_once_with(fake.SHARE_NAME)
|
||||
|
||||
@ddt.data(True, False)
|
||||
def test_create_volume_thin_provisioned(self, thin_provisioned):
|
||||
|
||||
self.mock_object(self.client, 'send_request')
|
||||
self.mock_object(self.client, 'update_volume_efficiency_attributes')
|
||||
|
||||
self.client.create_volume(
|
||||
fake.SHARE_AGGREGATE_NAME, fake.SHARE_NAME, 100,
|
||||
thin_provisioned=thin_provisioned)
|
||||
|
||||
volume_create_args = {
|
||||
'containing-aggr-name': fake.SHARE_AGGREGATE_NAME,
|
||||
'size': '100g',
|
||||
'volume': fake.SHARE_NAME,
|
||||
'volume-type': 'rw',
|
||||
'junction-path': '/%s' % fake.SHARE_NAME,
|
||||
'space-reserve': ('none' if thin_provisioned else 'volume'),
|
||||
}
|
||||
|
||||
self.client.send_request.assert_called_once_with('volume-create',
|
||||
volume_create_args)
|
||||
|
||||
def test_create_encrypted_volume(self):
|
||||
|
||||
self.mock_object(self.client, 'send_request')
|
||||
|
@ -2859,6 +2882,7 @@ class NetAppClientCmodeTestCase(test.TestCase):
|
|||
'volume-type': 'rw',
|
||||
'junction-path': '/%s' % fake.SHARE_NAME,
|
||||
'encrypt': 'true',
|
||||
'space-reserve': 'volume',
|
||||
}
|
||||
|
||||
self.client.send_request.assert_called_once_with('volume-create',
|
||||
|
@ -2879,6 +2903,7 @@ class NetAppClientCmodeTestCase(test.TestCase):
|
|||
'volume': fake.SHARE_NAME,
|
||||
'volume-type': 'rw',
|
||||
'junction-path': '/%s' % fake.SHARE_NAME,
|
||||
'space-reserve': 'volume',
|
||||
}
|
||||
|
||||
self.client.send_request.assert_called_once_with('volume-create',
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue with ONTAP AFF platforms while creating shares that forced
|
||||
volumes to have efficient data saving even when the contrary was
|
||||
specified. For more details, please refer to
|
||||
`launchpad bug #1929421 <https://bugs.launchpad.net/manila/+bug/1929421>`_
|
Loading…
Reference in New Issue