Hi,

The VirtualNumaNode[1] object has 'numa_node_pins' member, that is a list
of NumaNodePin[2].
Most of the members of NumaNodePin object are deprecated and not used.
The important one is 'index', which is the index of the host numa node to
which the
vm numa node is pinned. Here is the REST API documentation: [3].

A simple python example can be:


import ovirtsdk4 as sdk

conn = sdk.Connection("URL", "admin@internal", "PASSWORD")

host_node = conn.service("hosts/123/numanodes/456").get()

vm_node_service = conn.service("vms/789/numanodes/123")
vm_node = vm_node_service.get()

vm_node.numa_node_pins = [ sdk.types.NumaNodePin(index=host_node.index,
pinned=True) ]

vm_node_service.put(vm_node)


Andrej

[1] -
http://ovirt.github.io/ovirt-engine-sdk/master/types.m.html#ovirtsdk4.types.VirtualNumaNode
[2] -
http://ovirt.github.io/ovirt-engine-sdk/master/types.m.html#ovirtsdk4.types.NumaNodePin

[3] - http://ovirt.github.io/ovirt-engine-api-model/4.2/#types/numa_node_pin

On 25 January 2018 at 16:12, Don Dupuis <[email protected]> wrote:

> I am able to create a vm using the sdk with nic and disks using the python
> sdk, but having trouble understanding how to assign it to virtual numanode
> onto the physical numanode via python sdk. Any help in this area would be
> greatly appreciated
>
> Thanks
>
> Don
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ovirt.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to