'Returns the max disk unit used by scsi controller'

def _get_scsi_controller_max_unit(self, guest):

    xml = guest.get_xml_desc()
    tree = etree.fromstring(xml)
    addrs = "./devices/disk[@device='disk']/address[@type='drive']"
    ret = []
    for obj in tree.findall(addrs):
        ret.append(int(obj.get('unit', 0)))
    return max(ret)
