EMC VNX: Fix the total capacity for dynamic Pool
For the pools that are not dynamic, the total capacity of the pool returns as total size of all members of the pool; For the pools that are dynamic, it returns the potential, maximum total size, in other words the total size of all members plus the space available for the pool extension. Change-Id: Ie093a9ebcda7ca77906efe3786ee585b836c6a52 Closes-bug: 1464136
This commit is contained in:
parent
6eedbb44e6
commit
d32c1e5c70
@ -613,7 +613,6 @@ class XMLAPIHelper(object):
|
||||
'movers_id': [],
|
||||
'virtualProvisioning': '',
|
||||
'dataServicePolicies': '',
|
||||
'autoSize': '',
|
||||
'greedy': '',
|
||||
'isBackendPool': '',
|
||||
}
|
||||
@ -623,7 +622,6 @@ class XMLAPIHelper(object):
|
||||
'diskType',
|
||||
'virtualProvisioning',
|
||||
'dataServicePolicies',
|
||||
'autoSize',
|
||||
'greedy',
|
||||
'isBackendPool',
|
||||
]
|
||||
@ -631,7 +629,7 @@ class XMLAPIHelper(object):
|
||||
|
||||
pool['id'] = item[1].get('pool', '')
|
||||
pool['used_size'] = item[1].get('usedSize', '')
|
||||
pool['total_size'] = item[1].get('size', '')
|
||||
pool['total_size'] = item[1].get('autoSize', '')
|
||||
if 'movers' in item[1].keys():
|
||||
pool['movers_id'] = item[1]['movers'].split()
|
||||
|
||||
|
@ -77,6 +77,7 @@ class EMCVNXDriverTestData(object):
|
||||
emc_nas_server_default = '192.1.1.1'
|
||||
|
||||
storage_pool_id_default = '48'
|
||||
storage_pool_size_default = '1024'
|
||||
|
||||
FAKE_ERROR = ""
|
||||
FAKE_OUTPUT = ""
|
||||
@ -313,7 +314,7 @@ disks = d7
|
||||
description="Mapped Pool POOL_SAS1 on FNM00124500890"
|
||||
mayContainSlicesDefault="true" diskType="Performance"
|
||||
size="0" usedSize="0"
|
||||
autoSize="0" virtualProvisioning="true" isHomogeneous="true"
|
||||
autoSize="1024" virtualProvisioning="true" isHomogeneous="true"
|
||||
dataServicePolicies="Thin=Yes,Compressed=No,Mirrored=No,Tiering
|
||||
policy=Auto-Tier/Optimize Pool" templatePool="48" stripeCount="5"
|
||||
stripeSize="256" pool="48">
|
||||
@ -1190,6 +1191,9 @@ class EMCShareDriverVNXTestCase(test.TestCase):
|
||||
pool_id = self.driver.plugin._pool['id']
|
||||
self.assertEqual(pool_id, TD.storage_pool_id_default,
|
||||
"Storage pool id parse error")
|
||||
self.assertEqual(TD.storage_pool_size_default,
|
||||
self.driver.plugin._pool['total_size'],
|
||||
"Storage pool size parse error")
|
||||
|
||||
def test_setup_server(self):
|
||||
hook = RequestSideEffect()
|
||||
|
Loading…
Reference in New Issue
Block a user