summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Krämer <hkraemer@anynines.com>2014-10-28 16:05:31 +0100
committerZhu Zhu <bjzzu.zz@gmail.com>2014-11-19 06:13:49 +0000
commita2edb3d7100d903ae4846dbd0e197ad972dc458c (patch)
treee4654229f104dbb6a174f59e92c1d79b49ec35cf
parentf6bc82ace9151b181e23f94506e13ccdf3bec70a (diff)
downloadhorizon-a2edb3d7100d903ae4846dbd0e197ad972dc458c.tar.gz
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 <jpichon@redhat.com> (cherry picked from commit 9e5a4babf82258641a082d03673cb5ca329c65d1)
-rw-r--r--openstack_dashboard/api/nova.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack_dashboard/api/nova.py b/openstack_dashboard/api/nova.py
index f52472f54..312ac362a 100644
--- a/openstack_dashboard/api/nova.py
+++ b/openstack_dashboard/api/nova.py
@@ -711,13 +711,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