wipe_all_nodes
Reset all nodes in an EVE-NG lab to factory state by deleting user configurations and rebuilding from images.
Instructions
Wipe all nodes in a lab (reset to factory state).
This tool wipes all nodes in the lab, deleting all user configuration including startup-configs, VLANs, and other settings. The next start will rebuild all nodes from their selected images.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | Yes |
Implementation Reference
- MCP tool handler for wipe_all_nodes: validates input, checks EVE-NG connection, calls client.wipe_all_nodes, formats success/error response.@mcp.tool() async def wipe_all_nodes(arguments: BulkNodeControlArgs) -> list[TextContent]: """ Wipe all nodes in a lab (reset to factory state). This tool wipes all nodes in the lab, deleting all user configuration including startup-configs, VLANs, and other settings. The next start will rebuild all nodes from their selected images. """ try: logger.info(f"Wiping all nodes in {arguments.lab_path}") if not eveng_client.is_connected: return [TextContent( type="text", text="Not connected to EVE-NG server. Use connect_eveng_server tool first." )] # Wipe all nodes result = await eveng_client.wipe_all_nodes(arguments.lab_path) if result.get('status') == 'success': return [TextContent( type="text", text=f"Successfully wiped all nodes in {arguments.lab_path}\n\n" f"⚠️ All user configurations have been deleted. All nodes have been reset to factory state.\n" f"The next start will rebuild all nodes from their selected images." )] else: return [TextContent( type="text", text=f"Failed to wipe all nodes: {result.get('message', 'Unknown error')}" )] except Exception as e: logger.error(f"Failed to wipe all nodes: {e}") return [TextContent( type="text", text=f"Failed to wipe all nodes: {str(e)}" )]
- Pydantic schema defining the input arguments for wipe_all_nodes (lab_path). Shared with other bulk operations.class BulkNodeControlArgs(BaseModel): """Arguments for bulk node operations.""" lab_path: str = Field(description="Full path to the lab (e.g., /lab_name.unl)")
- eveng_mcp_server/tools/__init__.py:24-25 (registration)Registration call for node management tools (including wipe_all_nodes) within the central register_tools function.# Node management tools register_node_tools(mcp, eveng_client)
- Core client wrapper method that performs the wipe_all_nodes operation by calling the EVE-NG API.async def wipe_all_nodes(self, lab_path: str) -> Dict[str, Any]: """Wipe all nodes in a lab (reset to factory state).""" await self.ensure_connected() try: result = await asyncio.to_thread(self.api.wipe_all_nodes, lab_path) self.logger.info("Wiped all nodes", lab_path=lab_path) return result except Exception as e: self.logger.error("Failed to wipe all nodes", **log_error(e, {"lab_path": lab_path})) raise EVENGAPIError(f"Failed to wipe all nodes: {str(e)}")
- eveng_mcp_server/server.py:53-53 (registration)Top-level call to register all tools (including wipe_all_nodes) in the MCP server initialization.register_tools(self.mcp, self.eveng_client)