<div dir="ltr">Thanks Andrej. I will use this information and see how far I get.<div><br></div><div>Don</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 25, 2018 at 10:39 AM, Andrej Krejcir <span dir="ltr"><<a href="mailto:akrejcir@redhat.com" target="_blank">akrejcir@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Hi,</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">The VirtualNumaNode[1] object has 'numa_node_pins' member, that is a list of NumaNodePin[2].</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Most of the members of NumaNodePin object are deprecated and not used.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">The important one is 'index', which is the index of the host numa node to which the</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">vm numa node is pinned. Here is the REST API documentation: [3].</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">A simple python example can be:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">import ovirtsdk4 as sdk</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">conn = sdk.Connection("URL", "admin@internal", "PASSWORD")</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">host_node = conn.service("hosts/123/<wbr>numanodes/456").get()</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">vm_node_service = conn.service("vms/789/<wbr>numanodes/123")</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">vm_node = vm_node_service.get()</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">vm_node.numa_node_pins = [ sdk.types.NumaNodePin(index=<wbr>host_node.index, pinned=True) ]</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">vm_node_service.put(vm_node)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Andrej</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">[1] - <a href="http://ovirt.github.io/ovirt-engine-sdk/master/types.m.html#ovirtsdk4.types.VirtualNumaNode" target="_blank">http://ovirt.github.io/ovirt-<wbr>engine-sdk/master/types.m.<wbr>html#ovirtsdk4.types.<wbr>VirtualNumaNode</a></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">[2] - <a href="http://ovirt.github.io/ovirt-engine-sdk/master/types.m.html#ovirtsdk4.types.NumaNodePin" target="_blank">http://ovirt.github.io/ovirt-<wbr>engine-sdk/master/types.m.<wbr>html#ovirtsdk4.types.<wbr>NumaNodePin</a></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">[3] - <a href="http://ovirt.github.io/ovirt-engine-api-model/4.2/#types/numa_node_pin" target="_blank">http://ovirt.github.io/ovirt-<wbr>engine-api-model/4.2/#types/<wbr>numa_node_pin</a></font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 25 January 2018 at 16:12, Don Dupuis <span dir="ltr"><<a href="mailto:dondster@gmail.com" target="_blank">dondster@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><span style="font-size:12.800000190734863px">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</span><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Thanks</div><span class="m_-8731798952540083089HOEnZb"><font color="#888888"><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Don</div></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>