[ovirt-users] Using REST API to get a proxyticket
Juan Hernández
jhernand at redhat.com
Fri Mar 25 09:11:51 UTC 2016
On 03/24/2016 07:17 PM, Ollie Armstrong wrote:
> Thanks.
>
> Unfortunately that still gives me the same NPE in the engine.log that
> I uploaded in my first email. I think I'll report this on BZ as it
> isn't working for me when it works for you.
>
This is the effect of the following bug:
sign websocket proxy ticket via RESTapi when VM have VNC graphics protocol
https://bugzilla.redhat.com/1305837
It should be fixed in version 3.6.5 of the engine.
To clarify how to use the action, you don't have to send anything, just
"<action/>", and it will return you the ticket. For example, using curl:
---8<---
#!/bin/sh -ex
url="https://engine.example.com/ovirt-engine/api"
user="admin at internal"
password="..."
vmid="..."
consoleid="..."
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--request POST \
--user "${user}:${password}" \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '
<action/>
' \
"${url}/vms/${vmid}/graphicsconsoles/${consoleid}/proxyticket"
--->8---
This will return a response like this:
<action>
<proxy_ticket>
<value>ey..A1==</value>
</proxy_ticket>
</action>
That long "value" is the Base64 encoded ticket.
> On 24 March 2016 at 18:11, Gonzalo Rafuls <gonza at redhat.com> wrote:
>> Apparently you can get it as well with something like
>> "<action><proxy_ticket></proxy_ticket></action>".
>>
>> Only thing to change then is between curly brackets {}.
--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
More information about the Users
mailing list