Get all facts about all nodes
193075
def get_all():
    
    result = {}
    for k,v in nago.extensions.info.node_data.items():
        result[k] = v.get('facts', {})
    return result
1215920
def nodes(self):
        
        if self._nodes is None:
            self._nodes = layout_nodes(self, only_nodes=True)
        return self._nodes
834040
def get_nodes(self, request):
        
        nodes = []
        docsmap_file = os.path.join(settings.SPHINX_DOCS_ROOT, 'docsmap.json')
        if not os.path.exists(docsmap_file):
            return nodes
        with io.open(docsmap_file) as fh:
            docs_map = json.load(fh, encoding='utf-8')

        for counter, items in enumerate(docs_map.items(), 1):
            bits = items[0].split('/')
            if len(bits) == 1 and bits[0] == 'index' or len(bits) == 2 and bits[1] != 'index':
                continue
            node = NavigationNode(
                title=items[1],
                url=reverse_lazy('sphinx-documentation', args=(bits[0],)),
                id=counter,
            )
            nodes.append(node)
        return nodes
1297116
def data(self):
        """"""
        return NodeData(
            self.foo, get_arguments(self.bound_args), self.hints)
1275237
def single_node_facts(node)
      json = get_json("#{@nodes_url}/#{node}/facts", 10)
      return nil if json.include?("error")
      Hash[json.map { |data| [data["name"], data["value"]] }]
    end
764882
def getAllNodeUids(self):
        '''
            
        '''
        ret = set()

        for child in self:
            ret.update(child.getAllNodeUids())

        return ret
350331
def get_nodes(self, request, *args, **kwargs):
        
        # ListSerializerMixin.list returns a serializer object
        return (self.list(request, *args, **kwargs)).data
144715
def _collect_node_profiles(self):
        """"""
        bm_client = self.app.client_manager.rdomanager_oscplugin.baremetal()

        # map of profile capability -> [node_uuid, ...]
        profile_map = collections.defaultdict(list)

        for node in bm_client.node.list(maintenance=False):
            node = bm_client.node.get(node.uuid)
            profiles = re.findall(r'profile:(.*?)(?:,|$)',
                                  node.properties.get('capabilities', ''))
            if not profiles:
                profile_map[None].append(node.uuid)
            for p in profiles:
                profile_map[p].append(node.uuid)

        return dict(profile_map)
228317
def facts_to_yaml(node = @node)
      # Add the header that Puppet needs to treat this as facts. Save the results
      # as a string in the option.
      f = facts(node)
      fact_file = f.to_yaml.split(/\n/)
      fact_file[0] = '--- !ruby/object:Puppet::Node::Facts' if fact_file[0] =~ /^---/
      fact_file.join("\n")
    end
322531
def nodes_dump(self):
        """"""
        self._flush_nodes()
        for (graph, node, branch, turn,tick, extant) in self.sql('nodes_dump'):
            yield (
                self.unpack(graph),
                self.unpack(node),
                branch,
                turn,
                tick,
                bool(extant)
            )
1314783
def get_nodes(graph: BELGraph, node_predicates: NodePredicates) -> Set[BaseEntity]:
    """"""
    return set(filter_nodes(graph, node_predicates=node_predicates))
482107
def collect_info(self):
        
        try:
            info = {}
            res = self._send_request('GET', "/")
            info['server'] = {}
            info['server']['name'] = res['name']
            info['server']['version'] = res['version']
            info['allinfo'] = res
            info['status'] = self.cluster.status()
            info['aliases'] = self.indices.aliases()
            self.info = info
            return True
        except:
            self.info = {}
            return False
1258695
def get_facts(self):
        """"""
        commands = []
        commands.append('show version')
        commands.append('show hostname')
        commands.append('show interfaces')

        result = self.device.run_commands(commands)

        version = result[0]
        hostname = result[1]
        interfaces_dict = result[2]['interfaces']

        uptime = time.time() - version['bootupTimestamp']

        interfaces = [i for i in interfaces_dict.keys() if '.' not in i]
        interfaces = string_parsers.sorted_nicely(interfaces)

        return {
            'hostname': hostname['hostname'],
            'fqdn': hostname['fqdn'],
            'vendor': u'Arista',
            'model': version['modelName'],
            'serial_number': version['serialNumber'],
            'os_version': version['internalVersion'],
            'uptime': int(uptime),
            'interface_list': interfaces,
        }
1105900
void computeNodeInfo(List<EllipseRotated_F64> ellipses , List<Node> cluster ) {

		// create an info object for each member inside of the cluster
		listInfo.reset();
		for (int i = 0; i < cluster.size(); i++) {
			Node n = cluster.get(i);
			EllipseRotated_F64 t = ellipses.get( n.which );

			NodeInfo info = listInfo.grow();
			info.reset();
			info.ellipse = t;
		}

		addEdgesToInfo(cluster);
		pruneNearlyIdenticalAngles();
		findLargestAnglesForAllNodes();
	}
526892
def all_nodes
      collection = connection[nodes_collection]
      collection.find.batch_size(999).projection(_id: 1).map { |k| k[:_id] }
    end
561240
def deep_nodes(self, allnodes=None):
        
        allnodes = (allnodes or [])
        for (node, node_) in ((node, node_) for (node, node_) in\
            self.iteritems() if not node in allnodes):
            allnodes.append(node)
            node_.deep_nodes(allnodes)
        return allnodes
486596
def get_nodes(api_url=None, verify=False, cert=list()):
    
    return utils._make_api_request(api_url, '/nodes', verify, cert)