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 <[email protected]>, 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 <[email protected]> 
> wrote:
> >
> > Is there an API call in the Ovirt Python SDK to rename an existing virtual 
> > machine?
> > _______________________________________________
> > Users mailing list -- [email protected]
> > To unsubscribe send an email to [email protected]
> > 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/[email protected]/message/DTQKB7C7IBQFESZCWN5JQ3DIGYKC7IYG/
>
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]/message/MYAWHIR7IKXRNGX54Z6JL7WRG6F45ADK/

Reply via email to