
--Apple-Mail=_73D9EDFA-DFE7-4D96-85B3-7FCF4B9824F0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Le 5 juin 2016 =C3=A0 13:22, Michal Skrivanek = <michal.skrivanek@redhat.com> a =C3=A9crit : On 05 Jun 2016, at 12:37, nicolas@devels.es wrote: Hi, On user portal, when users click on the "Connect" link of a VM that is = configured to be run with "Native client" and SPICE protocol, a .vv file = is generated with the connection parameters so the SPICE client knows = where to connect: host, port, password, ... Currently, is there a way to generate those parameters with the Python = SDK? Especially the session password so it's possible to connect to the = VM directly with a SPICE client. Yes, you can either get either only the password/ticket or the whole vv = file, which was introduced by = https://bugzilla.redhat.com/show_bug.cgi?id=3D1128763 But this call is missing from the python SDK 3.6.5.2. In the example, I see : curl -k -u admin@internal:1 ... -H "Accept: application/x-virt-viewer" But in ovirtsdk/infrastructure/connectionspool.py, line 106, I see: header_lines.append("Accept: application/xml") The Accept parameter is hard coded, the python SDK doesn't not allow to = get the vv file, because that's the only settings that make a difference = betwen getting the object and getting the vv file, as it's indicated in = the rsdl : <link href=3D"/api/vms/{vm:id}/graphicsconsoles/{graphicsconsole:id}" = rel=3D"get"> <description>Get active graphics console of a VM.</description> <request> <http_method>GET</http_method> <headers> <header required=3D"false"> <name>Content-Type</name> <value>application/xml|json|x-virt-viewer</value> </header> </headers> <url> <parameters_set> <parameter required=3D"false" type=3D"xs:boolean" = context=3D"matrix"> <name>current</name> <value>true|false</value> </parameter> </parameters_set> </url> <body/> </request> <response> <type>GraphicsConsole</type> </response> </link> --Apple-Mail=_73D9EDFA-DFE7-4D96-85B3-7FCF4B9824F0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D""><br class=3D"">Le 5 = juin 2016 =C3=A0 13:22, Michal Skrivanek <<a = href=3D"mailto:michal.skrivanek@redhat.com" = class=3D"">michal.skrivanek@redhat.com</a>> a =C3=A9crit :<br = class=3D""><br class=3D""><br class=3D"">On 05 Jun 2016, at 12:37, <a = href=3D"mailto:nicolas@devels.es" class=3D"">nicolas@devels.es</a> = wrote:<br class=3D""><br class=3D"">Hi,<br class=3D""><br class=3D"">On = user portal, when users click on the "Connect" link of a VM that is = configured to be run with "Native client" and SPICE protocol, a .vv file = is generated with the connection parameters so the SPICE client = knows where to connect: host, port, password, ...<br class=3D""><br = class=3D"">Currently, is there a way to generate those parameters with = the Python SDK? Especially the session password so it's possible to = connect to the VM directly with a SPICE client.<br class=3D""><br = class=3D"">Yes, you can either get either only the password/ticket or = the whole vv file, which was introduced by <a = href=3D"https://bugzilla.redhat.com/show_bug.cgi?id=3D1128763" = class=3D"">https://bugzilla.redhat.com/show_bug.cgi?id=3D1128763</a><br = class=3D""><br class=3D"">But this call is missing from the python SDK = 3.6.5.2.<br class=3D""><br class=3D"">In the example, I see :<br = class=3D"">curl -k -u admin@internal:1 ... -H "Accept: = application/x-virt-viewer"<br class=3D""><br class=3D"">But in = ovirtsdk/infrastructure/connectionspool.py, line 106, I see:<br = class=3D""><br class=3D""> header_lines.append("Accept: = application/xml")<br class=3D""><br class=3D"">The Accept parameter is = hard coded, the python SDK doesn't not allow to get the vv file, because = that's the only settings that make a difference betwen getting the = object and getting the vv file, as it's indicated in the rsdl :<div = class=3D""><br class=3D""><font face=3D"Menlo" style=3D"font-size: = 11px;" class=3D""><link = href=3D"/api/vms/{vm:id}/graphicsconsoles/{graphicsconsole:id}" = rel=3D"get"><br class=3D""> <description>Get = active graphics console of a VM.</description><br class=3D""> = <request><br class=3D""> = <http_method>GET</http_method><br class=3D""> = <headers><br class=3D""> = <header required=3D"false"><br class=3D""> = = <name>Content-Type</name><br class=3D""> = = <value>application/xml|json|x-virt-viewer</value><br = class=3D""> </header><br = class=3D""> </headers><br = class=3D""> <url><br class=3D""> = <parameters_set><br = class=3D""> = <parameter required=3D"false" type=3D"xs:boolean" = context=3D"matrix"><br class=3D""> = <name>current</name><br = class=3D""> = <value>true|false</value><br class=3D""> = </parameter><br = class=3D""> = </parameters_set><br class=3D""> = </url><br class=3D""> <body/><br = class=3D""> </request><br class=3D""> = <response><br class=3D""> = <type>GraphicsConsole</type><br class=3D""> = </response><br class=3D""></link></font></div><div = class=3D""><font face=3D"Menlo" style=3D"font-size: 11px;" class=3D""><br = class=3D""></font></div><div class=3D""><font face=3D"Menlo" = style=3D"font-size: 11px;" class=3D""><br class=3D""></font><br = class=3D""><br class=3D""></div></body></html>= --Apple-Mail=_73D9EDFA-DFE7-4D96-85B3-7FCF4B9824F0--