def _extract_images(self, compute):
        disks = list()

        disk_list = compute.find('STORAGE')
        if disk_list is not None:
            for element in disk_list.findall('DISK'):
                disks.append(
                    NodeImage(id=element.attrib.get('image', None),
                              name=None,
                              driver=self.connection.driver,
                              extra={'dev': element.attrib.get('dev', None)}))

        # @TODO: Return all disks when the Node type accepts multiple
        # attached disks per node.
        if len(disks) > 0:
            return disks[0]
        else:
            return None
Extract image disks from a compute node XML representation.
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/opennebula.py/OpenNebulaNodeDriver._extract_images