list_transport_zones
Retrieve all transport zones in VMware NSX to view their types and associated host switch names for network configuration management.
Instructions
List all transport zones with type and host switch name.
Args: target: Optional NSX Manager target name from config. Uses default if omitted.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- vmware_nsx/ops/inventory.py:156-171 (handler)The core handler function that executes the API call to list transport zones.
def list_transport_zones(client: NsxClient) -> list[dict]: """List all transport zones.""" path = ( "/policy/api/v1/infra/sites/default" "/enforcement-points/default/transport-zones" ) items = client.get_all(path) return [ { "id": _sanitize(tz.get("id", "")), "display_name": _sanitize(tz.get("display_name", "")), "transport_type": tz.get("tz_type", ""), "host_switch_name": _sanitize(tz.get("host_switch_name", "")), } for tz in items ] - mcp_server/server.py:169-179 (registration)MCP tool registration for list_transport_zones.
@mcp.tool() def list_transport_zones(target: str | None = None) -> list[dict]: """List all transport zones with type and host switch name. Args: target: Optional NSX Manager target name from config. Uses default if omitted. """ from vmware_nsx.ops.inventory import list_transport_zones as _list_tzs client = _get_connection(target) return _list_tzs(client)