Skip to main content
Glama

list_transport_nodes

Retrieve transport nodes with their type and status for VMware NSX network management and monitoring.

Instructions

List all transport nodes with type and status.

Args: target: Optional NSX Manager target name from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function for `list_transport_nodes` which handles the request and calls the underlying operation.
    def list_transport_nodes(target: str | None = None) -> list[dict]:
        """List all transport nodes with type and status.
    
        Args:
            target: Optional NSX Manager target name from config. Uses default if omitted.
        """
        from vmware_nsx.ops.inventory import list_transport_nodes as _list_tns
    
        client = _get_connection(target)
        return _list_tns(client)
  • The core implementation of `list_transport_nodes` that fetches and processes data from the NSX API.
    def list_transport_nodes(client: NsxClient) -> list[dict]:
        """List all transport nodes (ESXi hosts, Edge nodes)."""
        items = client.get_all("/api/v1/transport-nodes")
        result: list[dict] = []
        for n in items:
            ip_addresses: list[str] = []
            host_switch_spec = n.get("host_switch_spec")
            if host_switch_spec:
                switches = host_switch_spec.get("host_switches", [])
                if switches:
                    ip_spec = switches[0].get("ip_assignment_spec", {})
                    ip_addresses = ip_spec.get("ip_list", [])
    
            result.append(
                {
                    "id": _sanitize(n.get("id", "")),
                    "display_name": _sanitize(n.get("display_name", "")),
                    "node_type": n.get("resource_type", ""),
                    "ip_addresses": ip_addresses,
                    "maintenance_mode": n.get("maintenance_mode", "DISABLED"),
                }
            )
        return result
    
    
    # ---------------------------------------------------------------------------
    # Edge Clusters

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zw008/VMware-NSX'

If you have feedback or need assistance with the MCP directory API, please join our Discord server