Merge "EMC VNX: Fix the total capacity for dynamic Pool"

This commit is contained in:
Jenkins 2015-07-14 11:11:27 +00:00 committed by Gerrit Code Review
commit e9db340379
2 changed files with 6 additions and 4 deletions

View File

@ -614,7 +614,6 @@ class XMLAPIHelper(object):
'movers_id': [], 'movers_id': [],
'virtualProvisioning': '', 'virtualProvisioning': '',
'dataServicePolicies': '', 'dataServicePolicies': '',
'autoSize': '',
'greedy': '', 'greedy': '',
'isBackendPool': '', 'isBackendPool': '',
} }
@ -624,7 +623,6 @@ class XMLAPIHelper(object):
'diskType', 'diskType',
'virtualProvisioning', 'virtualProvisioning',
'dataServicePolicies', 'dataServicePolicies',
'autoSize',
'greedy', 'greedy',
'isBackendPool', 'isBackendPool',
] ]
@ -632,7 +630,7 @@ class XMLAPIHelper(object):
pool['id'] = item[1].get('pool', '') pool['id'] = item[1].get('pool', '')
pool['used_size'] = item[1].get('usedSize', '') 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(): if 'movers' in item[1].keys():
pool['movers_id'] = item[1]['movers'].split() pool['movers_id'] = item[1]['movers'].split()

View File

@ -78,6 +78,7 @@ class EMCVNXDriverTestData(object):
emc_nas_server_default = '192.1.1.1' emc_nas_server_default = '192.1.1.1'
storage_pool_id_default = '48' storage_pool_id_default = '48'
storage_pool_size_default = '1024'
FAKE_ERROR = "" FAKE_ERROR = ""
FAKE_OUTPUT = "" FAKE_OUTPUT = ""
@ -314,7 +315,7 @@ disks = d7
description="Mapped Pool POOL_SAS1 on FNM00124500890" description="Mapped Pool POOL_SAS1 on FNM00124500890"
mayContainSlicesDefault="true" diskType="Performance" mayContainSlicesDefault="true" diskType="Performance"
size="0" usedSize="0" size="0" usedSize="0"
autoSize="0" virtualProvisioning="true" isHomogeneous="true" autoSize="1024" virtualProvisioning="true" isHomogeneous="true"
dataServicePolicies="Thin=Yes,Compressed=No,Mirrored=No,Tiering dataServicePolicies="Thin=Yes,Compressed=No,Mirrored=No,Tiering
policy=Auto-Tier/Optimize Pool" templatePool="48" stripeCount="5" policy=Auto-Tier/Optimize Pool" templatePool="48" stripeCount="5"
stripeSize="256" pool="48"> stripeSize="256" pool="48">
@ -1208,6 +1209,9 @@ class EMCShareDriverVNXTestCase(test.TestCase):
pool_id = self.driver.plugin._pool['id'] pool_id = self.driver.plugin._pool['id']
self.assertEqual(pool_id, TD.storage_pool_id_default, self.assertEqual(pool_id, TD.storage_pool_id_default,
"Storage pool id parse error") "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): def test_setup_server(self):
hook = RequestSideEffect() hook = RequestSideEffect()