From: Ivan Kolodyazhny Date: Fri, 8 May 2015 14:00:04 +0000 (+0300) Subject: Fix FakeISCSIDriver and FakeISERDriver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=24630c5d0ea78eade4d29856d9aa2a3305966c33;p=openstack-build%2Fcinder-build.git Fix FakeISCSIDriver and FakeISERDriver Need to pass correct int value for provisioned_capacity_gb capability to get it working with scheduler. Change-Id: Iee93f11d12e035d89227c5ffaf336ee2dcd1bcec Closes-Bug: #1453146 --- diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index b9dfea00f..0b76a01b0 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -1636,6 +1636,21 @@ class FakeISCSIDriver(ISCSIDriver): super(FakeISCSIDriver, self).__init__(execute=self.fake_execute, *args, **kwargs) + def _update_pools_and_stats(self, data): + fake_pool = {} + fake_pool.update(dict( + pool_name=data["volume_backend_name"], + total_capacity_gb=0, + free_capacity_gb=0, + provisioned_capacity_gb=0, + reserved_percentage=100, + QoS_support=False, + filter_function=self.get_filter_function(), + goodness_function=self.get_goodness_function() + )) + data["pools"].append(fake_pool) + self._stats = data + def create_volume(self, volume): pass