def volWipePattern(vol, algorithm, flags=0): new_xml = xml_item_update(vol.XMLDesc(0), './allocation', '0') vol.delete(0) pool = vol.storagePoolLookupByVolume() pool.createXML(new_xml)
def volResize(vol, size, flags=0): new_xml = xml_item_update(vol.XMLDesc(0), './capacity', str(size)) vol.delete(0) pool = vol.storagePoolLookupByVolume() pool.createXML(new_xml)