Yes. It’s actually straightforward:

def rename(self, name: str):
  r = self.service.update(types.Vm(name=name))
  assert r.name == name

self.service is the instance of VmService corresponding to the VM

Thank you


On Mar 18, 2021, 5:24 AM -0400, Benny Zlotnik <bzlotnik@redhat.com>, wrote:
Probably with the update method, like in the DC example[1], it
shouldn't be hard to translate this to a VM


[1] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/update_data_center.py#L52

On Thu, Mar 18, 2021 at 11:15 AM Gerard Weatherby <gerardw@alum.mit.edu> wrote:

Is there an API call in the Ovirt Python SDK to rename an existing virtual machine?
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/DTQKB7C7IBQFESZCWN5JQ3DIGYKC7IYG/