Skip to main content
Glama

delete_static_route

Remove a static route from a Tier-1 gateway in VMware NSX to manage network routing configurations.

Instructions

Delete a static route from a Tier-1 gateway.

Args: tier1_id: The Tier-1 gateway ID. route_id: The static route ID to delete. target: Optional NSX Manager target name from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tier1_idYes
route_idYes
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of delete_static_route which performs the API deletion.
    def delete_static_route(
        client: NsxClient,
        gateway_id: str,
        route_id: str,
        gateway_type: str = "tier1",
    ) -> dict:
        """Delete a static route from a gateway.
    
        Args:
            client: Authenticated NSX API client.
            gateway_id: Gateway identifier.
            route_id: Static route identifier to delete.
            gateway_type: Either "tier0" or "tier1" (default "tier1").
    
        Returns:
            Dict with deletion status.
        """
        _validate_id(gateway_id)
        _validate_id(route_id)
    
        gw_resource = "tier-0s" if gateway_type == "tier0" else "tier-1s"
        path = (
            f"/policy/api/v1/infra/{gw_resource}/{gateway_id}"
            f"/static-routes/{route_id}"
        )
        client.delete(path)
        _log.info(
            "Deleted static route %s from %s %s",
            route_id,
            gateway_type,
            gateway_id,
        )
        return {
            "deleted": True,
            "gateway_id": gateway_id,
            "gateway_type": gateway_type,
            "route_id": route_id,
        }
  • The MCP tool registration and handler wrapper for delete_static_route.
    def delete_static_route(
        tier1_id: str,
        route_id: str,
        target: str | None = None,
    ) -> str:
        """Delete a static route from a Tier-1 gateway.
    
        Args:
            tier1_id: The Tier-1 gateway ID.
            route_id: The static route ID to delete.
            target: Optional NSX Manager target name from config. Uses default if omitted.
        """
        from vmware_nsx.ops.route_mgmt import delete_static_route as _delete
    
        client = _get_connection(target)
        _delete(client, tier1_id, route_id)
        return f"Static route '{route_id}' deleted from '{tier1_id}'."

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