Red Hat Bugzilla – Bug 1012378
Add <display> subtree of <vm> element to response to successful POST /api/vm/UUID/ticket requests
Last modified: 2014-01-12 20:46:42 EST
Description of problem:
when an REST API app wants to connect to VM console, it needs to:
1) collect running VMs --> GET /api/vms
2) set ticket on selected VM --> POST /api/vms/UUID/ticket
3) get the rest of connection details --> GET /api/vms/UUID
and just now it has all the required info to establish the connection.
* ticket action is almost always preceded or followed with /api/vms/VM request
* some subset of <vm> information is returned anyway
it would make sense to include <display> subtree in response body to /ticket request in order to save network roundtrips and HTTP/REST requests
Version-Release number of selected component (if applicable):
is16 / rhevm-restapi-3.3.0-0.22.master.el6ev.noarch
Steps to Reproduce:
1. issue POST request to /api/vms/VM_UUID/ticket
loads of uneeded links are returned but not connection details have to be retrieved in a separate request
all connection details are returned right away
while this request makes sense in terms of information consumption, it doesn't
make any in ROA (resource-oriented-architecture) service,
1. <display> meta is not a part of ticket "resource"
2. <display> content may (potentially) change between action execution and
actual connect attempt, therefore vm metadata should be always fetched via
-1 for concept.
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.