Skip to main content
Glama

get_logical_port_status

Check operational status including admin state, link state, and attachment for VMware NSX logical ports to monitor network connectivity and configuration.

Instructions

Check logical port operational status (admin state, link state, attachment).

Args: port_id: The logical port ID. target: Optional NSX Manager target name from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
port_idYes
targetNo

Implementation Reference

  • MCP tool handler that calls the underlying vmware_nsx operation for getting logical port status.
    def get_logical_port_status(port_id: str, target: str | None = None) -> dict:
        """Check logical port operational status (admin state, link state, attachment).
    
        Args:
            port_id: The logical port ID.
            target: Optional NSX Manager target name from config. Uses default if omitted.
        """
        from vmware_nsx.ops.troubleshoot import get_logical_port_status as _get_port
    
        client = _get_connection(target)
        return _get_port(client, port_id)
  • The core logic implementation that interacts with the NSX client to retrieve logical port status.
    def get_logical_port_status(client: NsxClient, segment_id: str) -> dict:
        """Get port status and realized state for all ports on a segment.
    
        Retrieves ports from the Policy API and their realized operational
        state from the Management API.
    
        Args:
            client: Authenticated NSX API client.
            segment_id: Segment identifier.
    
        Returns:
            Dict with segment info, port list, and per-port realized state.
        """
        # Get segment info
        seg = client.get(f"/policy/api/v1/infra/segments/{segment_id}")
    
        # Get ports on this segment

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