Bug 1873660

Summary: Not possible to update disk quota via API
Product: [oVirt] ovirt-engine Reporter: tmeyer <trvrmeyer>
Component: RestAPIAssignee: Ori Liel <oliel>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.10.4CC: bugs, mperina
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-14 13:56:32 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 tmeyer 2020-08-28 22:44:05 UTC
Description of problem:
I have been unable to use this to update a disk quota. The quota attribute is located in /disks, not /disk_attachments.

Example:
curl -v -u "user@server:password" -H "Content-type: application/xml" -data "<disk_attachment><quota id='ccc'/></disk_attachment>" 'https://serverName/ovirt-engine/api/vms/xxx/diskattachments/bbb'

This returns invalid while attempting to update the disk directly:
curl -v -u "user@server:password" -H "Content-type: application/xml" -data "<diskt><quota id='ccc'/></disk>" 'https://serverName/ovirt-engine/api/disks/xxx'

returns the error message:
"<fault>
    <detail>Updating disk attributes other than QCOW version is permitted only for disk-attachments, which reside under VMs.</detail>
    <reason>Operation Failed</reason>
</fault>"

Is disk quota updating via the API no longer supported?

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Use curl or some sdk package (like python) to update disk quota via API

Actual results:
Error message or operation failed.

Expected results:
Disk quota updated on a valid, powered-down VM.

Additional info:

Comment 1 RHEL Program Management 2020-09-03 06:34:47 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 2 Ori Liel 2020-09-14 13:50:12 UTC
Fixed by https://gerrit.ovirt.org/#/c/103271/

Comment 3 Martin Perina 2020-09-14 13:56:32 UTC

*** This bug has been marked as a duplicate of bug 1080097 ***