[Libvirt-cim] [PATCH] [TEST] #2 Fix none value for disk assigned for Xen and align parameters in function call
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Jan 14 15:35:07 UTC 2009
>
> + # Xen uses the default dev and source values for disk
This comment is misplaced here. You have it well before the Xen case.
Instead, I would place it below (and modify it slightly since you've
changed the code some)..
> class_dasd = get_dasd_class(virt)
> if virt == 'KVM':
> disk_dev = 'hda'
> disk_source = const.KVM_disk_path
> - d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
> elif virt == 'XenFV':
> disk_dev = 'hda'
> disk_source = const.XenFV_disk_path
> - d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
> elif virt == 'LXC':
> disk_dev = const.LXC_default_mp
> disk_source = const.LXC_default_source
> - d = class_dasd(disk_dev, disk_source, dom_name)
> -
#LXC guests do not need to set the EmulationType
> + if virt == 'LXC':
> + d = class_dasd(disk_dev,
> + disk_source,
> + dom_name)
> + else:
> + d = class_dasd(disk_dev,
> + disk_source,
> + dom_name,
> + emu_type)
> +
Or something similar..
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list