Returns info for a Node

    :param api_url: Base PuppetDB API url
    :param node_name: Name of node
485152
def get_node(api_url=None, node_name=None, verify=False, cert=list()):
    
    return utils._make_api_request(api_url, '/nodes/{0}'.format(node_name), verify, cert)
9627
function(hostname, callback) {
  get_nodes(function(err,nodes) {
    if (err) return callback(err);

    var n = nodes.filter(function(node) {
      return node.name === hostname;
    });

    callback(null,(n.length === 1) ? n[0].ip_address : null);
  });
}
207385
async def node(self, node_id: str) -> dict:
        """"""
        return await self._request('get', node_id, base_url=NODE_URL_SCAFFOLD)
700384
def _get_url_node(parser, bits):
    
    viewname = parser.compile_filter(bits[1])
    args = []
    kwargs = {}
    bits = bits[2:]

    if len(bits):
        kwarg_re = re.compile(r"(?:(\w+)=)?(.+)")
        for bit in bits:
            match = kwarg_re.match(bit)
            if not match:
                raise TemplateSyntaxError("Malformed arguments to url tag")
            name, value = match.groups()
            if name:
                kwargs[name] = parser.compile_filter(value)
            else:
                args.append(parser.compile_filter(value))

    return URLNode(viewname, args, kwargs, asvar=None)
408855
def get(self, name: str) -> Optional[ListEntry]:
        
        parts = name.split(self._delimiter)
        try:
            node = self._find(self._root, *parts)
        except KeyError:
            return None
        else:
            marked = self._marked.get(name)
            return ListEntry(name, node.exists, marked, bool(node.children))
527881
def get_api_v1_info(api_prefix):
    
    websocket_root = base_ws_uri() + EVENTS_ENDPOINT
    docs_url = [
        'https://docs.bigchaindb.com/projects/server/en/v',
        version.__version__,
        '/http-client-server-api.html',
    ]

    return {
        'docs': ''.join(docs_url),
        'transactions': '{}transactions/'.format(api_prefix),
        'blocks': '{}blocks/'.format(api_prefix),
        'assets': '{}assets/'.format(api_prefix),
        'outputs': '{}outputs/'.format(api_prefix),
        'streams': websocket_root,
        'metadata': '{}metadata/'.format(api_prefix),
        'validators': '{}validators'.format(api_prefix),
    }
1120668
def api_url(self):
        ''''''
        return pathjoin(Request.path, self.id, url=self.bin.api_url)
713663
def node_received_infos(node_id):
    
    exp = Experiment(session)

    # get the parameters
    info_type = request_parameter(
        parameter="info_type", parameter_type="known_class", default=models.Info
    )
    if type(info_type) == Response:
        return info_type

    # check the node exists
    node = models.Node.query.get(node_id)
    if node is None:
        return error_response(
            error_type="/node/infos, node {} does not exist".format(node_id)
        )

    # execute the request:
    infos = node.received_infos(type=info_type)

    try:
        # ping the experiment
        exp.info_get_request(node=node, infos=infos)

        session.commit()
    except Exception:
        return error_response(
            error_type="info_get_request error",
            status=403,
            participant=node.participant,
        )

    return success_response(infos=[i.__json__() for i in infos])
1011161
def get_node(name, merged=False):
    """"""
    if merged:
        node_path = os.path.join("data_bags", "node", name.replace('.', '_') + ".json")
    else:
        node_path = os.path.join("nodes", name + ".json")
    if os.path.exists(node_path):
        # Read node.json
        with open(node_path, 'r') as f:
            try:
                node = json.loads(f.read())
            except ValueError as e:
                msg = 'LittleChef found the following error in'
                msg += ' "{0}":\n                {1}'.format(node_path, str(e))
                abort(msg)
    else:
        print "Creating new node file '{0}.json'".format(name)
        node = {'run_list': []}
    # Add node name so that we can tell to which node it is
    node['name'] = name
    if not node.get('chef_environment'):
        node['chef_environment'] = '_default'
    return node
614959
def nodes_az(c_obj):
    """"""
    az_nodes = []
    try:
        az_nodes = c_obj.list_nodes()
    except BaseHTTPError as e:
        abort_err("\r HTTP Error with Azure: {}".format(e))
    az_nodes = adj_nodes_az(az_nodes)
    return az_nodes
948944
def get_call_name(self, node):
        
        if isinstance(node.func, ast.Attribute):
            return node.func.attr
        elif isinstance(node.func, ast.Name):
            return node.func.id
700205
def get_node(self, node_name):
        """"""
        for node in self.nodes:
            if node.__name__ == node_name:
                return node
1175771
def server_info(self):
        
        response = self._post(self.apiurl + "/v2/server/info", data={'apikey': self.apikey})

        return self._raise_or_extract(response)
186659
def node(name, **kwargs):
    '''
    
    '''
    cfg = _setup_conn(**kwargs)
    try:
        api_instance = kubernetes.client.CoreV1Api()
        api_response = api_instance.list_node()
    except (ApiException, HTTPError) as exc:
        if isinstance(exc, ApiException) and exc.status == 404:
            return None
        else:
            log.exception('Exception when calling CoreV1Api->list_node')
            raise CommandExecutionError(exc)
    finally:
        _cleanup(**cfg)

    for k8s_node in api_response.items:
        if k8s_node.metadata.name == name:
            return k8s_node.to_dict()

    return None
107492
def get_node_by_name(self, nodename):
        
        for kind, nodes in self.nodes.items():
            for node in nodes:
                if node.name == nodename:
                    return node
        else:
            raise NodeNotFound(
                "Node `{0}` not found in cluster `{1}`"
                .format(nodename, self.name))
95410
def find_node_by_id(self, node_list_pyxb, node_id):
        
        for node_pyxb in node_list_pyxb.node:
            # if node_pyxb.baseURL == base_url:
            if d1_common.xml.get_req_val(node_pyxb.identifier) == node_id:
                return node_pyxb
1073611
def capture_dash_in_url_name(self, node):
        
        for keyword in node.keywords:
            if keyword.arg == 'name' and '-' in keyword.value.s:
                return DJ04(
                    lineno=node.lineno,
                    col=node.col_offset,
                )