api-ref: volume-create request sample is incorrect

Bug #2015767 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Triaged
Low
Unassigned

Bug Description

After change I0ece6e279048abcc04b3, including the "multiattach" request parameter in a volume-create request should return a 400 (Bad Request) response. The sample request in the api-ref, however, still contains this parameter.

The functional api-ref-samples tests have not caught this because they pass '"multiattach": false':

https://opendev.org/openstack/cinder/src/commit/42ef47ba26ab15c526afa7eec7f243bd1c97f770/cinder/tests/functional/api_sample_tests/samples/volumes/volume-create-request.json.tpl#L7

The test passes because the "multiattach" parameter was not removed from the request schema so that an informative error message could be returned. You can see that a False value of the parameter is silently ignored here:

https://opendev.org/openstack/cinder/src/commit/42ef47ba26ab15c526afa7eec7f243bd1c97f770/cinder/api/v3/volumes.py#L389-L396

The request sample should be corrected, however, because the proper way to request a multiattach volume is to use a volume-type that allows multiattach.

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.