<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">Hi!<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">What do you mean under &quot;removing values&quot;?  You want &lt;kernel&gt;, &lt;initrd&gt; etc. not to appear in engine response? There is no such thing. There is always some value, empty or non-empty.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">Shmuel<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella <span dir="ltr">&lt;<a href="mailto:fabrice.bacchella@orange.fr" target="_blank">fabrice.bacchella@orange.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I&#39;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><br></div><div>Using the GUI it works fine.</div><div><br></div><div>But I have no success using the python API. And running with debug enable, I get this strange result :</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt; PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1</div></div><div>...</div><div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;     &lt;os type=&quot;rhel_7x64&quot;&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;boot dev=&quot;hd&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;boot dev=&quot;network&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;     &lt;/os&gt;</div></div><div>...</div><div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;     &lt;os type=&quot;rhel_7x64&quot;&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;boot dev=&quot;hd&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;boot dev=&quot;network&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;kernel&gt;.../vmlinuz&lt;/kernel&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;initrd&gt;.../initrd.img&lt;/initrd&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;cmdline&gt;....&lt;/cmdline&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;     &lt;/os&gt;</div></div><div><br></div><div>I got this with:</div><div><pre style="background-color:rgb(255,255,255);font-family:Menlo">os_params =  params.OperatingSystem()<br>os_params.set_boot(old_os_params.get_boot())<br>os_params.set_type(old_os_params.get_type())<br>os_params.set_kernel(<span style="color:#000080">None</span>)<br>os_params.set_initrd(<span style="color:#000080">None</span>)<br>os_params.set_cmdline(<span style="color:#000080">None</span>)<br><span style="color:#94558d">self</span>.broker.set_os(os_params)<br><span style="color:#94558d">self</span>.broker.update()<br></pre><div>trying to set kernel and others to empty string is not really better:</div></div><div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;     &lt;os type=&quot;rhel_7x64&quot;&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;boot dev=&quot;hd&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;boot dev=&quot;network&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;kernel&gt;&lt;/kernel&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;initrd&gt;&lt;/initrd&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;         &lt;cmdline&gt;&lt;/cmdline&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&gt;     &lt;/os&gt;</div></div><div>...</div><div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;     &lt;os type=&quot;rhel_7x64&quot;&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;boot dev=&quot;hd&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;boot dev=&quot;network&quot;/&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;kernel&gt;&lt;/kernel&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;initrd&gt;&lt;/initrd&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;         &lt;cmdline&gt;&lt;/cmdline&gt;</div><div style="margin:0px;font-size:11px;font-family:Menlo">&lt;     &lt;/os&gt;</div></div><div><br></div><div>What kind of &quot;magic values&quot; the engine uses to removes values ?</div><div><br></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>