<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class="">Le 5 juin 2016 à 13:22, Michal Skrivanek <<a href="mailto:michal.skrivanek@redhat.com" class="">michal.skrivanek@redhat.com</a>> a écrit :<br class=""><br class=""><br class="">On 05 Jun 2016, at 12:37, <a href="mailto:nicolas@devels.es" class="">nicolas@devels.es</a> wrote:<br class=""><br class="">Hi,<br class=""><br class="">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=""><br class="">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=""><br class="">Yes, you can either get either only the password/ticket or the whole vv file, which was introduced by <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1128763" class="">https://bugzilla.redhat.com/show_bug.cgi?id=1128763</a><br class=""><br class="">But this call is missing from the python SDK 3.6.5.2.<br class=""><br class="">In the example, I see :<br class="">curl -k -u admin@internal:1 ... -H "Accept: application/x-virt-viewer"<br class=""><br class="">But in ovirtsdk/infrastructure/connectionspool.py, line 106, I see:<br class=""><br class=""> header_lines.append("Accept: application/xml")<br class=""><br class="">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=""><br class=""><font face="Menlo" style="font-size: 11px;" class=""><link href="/api/vms/{vm:id}/graphicsconsoles/{graphicsconsole:id}" rel="get"><br class=""> <description>Get active graphics console of a VM.</description><br class=""> <request><br class=""> <http_method>GET</http_method><br class=""> <headers><br class=""> <header required="false"><br class=""> <name>Content-Type</name><br class=""> <value>application/xml|json|x-virt-viewer</value><br class=""> </header><br class=""> </headers><br class=""> <url><br class=""> <parameters_set><br class=""> <parameter required="false" type="xs:boolean" context="matrix"><br class=""> <name>current</name><br class=""> <value>true|false</value><br class=""> </parameter><br class=""> </parameters_set><br class=""> </url><br class=""> <body/><br class=""> </request><br class=""> <response><br class=""> <type>GraphicsConsole</type><br class=""> </response><br class=""></link></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><br class=""></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><br class=""></font><br class=""><br class=""></div></body></html>