<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 23 août 2017 à 15:52, Yaniv Kaul <<a href="mailto:ykaul@redhat.com" class="">ykaul@redhat.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Aug 23, 2017 at 1:11 PM, Fabrice Bacchella <span dir="ltr" class=""><<a href="mailto:fabrice.bacchella@orange.fr" target="_blank" class="">fabrice.bacchella@orange.fr</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">I'm still playing with my sdk4 python wrapper (<a href="https://github.com/fbacchella/ovirtcmd" target="_blank" class="">https://github.com/<wbr class="">fbacchella/ovirtcmd</a>).<br class=""><br class="">In the last update, I tried to make writing of custom script simpler.<br class=""><br class="">As an example, i wrote a wrapper for single node cluster installation.<br class=""><br class="">I have a bunch of old ProLiant DL185 G5. I configured them to be single-node cluster. I create two disks on them, one will be system, the second on will be directly used by oVirt, without a file system on it. Three VLAN are added to the server. It used with:<br class=""><br class=""><div class=""><font face="Menlo" class=""> ovcmd eval -v host_name $hostname samples/single_node_cluster.py</font></div><br class="gmail-m_-290255187273430884Apple-interchange-newline">The code for this script is found at <a href="https://github.com/fbacchella/ovirtcmd/blob/master/samples/single_node_cluster.py" target="_blank" class="">https://github.com/<wbr class="">fbacchella/ovirtcmd/blob/<wbr class="">master/samples/single_node_<wbr class="">cluster.py</a><br class=""><br class=""></div></blockquote><div class=""><br class=""></div><div class="">Thanks for sharing. I quite like ovlib.</div><div class="">How do you pass parameters to the script?</div></div></div></div></div></blockquote><div><br class=""></div>It's prepared in the variables of the eval. The argument <span style="font-family: Menlo;" class="">-v host_name $hostname create a variable called hostname with value $hostname that will be global for the script.</span></div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">Lastly, I wonder how it compares to oVirt Ansible roles[1].</div></div></div></div></div></blockquote><br class=""></div><div>I don't know, I'm not a ansible user, we're running on puppet.</div><br class=""></body></html>