<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"><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 class="">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/<wbr>disks/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/${<wbr>disk_id}"<br>
--->8---<br>
<span class=""><br>
><br>
> On Wed, Jun 28, 2017 at 10:07 AM, Daniel Erez <<a href="mailto:derez@redhat.com">derez@redhat.com</a><br>
</span><span class="">> <mailto:<a href="mailto:derez@redhat.com">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">bruno@pic.es</a><br>
</span><span class="">> <mailto:<a href="mailto:bruno@pic.es">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-<wbr>engine/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</<wbr>alias><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">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
<span class="">> <<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/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="im HOEnZb">> 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">+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="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
><br>
<br>
</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>