Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 975730

Summary: [RFE] pass session id to spice via mime type to allow spice Menu Using REST
Product: [oVirt] ovirt-engine Reporter: Tomas Jelinek <tjelinek>
Component: RestAPIAssignee: Martin Betak <mbetak>
Status: CLOSED CURRENTRELEASE QA Contact: Shira Maximov <mshira>
Severity: low Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, cfergeau, gklein, iheim, jbelka, juan.hernandez, mbetak, michal.skrivanek, rbalakri, sbonazzo, srevivo, tjelinek
Target Milestone: ovirt-3.6.0-rcKeywords: FutureFeature
Target Release: 3.6.0Flags: rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764 Doc Type: Enhancement
Doc Text:
Feature: pass session id to spice via mime type to allow spice Menu Using REST Reason: Result (if any):
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-23 09:02:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1285883    
Bug Blocks: 1092744, 1200067    

Description Tomas Jelinek 2013-06-19 08:42:25 UTC
Provide a REST API on oVirt side which would be used by SPICE client to enrich the client by foreign menu and also to call the oVirt engine if some menu item is selected.

For details please see the feature page: http://www.ovirt.org/Features/Foreign_Menu_Using_REST

Comment 1 Itamar Heim 2013-06-20 06:09:45 UTC
I don't think the REST API should be spice specific.
I expect the client to support this, or if not possible, a lesser evil of a helper servlet at engine side to bridge between the two.
the reason i think client should have this is it will make compatibility easier.
if this is server side, client will need to pass a version, and server should only return items handled by the relevant version.
version should be a 'menu version', not spice client version.
if client side, client would only ask for things its supports to begin with.

Comment 2 Tomas Jelinek 2013-06-20 06:52:15 UTC
"used by SPICE" was not a good idea to say - the menu is generic and can be used by any client.

I don't think the client should be responsible for asking for the specific things - it would be very inflexible to add / remove / change actions. And also, this is logically oVirt side to say what does he want the client to be allowed to use and how.

The current proposal is completly generic - it only enumerates the specific items and say how to call the engine back if the item is selected. The client implementation only needs to understand the structure and we can provide whatever we want to it. There should be nothing like "this client does not support stopping of the VM using menu" because the client just visualizes the XML we sent it in a way he wants and performs exactly the call we described in the XML when selected. The client does not really know what actions does he support, he just understands this XML.

Comment 3 Tomas Jelinek 2013-06-27 10:13:02 UTC
OK, it has been decided that the menu will be created by clients and there will be no support for this on the REST side (e.g. the client decides what to add to its menu).

So the requirements for this RFE has been changed - the new ones:
once the SPICE side will be implemented, add the following parameters to the .vv files:
- sessionId -> the active session ID to authenticate with the REST (same way as 
               UiPlugins work)
- vmGuid -> the guid of the VM the spice is connected to

Comment 4 Sandro Bonazzola 2013-11-19 08:12:12 UTC
Target version?

Comment 5 Itamar Heim 2014-02-13 18:31:13 UTC
pushing to target release 3.5, assuming its not planned for 3.4 at this point...

Comment 6 Michal Skrivanek 2014-05-19 09:53:58 UTC
pushing to 3.6 due to the dependent bug

Comment 7 Michal Skrivanek 2014-05-19 09:53:58 UTC
pushing to 3.6 due to the dependent bug

Comment 8 Frantisek Kobzik 2014-09-02 12:50:58 UTC
*** Bug 1134787 has been marked as a duplicate of this bug. ***

Comment 9 Michal Skrivanek 2015-04-09 07:18:14 UTC
further changes will be needed once AAA work in 3.6 is finished and virt-viewer support for the new authentication is added. But for now it works

Christophe, would you please add the virt-viewer version with working support for foreign menu?

Comment 10 Christophe Fergeau 2015-04-09 09:42:37 UTC
(In reply to Michal Skrivanek from comment #9)
> Christophe, would you please add the virt-viewer version with working
> support for foreign menu?

virt-viewer-2.0-1.el6 or newer and virt-viewer-0.6.0-12.el7 should have working support for foreign menu including jsessionid authentication. One bit which is missing is .vv file support to indicate whether the VM is from the admin or user portal. The aforementioned builds only support VMs from the user portal. Admin support is rhbz#1210248

Comment 11 Jiri Belka 2015-06-18 11:32:24 UTC
Unlinking BZ907506, it had nothing to do with SPICE client.

Comment 12 Shira Maximov 2016-02-22 13:03:55 UTC
verified on:   
Red Hat Enterprise Virtualization Manager Version: 3.6.3.2-0.1.el6 

link to polarion test plan:
https://polarion.engineering.redhat.com/polarion/#/project/RHEVM3/workitem?id=RHEVM3-14675&revision=498167