Snapshot object has no attribute about size

Snapshot object has no attribute about size,but some unit tests
still use snapshot['size'].We should use snapshot['volume_size']
to modify it correctly.This patch will fix it.

Change-Id: Ibe237334482fc2decdd23181d1843cd19df95bfa
Closes-Bug: #1599522
This commit is contained in:
liangjingtao 2016-07-06 22:04:54 +08:00 committed by jingtao liang
parent afb81cd022
commit b5fca83a12
2 changed files with 2 additions and 3 deletions

@ -1812,7 +1812,7 @@ class GPFSDriverTestCase(test.TestCase):
snapshot = {}
snapshot['id'] = fake.SNAPSHOT_ID
snapshot['display_name'] = 'test-snap'
snapshot['size'] = 1000
snapshot['volume_size'] = 1000
snapshot['volume_id'] = fake.VOLUME_ID
snapshot['status'] = 'available'
snapshot['snapshot_metadata'] = []
@ -1906,7 +1906,7 @@ class GPFSNFSDriverTestCase(test.TestCase):
snapshot = {}
snapshot['id'] = '12345'
snapshot['name'] = 'test-snap'
snapshot['size'] = 1000
snapshot['volume_size'] = 1000
snapshot['volume_id'] = '123456'
snapshot['status'] = 'available'
return snapshot

@ -110,7 +110,6 @@ class InfortrendCLITestData(object):
test_snapshot = {
'id': 'ffa9bc5e-1172-4021-acaf-cdcd78a9584d',
'volume_id': test_volume['id'],
'size': 2,
'volume_name': test_volume['name'],
'volume_size': 2,
'project_id': 'project',