<div dir="ltr">Thank you!!<div><br></div><div>Thanks to Maikl P I find the solution:</div><div>action nic $IF_NAME --host-identifier $HOST_ID attach --network-name $NET_NAME</div><div>Moti Asayag, thank you for links provided.</div><div><br></div><div>Kind regards,</div><div>Vladimir Pakhomov</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-05 17:19 GMT+04:00 Moti Asayag <span dir="ltr"><<a href="mailto:masayag@redhat.com" target="_blank">masayag@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">----- Original Message -----<br>
> From: "Vladimir Pakhomov" <<a href="mailto:pakhomov.vladimir@gmail.com">pakhomov.vladimir@gmail.com</a>><br>
> To: <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
> Sent: Sunday, October 5, 2014 1:26:12 PM<br>
> Subject: [ovirt-users] using ovirt-shell to attach defind network to hosts<br>
><br>
> Hi,<br>
><br>
> I would like to implement a script that would attach a newly created network<br>
> to all hosts in cluster. Unfortunately I cannot find anything about that in<br>
> documentation. Is it possible to attach network to host using CLI/REST API?<br>
<br>
</span>If the case is for attaching a network to all of the hosts on the cluster,<br>
you can use the 'network labels' feature in which you label the host nics<br>
with a label, and once you mark a network with the same label, it will be<br>
auto-configured on the hosts. This will allow you just to label networks<br>
in order to configure them on the hosts without a need to access the hosts.<br>
<br>
<a href="http://www.ovirt.org/Features/NetworkLabels#REST" target="_blank">http://www.ovirt.org/Features/NetworkLabels#REST</a><br>
<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html-single/Administration_Guide/index.html#sect-Network_Labels" target="_blank">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html-single/Administration_Guide/index.html#sect-Network_Labels</a><br>
<br>
For configuring networks manually on the host you can use the setupnetworks<br>
api, which allows you to configure the destination network topology for the host.<br>
See "Configure bond with several networks" example from:<br>
<a href="http://www.ovirt.org/Testing/PythonApi#Networking" target="_blank">http://www.ovirt.org/Testing/PythonApi#Networking</a><br>
<br>
I've also added several more examples here:<br>
<a href="https://motiasayag.wordpress.com/category/ovirt/ovirt-engine-sdk-python/setup-networks/" target="_blank">https://motiasayag.wordpress.com/category/ovirt/ovirt-engine-sdk-python/setup-networks/</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> Kind regards,<br>
> Vladimir Pakhomov<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
><br>
</div></div></blockquote></div><br></div></div>