Bug 1317742

Summary: Need to include 'metadata' in Cinder's VolumeSnapshot object in Horizon API
Product: Red Hat OpenStack Reporter: Vivek Agrawal <vivek.agrawal>
Component: python-django-horizonAssignee: Beth White <beth.white>
Status: CLOSED ERRATA QA Contact: Ido Ovadia <iovadia>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aortega, athomas, beth.white, jschluet, lruzicka, mrunge, rdopiera, srevivo, vivek.agrawal
Target Milestone: ---Keywords: ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-django-horizon-8.0.1-9.el7ost Doc Type: Bug Fix
Doc Text:
Previously, the VolumeSnapshot object in the "cinder.py" script did not handle the metadata of snapshots. Consequently, the Volume Snapshot metadata could not be viewed in the horizon UI. The problem has been fixed and now the metadata can be viewed in horizon.
Story Points: ---
Clone Of:
: 1406350 (view as bug list) Environment:
Last Closed: 2017-03-08 18:15:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1406350    
Attachments:
Description Flags
volume snapshot - missing metadata none

Description Vivek Agrawal 2016-03-15 03:53:08 UTC
Description of problem:
The VolumeSnapshot object in 'horizon/openstack_dashboard/api/cinder.py'. This object is accessed by multiple views in Horizon. The object does not have metadata populated for the snapshot.

Version-Release number of selected component (if applicable): 


How reproducible: Try accessing the Metadata of Volume's snapshot object from horizon UI. It is not accessible because it is not initiated.


Steps to Reproduce:
1. Go to any page with VolumeSnapshot object. E.g. Snapshot listing page or Snapshot details page
2. Try accessing a Metadata from VolumeSnapshot. This is not accessible
3.

Actual results: -


Expected results: -


Additional info: -

Comment 2 Matthias Runge 2016-03-15 14:10:21 UTC
Which version are you using? Which URL are you trying? Are you working as admin?

Comment 3 Vivek Agrawal 2016-03-15 18:15:48 UTC
I am trying it on OSP8 beta. I have tried this with OSP4 which is parallel to Havana release of Openstack and this was part of that. But this behavior is also absent in OpenStack after Havana. 
I am trying to access snapshot object from pages like snapshot listing or launch instance(which lists snapshots) where I would like to access some custom metadata which has been stored. But now it becomes un-accessible so I have opened this bug.

Comment 4 Vivek Agrawal 2016-03-31 18:23:01 UTC
The review on Openstack Horizon has got a +2. Now the fix can be readily pulled.

Comment 10 Ido Ovadia 2017-01-12 14:55:25 UTC
Failed QA
=========

rpm -qa | grep horizon
python-django-horizon-8.0.1-9.el7ost.noarch


cinder snapshot-show 767b950d-8a1b-443e-8abc-0f631a9484d9
+--------------------------------------------+-------------------------------------------+
|                  Property                  |                   Value                   |
+--------------------------------------------+-------------------------------------------+
|                 created_at                 |         2017-01-12T09:31:45.000000        |
|                description                 |           Snapshot metadata test          |
|                     id                     |    767b950d-8a1b-443e-8abc-0f631a9484d9   |
|                  metadata                  | {u'Project': u'Admin', u'user': u'Admin'} |
|                    name                    |             vol-test-snaoshot             |
|  os-extended-snapshot-attributes:progress  |                    100%                   |
| os-extended-snapshot-attributes:project_id |      c677f0db2ffd4b38920b82781b556cb3     |
|                    size                    |                     1                     |
|                   status                   |                 available                 |
|                 volume_id                  |    1c41a79b-d19f-48c2-909f-167e9ee65d32   |
+--------------------------------------------+-------------------------------------------+

But cant see snapshots metadata on Horizon. Screenshot is enclosed.

Comment 11 Ido Ovadia 2017-01-12 14:59:36 UTC
Created attachment 1239983 [details]
volume snapshot - missing metadata

Comment 16 Radomir Dopieralski 2017-03-02 12:19:55 UTC
I can see snapshot metadata in the UI now.

Comment 18 errata-xmlrpc 2017-03-08 18:15:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0469.html