
This is a multi-part message in MIME format. --------------000406070305040405010107 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Dňa 21.04.2015 o 17:33 Dan Yasny napísal(a):
Why not just script them to migrate one after the other? The CLI is nice and simple, and the SDK is even nicer Well I gave it a try, but I'm quite new to python and this does not work as expected:
for vm in vms: print vm.name for disk in vm.disks.list( ): print " disk: " + disk.name sd = api.storagedomains.get('newstorage') disk.move(params.Disk(storage_domains=params.StorageDomains(storage_domain=[sd]))) status: 500 reason: Internal Server Error detail: HTTP Status 500 - Bad arguments passed to public abstract javax.ws.rs.core.Response org.ovirt.engine.api.resource.MovableResource.move(org.ovirt.engine.api.model.Action) ( org.ovirt.engine.api.model.Disk org.ovirt.engine.api.model.Disk@6a0db58b ) -- Ernest Beinrohr, AXON PRO Ing <http://www.beinrohr.sk/ing.php>, RHCE <http://www.beinrohr.sk/rhce.php>, RHCVA <http://www.beinrohr.sk/rhce.php>, LPIC <http://www.beinrohr.sk/lpic.php>, VCA <http://www.beinrohr.sk/vca.php>, +421-2-62410360 +421-903-482603 --------------000406070305040405010107 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div class="moz-cite-prefix">Dňa 21.04.2015 o 17:33 Dan Yasny napísal(a):<br> </div> <blockquote cite="mid:CALLXwb6s2S-mDdXFQ9aPbEYwT1SzFS_pG8r2wxS6djEQHnaHfA@mail.gmail.com" type="cite"> <div dir="ltr">Why not just script them to migrate one after the other? The CLI is nice and simple, and the SDK is even nicer</div> </blockquote> Well I gave it a try, but I'm quite new to python and this does not work as expected:<br> <br> for vm in vms:<br> print vm.name<br> for disk in vm.disks.list( ):<br> print " disk: " + disk.name<br> sd = api.storagedomains.get('newstorage')<br> disk.move(params.Disk(storage_domains=params.StorageDomains(storage_domain=[sd])))<br> <br> <br> status: 500<br> reason: Internal Server Error<br> detail: HTTP Status 500 - Bad arguments passed to public abstract javax.ws.rs.core.Response org.ovirt.engine.api.resource.MovableResource.move(org.ovirt.engine.api.model.Action) ( org.ovirt.engine.api.model.Disk org.ovirt.engine.api.model.Disk@6a0db58b )<br> <br> <div class="moz-signature">-- <br> <div id="oernii_footer" style="color: gray;"> <span style="font-family: Lucida Console, Luxi Mono, Courier, monospace; font-size: 90%;"> Ernest Beinrohr, AXON PRO<br> <a style="text-decoration: none; color: gray;" href="http://www.beinrohr.sk/ing.php">Ing</a>, <a style="text-decoration: none; color: gray;" href="http://www.beinrohr.sk/rhce.php">RHCE</a>, <a style="text-decoration: none; color: gray;" href="http://www.beinrohr.sk/rhce.php">RHCVA</a>, <a style="text-decoration: none; color: gray;" href="http://www.beinrohr.sk/lpic.php">LPIC</a>, <a style="text-decoration: none; color: gray;" href="http://www.beinrohr.sk/vca.php">VCA</a>, <br> +421-2-62410360 +421-903-482603 <br> </span> </div> <img src="http://nojsstats.appspot.com/UA-44497096-1/email.beinrohr.sk" moz-do-not-send="true" border="0" width="1" height="1"> </div> </body> </html> --------------000406070305040405010107--