Merge "EMC ScaleIO should return ceiling of volume size"
This commit is contained in:
commit
24e0309ecc
cinder
tests/unit/volume/drivers/emc/scaleio
volume/drivers/emc
@ -48,7 +48,7 @@ class TestManageExisting(scaleio.TestScaleIODriver):
|
||||
'instances/Volume::' + self.volume['provider_id']:
|
||||
mocks.MockHTTPSResponse({
|
||||
'id': fake.PROVIDER_ID,
|
||||
'sizeInKb': 8388608,
|
||||
'sizeInKb': 8000000,
|
||||
'mappedSdcInfo': None
|
||||
}, 200)
|
||||
},
|
||||
|
@ -58,7 +58,7 @@ class TestManageExistingSnapshot(scaleio.TestScaleIODriver):
|
||||
'instances/Volume::' + self.snapshot['provider_id']:
|
||||
mocks.MockHTTPSResponse({
|
||||
'id': fake.PROVIDER2_ID,
|
||||
'sizeInKb': 8388608,
|
||||
'sizeInKb': 8000000,
|
||||
'mappedSdcInfo': None,
|
||||
'ancestorVolumeId': fake.PROVIDER_ID
|
||||
}, 200),
|
||||
|
@ -19,6 +19,7 @@ Driver for EMC ScaleIO based on ScaleIO remote CLI.
|
||||
import base64
|
||||
import binascii
|
||||
import json
|
||||
import math
|
||||
|
||||
from os_brick.initiator import connector
|
||||
from oslo_config import cfg
|
||||
@ -1132,7 +1133,7 @@ class ScaleIODriver(driver.VolumeDriver):
|
||||
|
||||
def _get_volume_size(self, volume, existing_ref):
|
||||
response = self._query_scaleio_volume(volume, existing_ref)
|
||||
return int(response['sizeInKb'] / units.Mi)
|
||||
return int(math.ceil(float(response['sizeInKb']) / units.Mi))
|
||||
|
||||
def _execute_scaleio_get_request(self, request):
|
||||
r = requests.get(
|
||||
|
Loading…
x
Reference in New Issue
Block a user