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
_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to