start_all_nodes
Start all nodes in a specified EVE-NG lab using the configured delay settings to manage network emulation effectively.
Instructions
Start all nodes in a lab.
This tool starts all nodes in the specified lab. Nodes will be started according to their configured delay settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | Yes |
Implementation Reference
- The main MCP tool handler function for 'start_all_nodes'. It takes BulkNodeControlArgs, checks EVE-NG connection, calls the eveng_client helper, and returns formatted TextContent response.@mcp.tool() async def start_all_nodes(arguments: BulkNodeControlArgs) -> list[TextContent]: """ Start all nodes in a lab. This tool starts all nodes in the specified lab. Nodes will be started according to their configured delay settings. """ try: logger.info(f"Starting 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." )] # Start all nodes result = await eveng_client.start_all_nodes(arguments.lab_path) if result.get('status') == 'success': return [TextContent( type="text", text=f"Successfully started all nodes in {arguments.lab_path}\n\n" f"All nodes are now booting up. They may take a few moments to become fully operational." )] else: return [TextContent( type="text", text=f"Failed to start all nodes: {result.get('message', 'Unknown error')}" )] except Exception as e: logger.error(f"Failed to start all nodes: {e}") return [TextContent( type="text", text=f"Failed to start all nodes: {str(e)}" )]
- Pydantic schema/model defining the input parameters for the start_all_nodes tool.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-26 (registration)Registration call for node management tools, which includes the start_all_nodes tool, within the overall tools registration.# Node management tools register_node_tools(mcp, eveng_client)
- eveng_mcp_server/server.py:52-54 (registration)Top-level registration of all tools in the main server.py file, which triggers the chain leading to start_all_nodes registration.# Register tools register_tools(self.mcp, self.eveng_client)
- Helper method in EVENGClientWrapper that wraps the EVE-NG API call to start_all_nodes, with connection check and error handling.async def start_all_nodes(self, lab_path: str) -> Dict[str, Any]: """Start all nodes in a lab.""" await self.ensure_connected() try: result = await asyncio.to_thread(self.api.start_all_nodes, lab_path) self.logger.info("Started all nodes", lab_path=lab_path) return result except Exception as e: self.logger.error("Failed to start all nodes", **log_error(e, {"lab_path": lab_path})) raise EVENGAPIError(f"Failed to start all nodes: {str(e)}")