--Apple-Mail=_337ECEDC-2489-469A-B216-705393687D46
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
I thinks it's a minor thing, but still puzzling.
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.
Using CLI:
<os type=3D"rhel_7x64">
<boot dev=3D"hd"/>
<boot dev=3D"network"/>
<kernel></kernel>
<initrd></initrd>
<cmdline></cmdline>
</os>
Using GUI:
<os type=3D"rhel_7x64">
<boot dev=3D"hd"/>
<boot dev=3D"network"/>
</os>
Not critical, but strange. Both works
Le 24 mai 2016 =C3=A0 13:36, Shmuel Melamud
<smelamud(a)redhat.com> a =
=C3=A9crit :
=20
Hi!
=20
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.
=20
Shmuel
=20
On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella =
<fabrice.bacchella(a)orange.fr <mailto:fabrice.bacchella@orange.fr>> =
wrote:
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.
=20
Using the GUI it works fine.
=20
But I have no success using the python API. And running with debug =
enable, I get
this strange result :
=20
> PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1
...
> <os type=3D"rhel_7x64">
> <boot dev=3D"hd"/>
> <boot dev=3D"network"/>
> </os>
...
< <os type=3D"rhel_7x64">
< <boot dev=3D"hd"/>
< <boot dev=3D"network"/>
< <kernel>.../vmlinuz</kernel>
< <initrd>.../initrd.img</initrd>
< <cmdline>....</cmdline>
< </os>
=20
I got this with:
os_params =3D params.OperatingSystem()
os_params.set_boot(old_os_params.get_boot())
os_params.set_type(old_os_params.get_type())
os_params.set_kernel(None)
os_params.set_initrd(None)
os_params.set_cmdline(None)
self.broker.set_os(os_params)
self.broker.update()
trying to set kernel and others to empty string is not really better:
> <os type=3D"rhel_7x64">
> <boot dev=3D"hd"/>
> <boot dev=3D"network"/>
> <kernel></kernel>
> <initrd></initrd>
> <cmdline></cmdline>
> </os>
...
< <os type=3D"rhel_7x64">
< <boot dev=3D"hd"/>
< <boot dev=3D"network"/>
< <kernel></kernel>
< <initrd></initrd>
< <cmdline></cmdline>
< </os>
=20
What kind of "magic values" the engine uses to removes values ?
=20
=20
_______________________________________________
Users mailing list
Users(a)ovirt.org <mailto:Users@ovirt.org>
http://lists.ovirt.org/mailman/listinfo/users =
<
http://lists.ovirt.org/mailman/listinfo/users>
=20
=20
--Apple-Mail=_337ECEDC-2489-469A-B216-705393687D46
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type"
content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">I thinks it's a minor thing, but still puzzling.<div =
class=3D""><br class=3D""></div><div
class=3D"">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=3D""><br
class=3D""></div><div =
class=3D"">Using CLI:</div><div class=3D""><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D""> =
<os type=3D"rhel_7x64"></div><div
style=3D"margin: =
0px; font-size: 11px; font-family: Menlo;" class=3D"">
=
<boot dev=3D"hd"/></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
<boot dev=3D"network"/></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
<kernel></kernel></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
<initrd></initrd></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
<cmdline></cmdline></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
</os></div></div><div class=3D""><br
class=3D""></div><div =
class=3D"">Using GUI:</div><div class=3D""><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D""> =
<os type=3D"rhel_7x64"></div><div
style=3D"margin: =
0px; font-size: 11px; font-family: Menlo;" class=3D"">
=
<boot dev=3D"hd"/></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
<boot dev=3D"network"/></div><div
style=3D"margin: 0px; =
font-size: 11px; font-family: Menlo;" class=3D"">
=
</os></div></div><div class=3D""><br
class=3D""></div><div =
class=3D"">Not critical, but strange. Both works</div><div
class=3D""><br =
class=3D""></div><div class=3D""><br
class=3D""><div><blockquote =
type=3D"cite" class=3D""><div class=3D"">Le 24 mai
2016 =C3=A0 13:36, =
Shmuel Melamud <<a href=3D"mailto:smelamud@redhat.com" =
class=3D"">smelamud(a)redhat.com</a>&gt; a =C3=A9crit
:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div
dir=3D"ltr" =
class=3D""><div class=3D"gmail_default" =
style=3D"font-family:monospace,monospace;font-size:x-small">Hi!<br =
class=3D""><br class=3D""></div><div
class=3D"gmail_default" =
style=3D"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=3D""><br =
class=3D""></div><div class=3D"gmail_default" =
style=3D"font-family:monospace,monospace;font-size:x-small">Shmuel<br =
class=3D""></div></div><div
class=3D"gmail_extra"><br class=3D""><div =
class=3D"gmail_quote">On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella =
<span dir=3D"ltr" class=3D""><<a =
href=3D"mailto:fabrice.bacchella@orange.fr" target=3D"_blank" =
class=3D"">fabrice.bacchella(a)orange.fr</a>&gt;</span>
wrote:<br =
class=3D""><blockquote class=3D"gmail_quote"
style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
style=3D"word-wrap:break-word" class=3D"">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=3D""><br
class=3D""></div><div =
class=3D"">Using the GUI it works fine.</div><div
class=3D""><br =
class=3D""></div><div class=3D"">But I have no success
using the python =
API. And running with debug enable, I get this strange result =
:</div><div class=3D""><br
class=3D""></div><div class=3D""><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca =
HTTP/1.1</div></div><div class=3D"">...</div><div
class=3D""><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<os type=3D"rhel_7x64"></div><div
=
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<boot
dev=3D"hd"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<boot
dev=3D"network"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
</os></div></div><div
class=3D"">...</div><div =
class=3D""><div
style=3D"margin:0px;font-size:11px;font-family:Menlo" =
class=3D"">< <os
type=3D"rhel_7x64"></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<boot
dev=3D"hd"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<boot
dev=3D"network"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
=
<kernel>.../vmlinuz</kernel></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
=
<initrd>.../initrd.img</initrd></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
=
<cmdline>....</cmdline></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
</os></div></div><div
class=3D""><br =
class=3D""></div><div class=3D"">I got this
with:</div><div =
class=3D""><pre =
style=3D"background-color:rgb(255,255,255);font-family:Menlo" =
class=3D"">os_params =3D params.OperatingSystem()<br =
class=3D"">os_params.set_boot(old_os_params.get_boot())<br =
class=3D"">os_params.set_type(old_os_params.get_type())<br =
class=3D"">os_params.set_kernel(<span style=3D"color:#000080" =
class=3D"">None</span>)<br
class=3D"">os_params.set_initrd(<span =
style=3D"color:#000080" class=3D"">None</span>)<br =
class=3D"">os_params.set_cmdline(<span style=3D"color:#000080"
=
class=3D"">None</span>)<br class=3D""><span
style=3D"color:#94558d" =
class=3D"">self</span>.broker.set_os(os_params)<br
class=3D""><span =
style=3D"color:#94558d"
class=3D"">self</span>.broker.update()<br =
class=3D""></pre><div class=3D"">trying to set kernel
and others to =
empty string is not really better:</div></div><div
class=3D""><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<os type=3D"rhel_7x64"></div><div
=
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<boot
dev=3D"hd"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<boot
dev=3D"network"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<kernel></kernel></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<initrd></initrd></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
<cmdline></cmdline></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">> =
</os></div></div><div
class=3D"">...</div><div =
class=3D""><div
style=3D"margin:0px;font-size:11px;font-family:Menlo" =
class=3D"">< <os
type=3D"rhel_7x64"></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<boot
dev=3D"hd"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<boot
dev=3D"network"/></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<kernel></kernel></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<initrd></initrd></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
<cmdline></cmdline></div><div =
style=3D"margin:0px;font-size:11px;font-family:Menlo"
class=3D"">< =
</os></div></div><div
class=3D""><br =
class=3D""></div><div class=3D"">What kind of
"magic values" the engine =
uses to removes values ?</div><div class=3D""><br =
class=3D""></div></div><br =
class=3D"">_______________________________________________<br
class=3D"">
Users mailing list<br class=3D"">
<a href=3D"mailto:Users@ovirt.org"
class=3D"">Users(a)ovirt.org</a><br =
class=3D"">
<a
href=3D"http://lists.ovirt.org/mailman/listinfo/users" =
rel=3D"noreferrer" target=3D"_blank" =
class=3D"">http://lists.ovirt.org/mailman/listinfo/users<... =
class=3D"">
<br class=3D""></blockquote></div><br
class=3D""></div>
</div></blockquote></div><br
class=3D""></div></body></html>=
--Apple-Mail=_337ECEDC-2489-469A-B216-705393687D46--