Merge "Fix iopsLimit parameter in ScaleIO connector"
This commit is contained in:
commit
d16aca5c27
|
@ -2311,7 +2311,7 @@ class ScaleIOConnector(InitiatorConnector):
|
||||||
if self.bandwidth_limit is not None:
|
if self.bandwidth_limit is not None:
|
||||||
params['bandwidthLimitInKbps'] = self.bandwidth_limit
|
params['bandwidthLimitInKbps'] = self.bandwidth_limit
|
||||||
if self.iops_limit is not None:
|
if self.iops_limit is not None:
|
||||||
params['iops_limit'] = self.iops_limit
|
params['iopsLimit'] = self.iops_limit
|
||||||
|
|
||||||
request = (
|
request = (
|
||||||
"https://%(server_ip)s:%(server_port)s/api/instances/"
|
"https://%(server_ip)s:%(server_port)s/api/instances/"
|
||||||
|
|
|
@ -2143,6 +2143,18 @@ class ScaleIOConnectorTestCase(ConnectorTestCase):
|
||||||
"""Fake REST server"""
|
"""Fake REST server"""
|
||||||
api_call = url.split(':', 2)[2].split('/', 1)[1].replace('api/', '')
|
api_call = url.split(':', 2)[2].split('/', 1)[1].replace('api/', '')
|
||||||
|
|
||||||
|
if 'setMappedSdcLimits' in api_call:
|
||||||
|
self.assertNotIn("iops_limit", kwargs['data'])
|
||||||
|
if "iopsLimit" not in kwargs['data']:
|
||||||
|
self.assertIn("bandwidthLimitInKbps",
|
||||||
|
kwargs['data'])
|
||||||
|
elif "bandwidthLimitInKbps" not in kwargs['data']:
|
||||||
|
self.assertIn("iopsLimit", kwargs['data'])
|
||||||
|
else:
|
||||||
|
self.assertIn("bandwidthLimitInKbps",
|
||||||
|
kwargs['data'])
|
||||||
|
self.assertIn("iopsLimit", kwargs['data'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self.mock_calls[api_call]
|
return self.mock_calls[api_call]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue