diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/volume/volumes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/api/openstack/volume/volumes.py b/nova/api/openstack/volume/volumes.py index 45ad297a4..edad3286a 100644 --- a/nova/api/openstack/volume/volumes.py +++ b/nova/api/openstack/volume/volumes.py @@ -84,10 +84,10 @@ def _translate_volume_summary_view(context, vol): d['availabilityZone'] = vol['availability_zone'] d['createdAt'] = vol['created_at'] + d['attachments'] = [] if vol['attach_status'] == 'attached': - d['attachments'] = [_translate_attachment_detail_view(context, vol)] - else: - d['attachments'] = [{}] + attachment = _translate_attachment_detail_view(context, vol) + d['attachments'].append(attachment) d['displayName'] = vol['display_name'] d['displayDescription'] = vol['display_description'] |
