<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">&lt;<a href="mailto:masayag@redhat.com" target="_blank">masayag@redhat.com</a>&gt;</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>
&gt; From: &quot;Vladimir Pakhomov&quot; &lt;<a href="mailto:pakhomov.vladimir@gmail.com">pakhomov.vladimir@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
&gt; Sent: Sunday, October 5, 2014 1:26:12 PM<br>
&gt; Subject: [ovirt-users] using ovirt-shell to attach defind network to hosts<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I would like to implement a script that would attach a newly created network<br>
&gt; to all hosts in cluster. Unfortunately I cannot find anything about that in<br>
&gt; 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 &#39;network labels&#39; 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 &quot;Configure bond with several networks&quot; 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&#39;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>
&gt;<br>
&gt; Kind regards,<br>
&gt; Vladimir Pakhomov<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
&gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;<br>
</div></div></blockquote></div><br></div></div>