<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 7, 2016 at 6:17 PM, Jean-Pierre Ribeauville <span dir="ltr"><<a href="mailto:jpribeauville@axway.com" target="_blank">jpribeauville@axway.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="FR" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">I’m a little bit lost by looking how to migrate a Guest between two nodes of a same cluster by using ovirt python API .</span></p></div></div></blockquote><div><br></div><div>Copy-paste from oVirt system tests[1], adapt as you need:</div><div><br></div><div>def vm_migrate(prefix):</div><div> api = prefix.virt_env.engine_vm().get_api()</div><div> host_names = [<a href="http://h.name">h.name</a>() for h in prefix.virt_env.host_vms()]</div><div><br></div><div> migrate_params = params.Action(</div><div> host=params.Host(</div><div> name=sorted(host_names)[1]</div><div> ),</div><div> )</div><div> api.vms.get(VM1_NAME).migrate(migrate_params)</div><div> testlib.assert_true_within_short(</div><div> lambda: api.vms.get(VM1_NAME).status.state == 'up',</div><div> ) </div><div><br></div><div><br></div><div>Y.</div><div>[1] <a href="https://gerrit.ovirt.org/#/c/48206/4/basic_suite_3.6/test-scenarios/004_basic_sanity.py">https://gerrit.ovirt.org/#/c/48206/4/basic_suite_3.6/test-scenarios/004_basic_sanity.py</a></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="FR" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is it the good way to start for ovirt engine sources ?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal">Thx for help.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span>Jean-Pierre RIBEAUVILLE<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt"><a href="tel:%2B33%201%204717%202049" value="+33147172049" target="_blank">+33 1 4717 2049</a><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><img width="140" height="87" src="cid:image001.png@01D17895.39E36880" alt="axway_logo_tagline_87px"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>