[ovirt-users] how to rename disk alias on python sdk

Amedeo Salvati amedeo at oscert.net
Thu Dec 11 10:29:07 UTC 2014


   Hello all,
   I want to rename a disk alias using python sdk, but I cannot find an update method for object returned from api.disks.get (like cdrom, vm, datacenter objects).
   Simplified code is:
   d1 = api.disks.get(id="7408f728-97e5-4b10-beb7-d9a70083797e")
   d1.get_alias()
   'FSBOVRHEL66TMP-1412_Disk1'   <-- OLD alias
   d1.set_alias('PIPPO_Disk1')
   d1.get_alias()
   'PIPPO_Disk1'                 <-- NEW alias
   but after that I cannot find a method like d1.update() to "commit" changes of disk object, what I miss?
   Best regards
   Amedeo Salvati
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20141211/3b4b29be/attachment-0001.html>


More information about the Users mailing list