pe_list_snapshots
Retrieve all snapshots associated with a protection domain on a Prism Element cluster to manage backup and recovery operations.
Instructions
List snapshots for a protection domain on a Prism Element cluster.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pe_host | Yes | Prism Element CVM IP address or hostname | |
| protection_domain | Yes | Name of the protection domain |
Implementation Reference
- Schema definition for pe_list_snapshots tool: defines name, description, and inputSchema with pe_host and protection_domain parameters.
{ "name": "pe_list_snapshots", "description": ( "List snapshots for a protection domain on a Prism Element cluster." ), "inputSchema": { "type": "object", "properties": { "pe_host": { "type": "string", "description": "Prism Element CVM IP address or hostname", }, "protection_domain": { "type": "string", "description": "Name of the protection domain", }, }, "required": ["pe_host", "protection_domain"], }, }, ] # ─── Tool Handlers ──────────────────────────────────────────────────────────── async def handle_pe_get_cluster_info( client: NutanixClient, arguments: dict[str, Any] ) -> dict[str, Any]: - Handler function handle_pe_list_snapshots: calls client.pe_get on protection_domains/{pd_name}/dr_snapshots and returns snapshot details.
async def handle_pe_list_snapshots( client: NutanixClient, arguments: dict[str, Any] ) -> dict[str, Any]: """List snapshots for a protection domain from Prism Element v2 API.""" pe_host = arguments["pe_host"] pd_name = arguments["protection_domain"] result = await client.pe_get( pe_host, f"protection_domains/{pd_name}/dr_snapshots" ) entities = result.get("entities", []) return { "count": len(entities), "snapshots": [ { "snapshotId": s.get("snapshot_id"), "snapshotName": s.get("snapshot_name"), "createdTimestamp": s.get("created_time_stamp_in_usecs"), "expiryTimestamp": s.get("expiry_time_stamp_in_usecs"), "state": s.get("state"), } for s in entities ], } - src/nutanix_mcp/tools/prism_element.py:420-430 (registration)Handler dispatch registration mapping 'pe_list_snapshots' to handle_pe_list_snapshots in PE_HANDLERS dict.
PE_HANDLERS: dict[str, Any] = { "pe_get_cluster_info": handle_pe_get_cluster_info, "pe_list_vms": handle_pe_list_vms, "pe_list_hosts": handle_pe_list_hosts, "pe_list_containers": handle_pe_list_containers, "pe_list_storage_pools": handle_pe_list_storage_pools, "pe_list_disks": handle_pe_list_disks, "pe_list_alerts": handle_pe_list_alerts, "pe_list_protection_domains": handle_pe_list_protection_domains, "pe_list_snapshots": handle_pe_list_snapshots, }