--Apple-Mail=_AB14F229-CE2E-4B95-BB93-CE31335A85FA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
Le 23 ao=C3=BBt 2017 =C3=A0 15:52, Yaniv Kaul
<ykaul(a)redhat.com> a =
=C3=A9crit :
=20
=20
=20
On Wed, Aug 23, 2017 at 1:11 PM, Fabrice Bacchella =
<fabrice.bacchella(a)orange.fr <mailto:fabrice.bacchella@orange.fr>> =
wrote:
I'm still playing with my sdk4 python wrapper =
(
https://github.com/fbacchella/ovirtcmd =
<
https://github.com/fbacchella/ovirtcmd>).
=20
In the last update, I tried to make writing of custom script simpler.
=20
As an example, i wrote a wrapper for single node cluster installation.
=20
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:
=20
ovcmd eval -v host_name $hostname samples/single_node_cluster.py
=20
The code for this script is found at =
https://github.com/fbacchella/ovirtcmd/blob/master/samples/single_node_clu=
ster.py =
<
https://github.com/fbacchella/ovirtcmd/blob/master/samples/single_node_cl=
uster.py>
=20
=20
Thanks for sharing. I quite like ovlib.
How do you pass parameters to the script?
It's prepared in the variables of the eval. The argument -v host_name =
$hostname create a variable called hostname with value $hostname that =
will be global for the script.
=20
Lastly, I wonder how it compares to oVirt Ansible roles[1].
I don't know, I'm not a ansible user, we're running on puppet.
--Apple-Mail=_AB14F229-CE2E-4B95-BB93-CE31335A85FA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type"
content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><br class=3D""><div><blockquote
type=3D"cite" class=3D""><div =
class=3D"">Le 23 ao=C3=BBt 2017 =C3=A0 15:52, Yaniv Kaul <<a =
href=3D"mailto:ykaul@redhat.com"
class=3D"">ykaul(a)redhat.com</a>&gt; a =
=C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div =
class=3D""><div dir=3D"ltr" class=3D""><br
class=3D""><div =
class=3D"gmail_extra"><br class=3D""><div
class=3D"gmail_quote">On Wed, =
Aug 23, 2017 at 1:11 PM, Fabrice Bacchella <span dir=3D"ltr" =
class=3D""><<a
href=3D"mailto:fabrice.bacchella@orange.fr" =
target=3D"_blank"
class=3D"">fabrice.bacchella(a)orange.fr</a>&gt;</span> =
wrote:<br class=3D""><blockquote class=3D"gmail_quote"
style=3D"margin:0px=
0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><div
style=3D"word-wrap:break-word" =
class=3D"">I'm still playing with my sdk4 python wrapper (<a =
href=3D"https://github.com/fbacchella/ovirtcmd" target=3D"_blank" =
class=3D"">https://github.com/<wbr
class=3D"">fbacchella/ovirtcmd</a>).<br=
class=3D""><br class=3D"">In the last update, I tried to
make writing =
of custom script simpler.<br class=3D""><br class=3D"">As
an example, i =
wrote a wrapper for single node cluster installation.<br class=3D""><br
=
class=3D"">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=3D""><br class=3D""><div
class=3D""><font =
face=3D"Menlo" class=3D""> ovcmd eval -v
host_name =
$hostname samples/single_node_cluster.py</font></div><br =
class=3D"gmail-m_-290255187273430884Apple-interchange-newline">The code =
for this script is found at <a =
href=3D"https://github.com/fbacchella/ovirtcmd/blob/master/samples/s...
node_cluster.py" target=3D"_blank"
class=3D"">https://github.com/<wbr =
class=3D"">fbacchella/ovirtcmd/blob/<wbr =
class=3D"">master/samples/single_node_<wbr
class=3D"">cluster.py</a><br =
class=3D""><br
class=3D""></div></blockquote><div
class=3D""><br =
class=3D""></div><div class=3D"">Thanks for sharing. I
quite like =
ovlib.</div><div class=3D"">How do you pass parameters to the =
script?</div></div></div></div></div></blockquote><div><br
=
class=3D""></div>It's prepared in the variables of the eval. The =
argument <span style=3D"font-family: Menlo;"
class=3D"">-v =
host_name $hostname create a variable called hostname with value =
$hostname that will be global for the script.</span></div><div><br =
class=3D""><blockquote type=3D"cite"
class=3D""><div class=3D""><div =
dir=3D"ltr" class=3D""><div
class=3D"gmail_extra"><div =
class=3D"gmail_quote"><div class=3D""><br
class=3D""></div><div =
class=3D"">Lastly, I wonder how it compares to oVirt Ansible =
roles[1].</div></div></div></div></div></blockquote><br
=
class=3D""></div><div>I don't know, I'm not a ansible
user, we're =
running on puppet.</div><br class=3D""></body></html>=
--Apple-Mail=_AB14F229-CE2E-4B95-BB93-CE31335A85FA--