Fix _usage_from_snapshot in volume.utils
Now in this function we trying to get snapshot_ref.volume for collecting 'availability_zone'. It's invalid because snapshot_ref in this function is __dict__. In this patchset there is fix for it. Change-Id: I4cb86c0efd7520904fdf2288048d07cc40ed3a13 Closes-bug: #1390064
This commit is contained in:
@@ -120,7 +120,7 @@ def _usage_from_snapshot(context, snapshot_ref, **extra_usage_info):
|
||||
usage_info = {
|
||||
'tenant_id': snapshot_ref['project_id'],
|
||||
'user_id': snapshot_ref['user_id'],
|
||||
'availability_zone': snapshot_ref.volume['availability_zone'],
|
||||
'availability_zone': snapshot_ref['volume']['availability_zone'],
|
||||
'volume_id': snapshot_ref['volume_id'],
|
||||
'volume_size': snapshot_ref['volume_size'],
|
||||
'snapshot_id': snapshot_ref['id'],
|
||||
|
||||
Reference in New Issue
Block a user