Closed Michael754267513 closed 6 years ago
Please open issues in Bugzilla - this is a read-only mirror of our Gerrit repository. Have you looked at the APIv4 examples?
@mykaul I can`t find about editCPU and edit memory in sdk4.x, and search keywords cpu or memory the results "sdk/examples/add_instance_type.py", this example is create Resource package, for example: the VM is running to edit memory and cpu。
If you look for here, it's example how to update datacenter:
The same way you go with VMs, but using vms_service.
vms_service = connection.system_service().vms_service()
vms = vms_service.list(search='name=myvm')[0]
vm_service = vms_service.vm_service(vm.id)
vm = vm_service.update(
types.Vm(
memory=32 * 2 **30,
),
)
TKS
ovirt3.x: update memory: vm.memory = 32 * 2 *30 vm.update() ovirt4.x: update memory: vm.memory = 32 2 **30 vm.update() # not found