From 9e5a4babf82258641a082d03673cb5ca329c65d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Kr=C3=A4mer?= Date: Tue, 28 Oct 2014 16:05:31 +0100 Subject: [PATCH] Fix Instance Details error when using Cinder V2 If you're using cinder V2 API you will get an error for instance details view. The function 'instance_volumes_list' is called by the detail view of an instance and try to get from 'display_name'. Since Cinder v2 it's changed to 'name'. Change-Id: I20de0b8e6c263fc306e1475ddd40b4156e828bf1 Closes-Bug: #1386727 Related-Bug: #1226944 Co-Authored-By: Julie Pichon --- openstack_dashboard/api/nova.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openstack_dashboard/api/nova.py b/openstack_dashboard/api/nova.py index d2f16e8463..86ed40cef3 100644 --- a/openstack_dashboard/api/nova.py +++ b/openstack_dashboard/api/nova.py @@ -717,13 +717,13 @@ def instance_volume_detach(request, instance_id, att_id): def instance_volumes_list(request, instance_id): - from openstack_dashboard.api.cinder import cinderclient # noqa + from openstack_dashboard.api import cinder volumes = novaclient(request).volumes.get_server_volumes(instance_id) for volume in volumes: - volume_data = cinderclient(request).volumes.get(volume.id) - volume.name = volume_data.display_name + volume_data = cinder.cinderclient(request).volumes.get(volume.id) + volume.name = cinder.Volume(volume_data).name return volumes