

def _to_image(self, image):
    '\n        Take XML object containing an image description and convert to\n        NodeImage object.\n\n        :type  image: :class:`ElementTree`\n        :param image: XML representation of an image.\n\n        :rtype:  :class:`NodeImage`\n        :return: The newly extracted :class:`NodeImage`.\n        '
    return NodeImage(id=image.findtext('ID'), name=image.findtext('NAME'), driver=self.connection.driver, extra={
        'description': image.findtext('DESCRIPTION'),
        'type': image.findtext('TYPE'),
        'size': image.findtext('SIZE'),
        'fstype': image.findtext('FSTYPE', None),
    })

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/opennebula.py OpenNebula_2_0_NodeDriver._to_image/original