def _to_nodes(self, objs):

        # Get the IP addresses for the Linodes
        nodes = {}
        batch = []
        for o in objs:
            lid = o["LINODEID"]
            nodes[lid] = n = Node(id=lid, name=o["LABEL"], public_ip=[],
                private_ip=[], state=self.LINODE_STATES[o["STATUS"]],
                driver=self.connection.driver)
            n.extra = copy(o)
            n.extra["PLANID"] = self._linode_plan_ids.get(o.get("TOTALRAM"))
            batch.append({"api_action": "linode.ip.list", "LinodeID": lid})

        # Avoid batch limitation
        ip_answers = []
        args = [iter(batch)] * 25
        izip_longest = getattr(itertools, 'izip_longest', _izip_longest)
        for twenty_five in izip_longest(*args):
            twenty_five = [q for q in twenty_five if q]
            params = { "api_action": "batch",
                "api_requestArray": json.dumps(twenty_five) }
            req = self.connection.request(LINODE_ROOT, params=params)
            if not req.success() or len(req.objects) == 0:
                return None
            ip_answers.extend(req.objects)

        # Add the returned IPs to the nodes and return them
        for ip_list in ip_answers:
            for ip in ip_list:
                lid = ip["LINODEID"]
                which = nodes[lid].public_ip if ip["ISPUBLIC"] == 1 else \
                    nodes[lid].private_ip
                which.append(ip["IPADDRESS"])
        return nodes.values()
Convert returned JSON Linodes into Node instances
dataset/ETHPy150Open cloudkick/libcloud/libcloud/compute/drivers/linode.py/LinodeNodeDriver._to_nodes