Bug 853739 - [RFE] RESTAPI: On action api returns parameters in response body instead of actual action result
[RFE] RESTAPI: On action api returns parameters in response body instead of a...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Ravi Nori
Barak Dagan
: FutureFeature, Improvement
Depends On:
  Show dependency treegraph
Reported: 2012-09-02 10:44 EDT by Michael Pasternak
Modified: 2016-02-10 14:23 EST (History)
8 users (show)

See Also:
Fixed In Version: is3
Doc Type: Enhancement
Doc Text:
--no tech note required
Story Points: ---
Clone Of:
Last Closed: 2014-01-21 12:28:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 9466 None None None Never

  None (edit)
Description Michael Pasternak 2012-09-02 10:44:58 EDT
Description of problem:

On actions api returns parameters in response body instead of actual action result.

Steps to Reproduce:

do POST /api/vms/xxx/start

Actual results:


where <vm> is a parameters container supplied by user

Expected results:

<vm> is a new vm state after action initiation/completion
(depends on requested behaviour blocking/async) 

- inconsistent with rest of api operations
- has impact on QA tests which are assume response contains new resource state
Comment 1 Ori Liel 2012-11-26 08:46:48 EST
patch posted upstream: 
Comment 4 Barak Dagan 2013-09-17 09:30:54 EDT
Verified on is14:
do POST /api/vms/xxx/stop


<vm href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed" id="836ac1d8-88fa-4237-99e6-4f137788b2ed">
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/ticket" rel="ticket"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/cancelmigration" rel="cancelmigration"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/migrate" rel="migrate"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/shutdown" rel="shutdown"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/start" rel="start"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/stop" rel="stop"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/suspend" rel="suspend"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/detach" rel="detach"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/export" rel="export"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/move" rel="move"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/applications" rel="applications"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/disks" rel="disks"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/nics" rel="nics"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/cdroms" rel="cdroms"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/snapshots" rel="snapshots"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/tags" rel="tags"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/permissions" rel="permissions"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/statistics" rel="statistics"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/reporteddevices" rel="reporteddevices"/>
<link href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed/watchdogs" rel="watchdogs"/>
<state>complete</state>  <---


GET api/vms/xxx:
<vm href= "/api/vms/836ac1d8-88fa-4237-99e6-4f137788b2ed" id="836ac1d8-88fa-4237-99e6-4f137788b2ed">
<link href= "/api/vms/xxx/yyy" rel="yyy"/>
<state>down</state> <---

Does this solution answer the problem ? using status/state as both elementy state in query (get) and action state in action (post) ?
Comment 5 Ravi Nori 2013-10-31 09:14:11 EDT
Yes it does answer the problem. The result shows the status plus the links.
Comment 6 Barak Dagan 2013-10-31 10:50:54 EDT
Verified on is14:
Comment 7 Charlie 2013-11-27 19:13:05 EST
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:


Thanks in advance.
Comment 10 errata-xmlrpc 2014-01-21 12:28:26 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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


Note You need to log in before you can comment on or make changes to this bug.