'Generates the :class:`Node` class.'

def _to_node(self, vm, driver):

    identifier = vm.findtext('id')
    name = vm.findtext('label')
    state = AbiquoResponse.NODE_STATE_MAP[vm.findtext('state')]
    link_image = get_href(vm, 'virtualmachinetemplate')
    link_hdr = {'Accept': self.VMTPL_MIME_TYPE}
    image_element = self.connection.request(link_image, headers=link_hdr).object
    repo_link = get_href(image_element, 'datacenterrepository')
    image = self._to_nodeimage(image_element, self, repo_link)
    private_ips = []
    public_ips = []
    nics_hdr = {'Accept': self.NICS_MIME_TYPE}
    nics_element = self.connection.request(get_href(vm, 'nics'), headers=nics_hdr).object
    for nic in nics_element.findall('nic'):
        ip = nic.findtext('ip')
        for link in nic.findall('link'):
            rel = link.attrib['rel']
            if (rel == 'privatenetwork'):
                private_ips.append(ip)
            elif (rel in ['publicnetwork', 'externalnetwork', 'unmanagednetwork']):
                public_ips.append(ip)
    extra = {'uri_id': get_href(vm, 'edit')}
    if (vm.find('vdrpIp') is not None):
        extra['vdrp_ip'] = vm.findtext('vdrpIP')
        extra['vdrp_port'] = vm.findtext('vdrpPort')
    return Node(identifier, name, state, public_ips, private_ips, driver, image=image, extra=extra)
