Return the details of the node identified by the specified name

    CLI Examples::

        salt '*' kubernetes.node name='minikube'
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
800487
def get_node(conn, name):
    '''
    
    '''
    datacenter_id = get_datacenter_id()

    for item in conn.list_servers(datacenter_id)['items']:
        if item['properties']['name'] == name:
            node = {'id': item['id']}
            node.update(item['properties'])
            return node
720284
public Node getNode(String name) {
    Node n = hostnameToNodeMap.get(name);

    // it's ok if multiple threads try to resolve the same host at the same time
    // the assumption is that resolve() will return a canonical node object and
    // the put operation is therefore idempotent
    if (n == null) {
      n = resolveAndGetNode(name);
      hostnameToNodeMap.put(name, n);
      // Make an entry for the node at the max level in the cache
      nodesAtMaxLevel.add(
        getParentNode(n, NetworkTopology.DEFAULT_HOST_LEVEL - 1));
    }

    return n;
  }
122857
def get(self, key, name=None):
        """"""
        if name is None:
            self.nodename = self.local_name
            self.nodeid = self.local_id
        else:
            self.logger.debug('Replacing nodename "{0}" with "{1}"'.format(self.nodename, name))
            self.nodename = name
            self.find_name()
        return get_value(self.stats(), fix_key(key))
519177
def server_by_name(self, name):
        '''
        
        '''
        return self.server_show_libcloud(
            self.server_list().get(name, {}).get('id', '')
        )
962627
def send(node_name):
    
    my_data = nago.core.get_my_info()
    if not node_name:
        node_name = nago.settings.get('server')
    node = nago.core.get_node(node_name)
    json_params = {}
    json_params['node_name'] = node_name
    json_params['key'] = "node_info"
    for k, v in my_data.items():
        nago.core.log("sending %s to %s" % (k, node['host_name']), level="notice")
        json_params[k] = v
    return node.send_command('info', 'post', node_name=node.token, key="node_info", **my_data)
1190257
def get_network(name)
      params = {
          'command' => 'listNetworks'
      }
      json = send_request(params)

      networks = json['network']
      return nil unless networks

      networks.each { |n|
        if name.is_uuid? then
          return n if n['id'] == name
        else
          return n if n['name'] == name
        end
      }
      nil
    end
909529
def node
      return @node unless @node.nil? || @node.empty?
      return facts['name'] if facts.key?('name')
      return facts['values']['fqdn'] if facts.key?('values') && facts['values'].key?('fqdn')
      ''
    end
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))
507429
def inspect_node(node):
    
    node_information = {}
    ssh = node.connect()
    if not ssh:
        log.error("Unable to connect to node %s", node.name)
        return

    (_in, _out, _err) = ssh.exec_command("(type >& /dev/null -a srun && echo slurm) \
                      || (type >& /dev/null -a qconf && echo sge) \
                      || (type >& /dev/null -a pbsnodes && echo pbs) \
                      || echo UNKNOWN")
    node_information['type'] = _out.read().strip()

    (_in, _out, _err) = ssh.exec_command("arch")
    node_information['architecture'] = _out.read().strip()

    if node_information['type'] == 'slurm':
        inspect_slurm_cluster(ssh, node_information)
    elif node_information['type'] == 'sge':
        inspect_sge_cluster(ssh, node_information)
    ssh.close()
    return node_information
422353
def show_instance(name, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The show_instance action must be called with -a or --action.'
        )

    nodes = list_nodes_full()
    # Find under which cloud service the name is listed, if any
    if name not in nodes:
        return {}
    if 'name' not in nodes[name]:
        nodes[name]['name'] = nodes[name]['id']
    try:
        __utils__['cloud.cache_node'](nodes[name], __active_provider_name__, __opts__)
    except TypeError:
        log.warning('Unable to show cache node data; this may be because the node has been deleted')
    return nodes[name]
100361
def get(self, name):
        
        path = self._get_cluster_storage_path(name)

        try:
            with open(path, 'r') as storage:
                cluster = self.load(storage)
                # Compatibility with previous version of Node
                for node in sum(cluster.nodes.values(), []):
                    if not hasattr(node, 'ips'):
                        log.debug("Monkey patching old version of `Node` class: %s", node.name)
                        node.ips = [node.ip_public, node.ip_private]
                        node.preferred_ip = None
                cluster.storage_file = path
                return cluster
        except IOError as ex:
            raise ClusterNotFound("Error accessing storage file %s: %s" % (path, ex))
112569
def get_node(self, name, memory=False, binary=False):
        
        return self._api_get(
            url='/api/nodes/{0}'.format(name),
            params=dict(
                binary=binary,
                memory=memory,
            ),
        )
964851
def get_node(conn, name):
    '''
    
    '''
    nodes = conn.list_nodes()
    for node in nodes:
        if node.name == name:
            __utils__['cloud.cache_node'](salt.utils.data.simple_types_filter(node.__dict__), __active_provider_name__, __opts__)
            return node
200388
def show_namespace(name, **kwargs):
    '''
    
    '''
    cfg = _setup_conn(**kwargs)
    try:
        api_instance = kubernetes.client.CoreV1Api()
        api_response = api_instance.read_namespace(name)

        return api_response.to_dict()
    except (ApiException, HTTPError) as exc:
        if isinstance(exc, ApiException) and exc.status == 404:
            return None
        else:
            log.exception(
                'Exception when calling '
                'CoreV1Api->read_namespace'
            )
            raise CommandExecutionError(exc)
    finally:
        _cleanup(**cfg)
487569
def visit_Name(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        return node.id
998193
def clear_node(name):
    '''
    
    '''
    ret = {'name': name,
           'changes': {},
           'result': None,
           'comment': ''}

    if __opts__['test']:
        ret['comment'] = 'Clearing local node statistics'
        return ret

    __salt__['trafficserver.clear_node']()

    ret['result'] = True
    ret['comment'] = 'Cleared local node statistics'
    return ret