mock, drv = self._setup_mock_driver(
'server', 'serverpath', '/var/run/sr-mount')
- volume = dict(provider_location='sr-uuid/vdi-uuid')
+ volume = dict(provider_location='sr-uuid/vdi-uuid', size=1)
context = MockContext('token')
mock.StubOutWithMock(driver.image_utils, 'fetch_to_raw')
simple_context('device'))
driver.image_utils.fetch_to_raw(
- context, 'image_service', 'image_id', 'device')
+ context, 'image_service', 'image_id', 'device', size=1)
mock.ReplayAll()
drv._use_image_utils_to_pipe_bytes_to_volume(
image_utils.fetch_to_raw(context,
image_service,
image_id,
- device)
+ device,
+ size=volume['size'])
def _use_glance_plugin_to_copy_image_to_volume(self, context, volume,
image_service, image_id):