
DK> + def __init__(self, megabytes, mallocunits, name): DK> self.ResourceType = RASD_TYPE_MEM DK> if megabytes != None: DK> self.VirtualQuantity = megabytes DK> + DK> + if mallocunits != None: DK> + self.AllocationUnits = mallocunits These should be parameters with default values. The way you have it now, the caller must specify something for each, and if they don't, you create an invalid RASD. For example: class_masd(None, None, "foo") succeeds, but passes none of the required information in the RASD. A definition like this would be better: def __init__(self, name, megabytes=128, mallocunits="MegaBytes") So that someone can call it in any of the following ways: masd_class("foo") masd_class("foo", 256) masd_class("foo", 131076, "KiloBytes") Doing it this way will avoid the need to change every use of this function in places that don't need to know about whatever new parameter you add next time. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com