

def _to_node(self, compute):
    '\n        Take XML object containing a compute node description and convert to\n        Node object.\n\n        Take XML representation containing a compute node description and\n        convert to Node object.\n\n        :type  compute: :class:`ElementTree`\n        :param compute: XML representation of a compute node.\n\n        :rtype:  :class:`Node`\n        :return: The newly extracted :class:`Node`.\n        '
    try:
        state = self.NODE_STATE_MAP[compute.findtext('STATE').upper()]
    except KeyError:
        state = NodeState.UNKNOWN
    return Node(id=compute.findtext('ID'), name=compute.findtext('NAME'), state=state, public_ips=self._extract_networks(compute), private_ips=[], driver=self.connection.driver, image=self._extract_images(compute))

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/opennebula.py OpenNebulaNodeDriver._to_node/original