ProphetStor failed to create volume size larger than the snapshot.

create_volume_from_snapshot can specify a volume size larger than the
orginal snapshot. Current code does not appear to handle this size
difference.
  1. Correct snapshot original volume size attribute name.
     Use 'volume_size' instead of size.

Closes-Bug: 1682687

Change-Id: I33dca7037ab7df26dc2f73a37a325de4091750e8
This commit is contained in:
rick.chen 2017-04-14 09:22:59 +08:00
parent 4007618092
commit 8f2181808b
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ DATA_IN_SNAPSHOT = {'id': 'snapshot1',
'volume_id': 'abc123',
'display_name': 'snapshot1',
'display_description': '',
'size': 5}
'volume_size': 5}
DATA_OUT_SNAPSHOT_CG = {
'id': 'snapshot1',

View File

@ -1122,7 +1122,7 @@ class DPLCOMMONDriver(driver.CloneableImageVD,
LOG.info('Flexvisor succeeded to create volume %(id)s '
'from snapshot.', {'id': volume['id']})
if volume['size'] > snapshot['size']:
if volume['size'] > snapshot['volume_size']:
self.extend_volume(volume, volume['size'])
if volume.get('consistencygroup_id', None):