<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">To try to learn the python SDK, and help the automation of my setup, I wrote a CLI to oVirt.<br class=""><br class="">It tries to hide some of the complexity, so some simple python script like :<br class=""><br class=""><font face="Menlo" class="">dc = context.datacenter(name="dc1")<br class="">if&nbsp;dc&nbsp;is not&nbsp;None:<br class="">&nbsp; &nbsp; dc.delete(force=True)<br class="">context.datacenter().create(name="</font><span style="font-family: Menlo;" class="">dc1</span><font face="Menlo" class="">",&nbsp;local=False,&nbsp;storage_format="v3",&nbsp;mac_pool_name="MoreMac")<br class=""><br class="">cluster = context.cluster(name="cl1")<br class="">if&nbsp;cluster&nbsp;is not&nbsp;None:<br class="">&nbsp; &nbsp; cluster.delete(force=True)<br class="">context.cluster().create(name="</font><span style="font-family: Menlo;" class="">cl1</span><font face="Menlo" class="">",&nbsp;cpu_type="Intel Haswell-noTSX Family",&nbsp;dc_name="en02",<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;memory_policy={'guaranteed':&nbsp;True,&nbsp;'overcommit':&nbsp;100,&nbsp;'transparent_hugepages':&nbsp;False},<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ballooning_enabled=True)<br class=""></font><br class=""><div class="">can be used. It avoid the use of params.Something.</div><div class=""><br class=""></div><div class="">It can also be used to do action in shell like :</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-family: Menlo;" class="">./ovcmd -c ovirt.ini host -n host1 bond -i eth0 -i eth1 -n ovirtmgmt -o mode 4 -o miimon 100 -o xmit_hash_policy 2+3 -D -m 9000</div></div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">or</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px; font-family: Menlo;" class="">./ovcmd -c ovirt.ini host -n host1 export nics</div><div style="margin: 0px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px;" class="">Complex commands can take template as an argument :</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class=""><div style="margin: 0px; font-family: Menlo;" class="">./ovcmd -d -c&nbsp;ovirt.ini&nbsp;vm create -T vm1.yaml -V cores 2 -V memory 4G -n vm1</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">It's of course on github :</div><div style="margin: 0px;" class=""><a href="https://github.com/fbacchella/ovirtcmd" class="">https://github.com/fbacchella/ovirtcmd</a></div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">It's still a work in progress, only the very basic commands are implemented, I will add other as requested, it should be easy to do so.</div></div></body></html>