<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="">I thinks it's a minor thing, but still puzzling.<div class=""><br class=""></div><div class="">A new VM don't have the kernel, initrd and cmdline elements. Once added for a custom boot, if I remove them using the API, there are still here, but empty. If I use, the GUI, they vanished.</div><div class=""><br class=""></div><div class="">Using CLI:</div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <os type="rhel_7x64"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <boot dev="hd"/></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <boot dev="network"/></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <kernel></kernel></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <initrd></initrd></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <cmdline></cmdline></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> </os></div></div><div class=""><br class=""></div><div class="">Using GUI:</div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <os type="rhel_7x64"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <boot dev="hd"/></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <boot dev="network"/></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> </os></div></div><div class=""><br class=""></div><div class="">Not critical, but strange. Both works</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 24 mai 2016 à 13:36, Shmuel Melamud <<a href="mailto:smelamud@redhat.com" class="">smelamud@redhat.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">Hi!<br class=""><br class=""></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">What do you mean under "removing values"? You want <kernel>, <initrd> etc. not to appear in engine response? There is no such thing. There is always some value, empty or non-empty.<br class=""><br class=""></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">Shmuel<br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Apr 12, 2016 at 6:40 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">I'm trying to change the way a VM is booted, I want an initial setup with kernel, initrd and cmdline given and later removed.<div class=""><br class=""></div><div class="">Using the GUI it works fine.</div><div class=""><br class=""></div><div class="">But I have no success using the python API. And running with debug enable, I get this strange result :</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1</div></div><div class="">...</div><div class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> </os></div></div><div class="">...</div><div class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <kernel>.../vmlinuz</kernel></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <initrd>.../initrd.img</initrd></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <cmdline>....</cmdline></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< </os></div></div><div class=""><br class=""></div><div class="">I got this with:</div><div class=""><pre style="background-color:rgb(255,255,255);font-family:Menlo" class="">os_params = params.OperatingSystem()<br class="">os_params.set_boot(old_os_params.get_boot())<br class="">os_params.set_type(old_os_params.get_type())<br class="">os_params.set_kernel(<span style="color:#000080" class="">None</span>)<br class="">os_params.set_initrd(<span style="color:#000080" class="">None</span>)<br class="">os_params.set_cmdline(<span style="color:#000080" class="">None</span>)<br class=""><span style="color:#94558d" class="">self</span>.broker.set_os(os_params)<br class=""><span style="color:#94558d" class="">self</span>.broker.update()<br class=""></pre><div class="">trying to set kernel and others to empty string is not really better:</div></div><div class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <kernel></kernel></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <initrd></initrd></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> <cmdline></cmdline></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">> </os></div></div><div class="">...</div><div class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <kernel></kernel></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <initrd></initrd></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< <cmdline></cmdline></div><div style="margin:0px;font-size:11px;font-family:Menlo" class="">< </os></div></div><div class=""><br class=""></div><div class="">What kind of "magic values" the engine uses to removes values ?</div><div class=""><br class=""></div></div><br class="">_______________________________________________<br class="">
Users mailing list<br class="">
<a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a><br class="">
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank" class="">http://lists.ovirt.org/mailman/listinfo/users</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>