Merge "Fix remotefs driver report wrong value"
This commit is contained in:
commit
00956b26ab
|
@ -681,7 +681,6 @@ class RemoteFSPoolMixinTestCase(test.TestCase):
|
|||
share_total_gb = 3
|
||||
share_free_gb = 2
|
||||
share_used_gb = 4 # provisioned space
|
||||
expected_allocated_gb = share_total_gb - share_free_gb
|
||||
|
||||
self._driver._mounted_shares = [mock.sentinel.share]
|
||||
|
||||
|
@ -710,7 +709,6 @@ class RemoteFSPoolMixinTestCase(test.TestCase):
|
|||
'total_capacity_gb': float(share_total_gb),
|
||||
'free_capacity_gb': float(share_free_gb),
|
||||
'provisioned_capacity_gb': float(share_used_gb),
|
||||
'allocated_capacity_gb': float(expected_allocated_gb),
|
||||
'reserved_percentage': (
|
||||
self._driver.configuration.reserved_percentage),
|
||||
'max_over_subscription_ratio': (
|
||||
|
|
|
@ -1734,14 +1734,13 @@ class RemoteFSPoolMixin(object):
|
|||
for share in self._mounted_shares:
|
||||
(share_capacity,
|
||||
share_free,
|
||||
share_used) = self._get_capacity_info(share)
|
||||
total_allocated) = self._get_capacity_info(share)
|
||||
|
||||
pool = {'pool_name': self._get_pool_name_from_share(share),
|
||||
'total_capacity_gb': share_capacity / float(units.Gi),
|
||||
'free_capacity_gb': share_free / float(units.Gi),
|
||||
'provisioned_capacity_gb': share_used / float(units.Gi),
|
||||
'allocated_capacity_gb': (
|
||||
share_capacity - share_free) / float(units.Gi),
|
||||
'provisioned_capacity_gb': (
|
||||
total_allocated / float(units.Gi)),
|
||||
'reserved_percentage': (
|
||||
self.configuration.reserved_percentage),
|
||||
'max_over_subscription_ratio': (
|
||||
|
|
Loading…
Reference in New Issue