Describe volume in OpenStack Block Storage API v1 Reference  - API v1 and extensions

Bug #1331246 reported by Sam Harwell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
High
Atsushi SAKAI

Bug Description

This page does not describe the contents of the JSON response. In particular, the following need to be addressed before the affected properties are of any use to developers.

1. The "status" property is shown in the XML response, but not the JSON response. If this is intentional, it should be explicitly stated. Otherwise, the examples should be updated to show the correct responses.
2. What is the purpose of the "snapshot_id" property? Is the value ever not null? If so, what form can the value take when it's not null?
3. What is the "attachments" property? Is the value ever anything other than an empty array? If so, what form(s) can the value take when it's not an empty array? What is the form of the elements of the array?

-----------------------------------
Built: 2014-05-27T13:54:26 00:00
git SHA: 9c172cf523eb26ec74e6ee82df912de0bca1bfc5
URL: http://docs.openstack.org/api/openstack-block-storage/1.0/content/GET_getVolume__v1__tenant_id__volumes__volume_id__Volumes.html
source File: file:/home/jenkins/workspace/volume-api-tox-doc-publishdocs/v1/bk_blockstorage_api_ref_v1.xml
xml:id: GET_getVolume__v1__tenant_id__volumes__volume_id__Volumes

Tags: cinder
affects: openstack-manuals → openstack-api-site
Anne Gentle (annegentle)
Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → High
milestone: none → juno
lizheming (lizheming-li)
Changed in openstack-api-site:
assignee: nobody → lizheming (lizheming-li)
Revision history for this message
Anne Gentle (annegentle) wrote :

This repo is frozen and moving to the openstack-attic. So this exact page won't be updated. But double-checking the API reference:

1. The "status" property is shown in the XML response, but not the JSON response. If this is intentional, it should be explicitly stated. Otherwise, the examples should be updated to show the correct responses.
This should be fixed in http://developer.openstack.org/api-ref-blockstorage-v1.html#volumes-v1 by removing status in the XML example.

2. What is the purpose of the "snapshot_id" property? Is the value ever not null? If so, what form can the value take when it's not null?
Not sure.

3. What is the "attachments" property? Is the value ever anything other than an empty array? If so, what form(s) can the value take when it's not an empty array? What is the form of the elements of the array?
Not sure.

Seems this bug can be partially fixed, but needs answers about snapshot_id and attachments from a cinder developer.

Changed in openstack-api-site:
status: Confirmed → Incomplete
Revision history for this message
lizheming (lizheming-li) wrote :

thanks Anne!

Changed in openstack-api-site:
assignee: lizheming (lizheming-li) → nobody
Tom Fifield (fifieldt)
Changed in openstack-api-site:
milestone: juno → kilo
Tom Fifield (fifieldt)
Changed in openstack-api-site:
milestone: kilo → liberty
Atsushi SAKAI (sakaia)
Changed in openstack-api-site:
assignee: nobody → Atsushi SAKAI (sakaia)
Atsushi SAKAI (sakaia)
tags: added: cinder
Revision history for this message
Atsushi SAKAI (sakaia) wrote :

As for #1's 1
JSON sample should be updated.

JSON/XML switching is Request "Attach:"
  http://specs.openstack.org/openstack/cinder-specs/specs/api/v2/request_and_response_types.html
Server treats in attach flag in wsgi
  https://github.com/openstack/cinder/blob/stable/kilo/cinder/api/openstack/wsgi.py#L981
So response item list must be equal.

Revision history for this message
Atsushi SAKAI (sakaia) wrote :

As for #1's 3
From discussion context, it should described as multi-attach status (may be 2-items?) not non-attach status (null).

Ref.
 Cinder/blueprints/multi-attach-volume
  https://wiki.openstack.org/wiki/Cinder/blueprints/multi-attach-volume
 Add volume multi attach support
  https://github.com/openstack/cinder/commit/10d54216871fde27172fbcb1a3c9bfec59b824c2

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/221649

Changed in openstack-api-site:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/221649
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=85481b20124f1e83c0346fcd06bd7b4318c59371
Submitter: Jenkins
Branch: master

commit 85481b20124f1e83c0346fcd06bd7b4318c59371
Author: Atsushi SAKAI <email address hidden>
Date: Wed Sep 9 16:05:40 2015 +0900

    Add volume attributes description for Block Storage API

    For v1
      #1: Add status attribute for JSON sample
      #2: Fix snapshot_id, source_volid description for response side.
      #3: Add attachments non-null sample

    For v2
      Add volume info response attributes

    Change-Id: Iebe1eb2f12550d0e66bb594468ce6b28c9d3c756
    Closes-Bug: #1331246

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.