Fix the information of the xm list command
PATCH 1/1 Fix the information of the xm list command
Hi,
I fixed the Xen bugzilla 935.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=935
The test result is as follows. All "cpus" are removed from the information of the xm list command.
# xm list --long vm1
(domain
(on_crash restart)
(uuid 52b8cca6-df1a-b9ec-9b4c-6e5ae7014b3c)
(bootloader_args )
(vcpus 2)
(name vm1)
(on_poweroff destroy)
(on_reboot restart)
(bootloader )
(maxmem 384)
(memory 256)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(image
(linux
(kernel /boot/vmlinuz-2.6.18-xen)
(ramdisk /boot/initrd-2.6.18-xen.img.domU)
(args 'root=/dev/hda1 ro 3')
)
)
(status 0)
(device
(vbd
(uuid f42667ec-8599-7b48-395c-c998d8cd14ce)
(bootable 1)
(driver paravirtualised)
(dev hda1)
(uname file:/xen/rhel4u2.root.img-vm1)
(mode w)
)
)
)Signed-off-by Masaki Kanno <[email protected]>
Best regards,
Kan
tools/python/xen/xend/XendConfig.py +3 -1
@@ -845,6 +845,8 @@ class XendConfig(dict): sxpr.append([name, s]) for xenapi, legacy in XENAPI_CFG_TO_LEGACY_CFG.items(): + if legacy in ('cpus'): # skip this + continue if self.has_key(xenapi) and self[xenapi] not in (None, []): if type(self[xenapi]) == bool: # convert booleans to ints before making an sxp item
@@ -858,7 +860,7 @@ class XendConfig(dict): sxpr.append(["memory", int(self["memory_dynamic_max"])/MiB]) for legacy in LEGACY_UNSUPPORTED_BY_XENAPI_CFG: - if legacy in ('domid', 'uuid'): # skip these + if legacy in ('domid', 'uuid', 'cpus'): # skip these continue if self.has_key(legacy) and self[legacy] not in (None, []): sxpr.append([legacy, self[legacy]])
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel