Bug 1444191 - Provide Host/Cluster/Datacenter ids in console.vv file
Summary: Provide Host/Cluster/Datacenter ids in console.vv file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-20 19:27 UTC by Eduardo Lima (Etrunko)
Modified: 2017-07-13 08:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-12 06:45:00 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)
Write Host/Cluster/Datacenter ids to console.vv (2.52 KB, patch)
2017-04-20 19:27 UTC, Eduardo Lima (Etrunko)
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1427467 0 high CLOSED Foreign Menu - incorrect REST endpoint used to load the storagedomains 2021-02-22 00:41:40 UTC

Description Eduardo Lima (Etrunko) 2017-04-20 19:27:24 UTC
Created attachment 1273058 [details]
Write Host/Cluster/Datacenter ids to console.vv

Description of problem:

remote-viewer has the ability of changing the CD that is attached to the virtual machine without the need to access the webpage to do so. It does it by issuing some REST calls with the information provided by the console.vv file, which is downloaded by the browser.

Currently this file only contains information about the virtual machine, and to access the correct storage domain for the VM/Datacenter, we need a few REST calls to get to the correct object:

1) Fetch VM with id provided in console.vv, then read Cluser/Host ids
2) Fetch Host with id from VM, then read Cluster Id
3) Fetch Cluster with id from Host, then read Data Center Id
4) Fetch Storage Domains Ids from Data Center, with ISO type
5) Fetch files from Storage domains filtered 

This process could be eased and much faster if the console.vv file provided the ids for Host/Cluster/DataCenter of the VM. Actually we are most interested in the data center ID, and other information would be provided basically for the sake of completeness.

I have worked on a quick patch for writing the info to the console.vv file, but I was not sure about the proper place to set the values. Please take a look at the attached patch.

Another idea would be to include the DataCenter id in the VM xml description, but providing all the info in the console.vv file would save another REST call.

Comment 1 Michal Skrivanek 2017-06-30 06:48:47 UTC
We can certainly put anything in the vv file. Though there is another possibility - we're working on REST aggregation which would reduce the number of needed calls as well (bug 1463633). See more discussion in http://lists.ovirt.org/pipermail/devel/2017-March/029954.html

Comment 2 Tomas Jelinek 2017-07-12 06:45:00 UTC
Actually there is a lot of code already done and merged about link following and will land in 4.2. I think using the link following feature is the right approach, thus closing this item for now.

Please feel free to reopen if the link following approach will not work for you.

Comment 3 Eduardo Lima (Etrunko) 2017-07-12 14:41:00 UTC
(In reply to Tomas Jelinek from comment #2)
> Actually there is a lot of code already done and merged about link following
> and will land in 4.2. I think using the link following feature is the right
> approach, thus closing this item for now.

Can you explain how easy is it to go from a VM to a Datacenter resource with this new approach? Which REST calls should I submit?

Comment 4 Tomas Jelinek 2017-07-13 08:13:34 UTC
(In reply to Eduardo Lima (Etrunko) from comment #3)
> (In reply to Tomas Jelinek from comment #2)
> > Actually there is a lot of code already done and merged about link following
> > and will land in 4.2. I think using the link following feature is the right
> > approach, thus closing this item for now.
> 
> Can you explain how easy is it to go from a VM to a Datacenter resource with
> this new approach? Which REST calls should I submit?

the code is not yet merged so the api may change, but it should be as easy as:
GET: api/vms?follow=clusters.data_center
or something like that.


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