Fixing bug/typo in main.py
PATCH 1/1 Fixing bug/typo in main.py
This patch fixes a typo of main.py.
1.xm reboot help is shown only 3 arguments.
2.unit name of Mem in xm list header is *MiB*
Best Regards,
Yoshinori Katase
tools/python/xen/xm/main.py Wed Jan 11 16:05:28 2006 renamed from tools/python/xen/xm/main.py Tue Jan 10 17:53:44 2006 +0 -0
@@ -58,7 +58,7 @@ mem_set_help = "mem-set <DomId> <Mem> Adjust the current memory
usage for a domain"
migrate_help = "migrate <DomId> <Host> Migrate a domain to
another machine"
pause_help = "pause <DomId> Pause execution of a
domain"
-reboot_help = "reboot <DomId> [-w][-a] Reboot a domain" +reboot_help = "reboot <DomId> [-w][-a][-R|-H] Reboot a domain" restore_help = "restore <File> Create a domain from a
saved state file"
save_help = "save <DomId> <File> Save domain state (and
config) to file"
shutdown_help ="shutdown <DomId> [-w][-a][-R|-H] Shutdown a domain"
@@ -377,7 +377,7 @@
def xm_brief_list(doms):
- print 'Name ID Mem(MiB) VCPUs State
Time(s)'
+ print 'Name ID Mem(MB) VCPUs State
Time(s)'
for dom in doms:
d = parse_doms_info(dom)
if (d['ssidref'] != 0):
tools/python/xen/xm/main.py +2 -2
@@ -58,7 +58,7 @@ mem_set_help = "mem-set <DomId> <Mem> Adjust the current memory usage for a domain" migrate_help = "migrate <DomId> <Host> Migrate a domain to another machine" pause_help = "pause <DomId> Pause execution of a domain" -reboot_help = "reboot <DomId> [-w][-a] Reboot a domain" +reboot_help = "reboot <DomId> [-w][-a][-R|-H] Reboot a domain" restore_help = "restore <File> Create a domain from a saved state file" save_help = "save <DomId> <File> Save domain state (and config) to file" shutdown_help ="shutdown <DomId> [-w][-a][-R|-H] Shutdown a domain"
@@ -377,7 +377,7 @@ def xm_brief_list(doms): - print 'Name ID Mem(MiB) VCPUs State Time(s)' + print 'Name ID Mem(MB) VCPUs State Time(s)' for dom in doms: d = parse_doms_info(dom) if (d['ssidref'] != 0):
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 9 lines · Yoshinori Katase
This patch fixes a typo of
main.py.
[...]
2.unit name of Mem in xm list header is *MiB*def
xm_brief_list(doms):
- print 'Name ID Mem(MiB) VCPUs State
Time(s)'
+ print 'Name ID Mem(MB) VCPUs State
Time(s)'
`MiB' is correct, see <URL:http://physics.nist.gov/cuu/Units/binary.html>.
Regards,
Thomas
Quoted 2 lines · Yoshinori Katase
This patch fixes a typo of
main.py.
1.xm reboot help is shown only 3 arguments.
What you've done here isn't right. xm reboot is redirected through xm shutdown, but that's just a messy implementation detail. xm shutdown -H means shutdown and don't restart regardless of configuration to the contrary -- xm reboot -H therefore does not make any sense. xm shutdown -R is exactly the same as xm reboot, and so xm reboot -R does not make any sense either.
We ought to change the arg_check for xm_reboot to allow a maximum of 3 arguments, but better would be to rewrite shutdown.py so that the handling of the call to the server was separate from the argument handling and this mess was sorted out properly. Any volunteers?
Thanks,
Ewan.