<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 dc is not None:<br class=""> dc.delete(force=True)<br class="">context.datacenter().create(name="</font><span style="font-family: Menlo;" class="">dc1</span><font face="Menlo" class="">", local=False, storage_format="v3", mac_pool_name="MoreMac")<br class=""><br class="">cluster = context.cluster(name="cl1")<br class="">if cluster is not None:<br class=""> cluster.delete(force=True)<br class="">context.cluster().create(name="</font><span style="font-family: Menlo;" class="">cl1</span><font face="Menlo" class="">", cpu_type="Intel Haswell-noTSX Family", dc_name="en02",<br class=""> memory_policy={'guaranteed': True, 'overcommit': 100, 'transparent_hugepages': False},<br class=""> 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 ovirt.ini 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>