<div dir="ltr">I'm sorry about bothering you again, but after trying it some times I'm still getting a "500 Internal Server Error". I'm using a REST client instead of CURL and I tried adding a "Version: 3" to headers and used the URL with the v3 as well.<div><br></div><div>I'm issuing a PUT of </div><div><br></div><div><disk><alias>Alias_for_disk</alias></disk></div><div><br></div><div>To the URL<br><div><br></div><div><a href="https://myserver/ovirt-engine/api/v3/vms/62498f51-0203-48b9-83c8-4c6f3bdfe05c/disks/583ed952-46a8-4bc5-8a27-8660e4a24ea2">https://myserver/ovirt-engine/api/v3/vms/62498f51-0203-48b9-83c8-4c6f3bdfe05c/disks/583ed952-46a8-4bc5-8a27-8660e4a24ea2</a><br></div><div><br></div><div>I mean, I can live without it but we are using oVirt as a "static virtualization" environment and is quite useful for us being able to recognize easily each disk by its server name. In case I have to wait until the 4.2 API version to automatize this I'll do :(</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 11:18 AM, Bruno Rodriguez <span dir="ltr"><<a href="mailto:bruno@pic.es" target="_blank">bruno@pic.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you very much !!!<div><br></div><div>I expected I was missing something like that. Thanks again!</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 11:12 AM, Juan Hernández <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 06/28/2017 10:43 AM, Bruno Rodriguez wrote:<br>
> Thank you, Daniel<br>
><br>
> I tried a PUT with the same XML body, I got a "405 Method Not Allowed".<br>
> It's quite strange, there must be someting I'm missing<br>
><br>
<br>
</span>The operation to update a disk will be introduced in version 4 of the<br>
API with version 4.2 of the engine. Meanwhile the way to update the disk<br>
is to use version 3 of the API and the disks sub-collection of the<br>
virtual machine. That means that if you have a VM with id 123 and a disk<br>
with id 456 you can send a request like this:<br>
<br>
PUT /ovirt-engine/api/v3/vms/123/d<wbr>isks/456<br>
<br>
With a request body like this:<br>
<br>
<disk><br>
<alias>newalias</alias><br>
</disk><br>
<br>
Note that you can use the above "v3" prefix in the URL or else the<br>
"Version: 3" header. A complete example using curl:<br>
<br>
---8<---<br>
#!/bin/bash -ex<br>
<br>
url="https://.../ovirt-engine/<wbr>api"<br>
user="admin@internal"<br>
password="..."<br>
vm_id="..."<br>
disk_id="..."<br>
<br>
curl \<br>
--verbose \<br>
--cacert "ca.pem" \<br>
--header "Version: 3" \<br>
--header "Content-Type: application/xml" \<br>
--user "${user}:${password}" \<br>
--request PUT \<br>
--data "<br>
<disk><br>
<alias>newalias</alias><br>
</disk><br>
" \<br>
"${url}/vms/${vm_id}/disks/${d<wbr>isk_id}"<br>
--->8---<br>
<span><br>
><br>
> On Wed, Jun 28, 2017 at 10:07 AM, Daniel Erez <<a href="mailto:derez@redhat.com" target="_blank">derez@redhat.com</a><br>
</span><span>> <mailto:<a href="mailto:derez@redhat.com" target="_blank">derez@redhat.com</a>>> wrote:<br>
><br>
> Hi,<br>
><br>
> Updating is done using the PUT method.<br>
> Please try that with the same XML body.<br>
><br>
> Thanks,<br>
> Daniel<br>
><br>
> On Wed, Jun 28, 2017 at 10:26 AM Bruno Rodriguez <<a href="mailto:bruno@pic.es" target="_blank">bruno@pic.es</a><br>
</span><span>> <mailto:<a href="mailto:bruno@pic.es" target="_blank">bruno@pic.es</a>>> wrote:<br>
><br>
> Hello everyone,<br>
><br>
> I'm having some problems about renaming some disks (setting a<br>
> different alias, name or description) for VMs disks created from<br>
> a template. When I get this URL<br>
><br>
> <a href="https://ovirt-manager/ovirt-engine/api/disks/0123" rel="noreferrer" target="_blank">https://ovirt-manager/ovirt-e<wbr>ngine/api/disks/0123</a><br>
> <<a href="https://ovirt-manager/ovirt-engine/api/disks/0123" rel="noreferrer" target="_blank">https://ovirt-manager/ovirt-<wbr>engine/api/disks/0123</a>><br>
><br>
> I can see are the methods sparsify, export, move and copy. I<br>
> tried to POST the following XML to the previous URL with no<br>
> result (as expected, it won't work)<br>
><br>
> <disk><br>
> <alias>my_machine_Disk1</alia<wbr>s><br>
> </disk><br>
><br>
> I'm quite sure I'm thinking about it in a wrong way (as usual).<br>
> Any help would be welcome...<br>
><br>
> Thank you in advance<br>
><br>
> --<br>
> Bruno Rodríguez Rodríguez<br>
><br>
</span>> *Port d'Informació Científica (PIC)*<br>
><br>
> _____________________________<wbr>__________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a>><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailma<wbr>n/listinfo/users</a><br>
<span>> <<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailm<wbr>an/listinfo/users</a>><br>
><br>
><br>
><br>
><br>
> --<br>
> Bruno Rodríguez Rodríguez<br>
><br>
</span>> *Port d'Informació Científica (PIC)*<br>
<span class="m_-7056624300260170321im m_-7056624300260170321HOEnZb">> Campus UAB - Edificio D,<br>
> C / Albareda, s / n<br>
> 08193-Bellaterra (Barcelona), España<br>
> Telf. <a href="tel:%2B34%2093%20170%2027%2030" value="+34931702730" target="_blank">+34 93 170 27 30</a><br>
> GPS coordenadas: 41.500850 2.110628<br>
><br>
> "Si algo me ha enseñado el tetris, es que los errores se acumulan y los<br>
> triunfos desaparecen"<br>
><br>
><br>
</span><div class="m_-7056624300260170321HOEnZb"><div class="m_-7056624300260170321h5">> ______________________________<wbr>_________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br></font></span><div class="m_-7056624300260170321gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span class="HOEnZb"><font color="#888888"><div style="text-align:left;font-family:Arial,Tahoma,Helvetica,FreeSans,sans-serif;line-height:20px;background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;line-height:normal">Bruno Rodríguez Rodríguez</span></div></font></span><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br><div dir="ltr" style="color:rgb(34,34,34);font-size:12.8px"><span class=""><font color="#444444"><b>Port d'Informació Científica (PIC)</b></font> <br></span><span class="">Campus UAB - Edificio D,</span></div><span class=""><div dir="ltr" style="color:rgb(34,34,34);font-size:12.8px">C / <span>Albareda</span>, s / n <br>08193-Bellaterra (Barcelona), España</div><div style="color:rgb(34,34,34);font-size:12.8px"><a value="+34935813322" style="color:rgb(17,85,204);font-size:13px">Telf. +34 93 170 27 30</a><br></div><div dir="ltr" style="color:rgb(34,34,34);font-size:12.8px"><font color="#0000ff">GPS </font> coordenadas: <span style="font-size:12.8px">41.500850 2.110628</span></div></span></div><span class=""><div><a value="+34935813322" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></a></div><div><a value="+34935813322" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:Arial,Tahoma,Helvetica,FreeSans,sans-serif;font-size:small;line-height:20px">"Si algo me ha enseñado el tetris, es que los errores se acumulan y los triunfos desaparecen"</span></a></div></span></div></div></div></div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="text-align:left;font-family:Arial,Tahoma,Helvetica,FreeSans,sans-serif;line-height:20px;background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;line-height:normal">Bruno Rodríguez Rodríguez</span></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br><div dir="ltr" style="color:rgb(34,34,34);font-size:12.8px"><font color="#444444"><b>Port d'Informació Científica (PIC)</b></font> <br>Campus UAB - Edificio D,</div><div dir="ltr" style="color:rgb(34,34,34);font-size:12.8px">C / <span>Albareda</span>, s / n <br>08193-Bellaterra (Barcelona), España</div><div style="color:rgb(34,34,34);font-size:12.8px"><a value="+34935813322" style="color:rgb(17,85,204);font-size:13px">Telf. +34 93 170 27 30</a><br></div><div dir="ltr" style="color:rgb(34,34,34);font-size:12.8px"><font color="#0000ff">GPS </font> coordenadas: <span style="font-size:12.8px">41.500850 2.110628</span></div></div><div><a value="+34935813322" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></a></div><div><a value="+34935813322" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:Arial,Tahoma,Helvetica,FreeSans,sans-serif;font-size:small;line-height:20px">"Si algo me ha enseñado el tetris, es que los errores se acumulan y los triunfos desaparecen"</span></a></div></div></div></div></div></div></div>
</div>