Cinder v2 - Show snapshot metadata has incorrect JSON response

Bug #1517417 reported by Jamie Hannaford
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Low
Diane Fleming

Bug Description

The operation for retrieving the metadata of a snapshot (GET /v2/​{tenant_id}​/snapshots/​{snapshot_id}​/metadata) has this JSON response in the documentation:

{
    "snapshot": {
        "status": "available",
        "os-extended-snapshot-attributes:progress": "0%",
        "description": null,
        "created_at": "2014-05-06T17:59:52.000000",
        "metadata": {
            "key": "v2"
        },
        "volume_id": "ebd80b99-bc3d-4154-9d28-5583baa80580",
        "os-extended-snapshot-attributes:project_id": "7e0105e19cd2466193729ef78b604f79",
        "size": 10,
        "id": "dfcd17fe-3b64-44ba-b95f-1c9c7109ef95",
        "name": "my-snapshot"
    }
}

which seems incorrect. I'd expect it to be:

{
    "metadata": {
        "key": "v2"
    }
}

Tags: cinder
Revision history for this message
Atsushi SAKAI (sakaia) wrote :
tags: added: cinder
Changed in openstack-api-site:
status: New → Confirmed
Revision history for this message
Diane Fleming (diane-fleming) wrote :

Confirmed that the response is:

{"snapshot": {"status": "available", "metadata": {"name": "test"}, "os-extended-snapshot-attributes:progress": "100%", "name": "test-volume-snapshot", "volume_id": "173f7b48-c4c1-4e70-9acc-086b39073506", "os-extended-snapshot-attributes:project_id": "bab7d5c60cd041a0a36f7c4b6e1dd978", "created_at": "2015-11-29T02:25:51.000000", "size": 1, "id": "b1323cda-8e4b-41c1-afc5-2fc791809c8c", "description": "volume snapshot"}}

which is slightly different from what's documented, so I've updated response to match actual response.

Changed in openstack-api-site:
assignee: nobody → Diane Fleming (diane-fleming)
milestone: none → mitaka
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/251068

Changed in openstack-api-site:
status: Confirmed → In Progress
Revision history for this message
Jamie Hannaford (jamie-hannaford) wrote :

That's not what I get with v2. If I hit this endpoint:

GET /snapshots/<snapshotId>/metadata

I get back:

{
    "metadata": {
        "key2": "val2"
    }
}

Revision history for this message
Diane Fleming (diane-fleming) wrote :

I'll try it again, Jamie!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/251068
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=149d53dcf19db06e5f5ac96dd4b9e97f7da72cd8
Submitter: Jenkins
Branch: master

commit 149d53dcf19db06e5f5ac96dd4b9e97f7da72cd8
Author: Diane Fleming <email address hidden>
Date: Sat Nov 28 20:36:22 2015 -0600

    Update response for show snapshot metadata

    Change-Id: I07cec6eb7ae3399571b4b74bb7b28a48e33d68d4
    Closes-Bug: #1517417

Changed in openstack-api-site:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.