Bug 1548496

Summary: Wrong error message when creating disks in API
Product: [oVirt] ovirt-engine Reporter: jniederm
Component: RestAPIAssignee: Ori Liel <oliel>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, lsvaty, mperina
Target Milestone: ovirt-4.2.3Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-10 06:27:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jniederm 2018-02-23 16:52:43 UTC
Description of problem:
Parameter validation of disk creation suggests "Disk [provisionedSize|size, format] required for add". However there doesn't seem to be any "size" attribute of "disk" entity according to both org.ovirt.engine.api.model.Disk and http://ovirt.github.io/ovirt-engine-api-model/master/#types/disk.

Version-Release number of selected component (if applicable):
current master, commit eb4619a16f

How reproducible:
100%

Steps to Reproduce:
1. Fire api request
    POST /ovirt-engine/api/disks/
    Filter: true
    Accept: application/json
    Content-Type: application/json

    {}


Actual results:
Response body:
{
    "detail": "Disk [provisionedSize|size, format] required for add",
    "reason": "Incomplete parameters"
}

Expected results:
The error message suggestion matches actually required attributes.

Additional info:
https://github.com/oVirt/ovirt-engine/search?utf8=%E2%9C%93&q=provisionedSize%7Csize&type=

Comment 1 Radim Hrazdil 2018-04-13 08:10:57 UTC
Verified that Response body reflects the model.

<fault>
    <detail>Disk [provisionedSize, format] required for add</detail>
    <reason>Incomplete parameters</reason>
</fault>

Version 4.3.0-0.0.master.20180411184915

Comment 2 Sandro Bonazzola 2018-05-10 06:27:34 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 release, it has been closed with a resolution of CURRENT RELEASE.

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