discrepancy in snapshot_manage create API for 'ref' parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Neha Alhat |
Bug Description
Before merging patch[1] for snapshot_manage create API,
user was allowed to pass ref:”string” in the request body. But after this patch is merged, it returns 400 error.
A. When user passes "ref" as "string" in curl command before merging patch [1]:
curl -g -i -X POST http://
output:
HTTP/1.1 202 Accepted
Date: Mon, 15 Jan 2018 07:11:03 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Type: application/json
x-compute-
Content-Length: 261
x-openstack-
Connection: close
B. When user passes "ref" as "string" in curl command after merging patch [1]:
1. curl -g -i -X POST http://
HTTP/1.1 400 Bad Request
Date: Mon, 15 Jan 2018 08:38:10 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 134
Content-Type: application/json
x-compute-
x-openstack-
Connection: close
{"badRequest": {"message": "Invalid input for field/attribute ref. Value: test. 'test' is not of type 'object', 'null'", "code": 400}}
Expected output: To keep the same behavior before schema validation changes were merged [1].
ref parameter should accept value as string or object (object can be null).
Changed in cinder: | |
assignee: | nobody → Neha Alhat (nehaalhat) |
Fix proposed to branch: master /review. openstack. org/534075
Review: https:/