mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-03 16:45:17 +03:00
Integrate the gns3-copilot AI assistant module to provide intelligent automation and interaction capabilities for GNS3 network emulation. Key components: - AI agent framework with LLM integration (supports Qwen vision model) - GNS3 client library for project topology management - Extensive prompt templates for various network operation scenarios - Tool library for node creation, linking, configuration, and management - Support for English level assessment (A1-C2) and specialized personas - Network drawing and topology visualization tools - Linux device automation via Nornir/Telnetlib - Window controller for UI interaction Features: - Multi-modal AI agent with vision capabilities - Automated network topology deployment and configuration - Interactive node and drawing management - File-based project operations (read, write, list) - Specialized prompts for different scenarios and skill levels - Comprehensive tool set for network device management
79 lines
2.9 KiB
Python
79 lines
2.9 KiB
Python
"""
|
|
FlowNet-Lab Tools Package
|
|
|
|
This package provides various tools for interacting with GNS3 network simulator, including:
|
|
- Device configuration command execution
|
|
- Display command execution
|
|
- Multiple device command execution using Nornir
|
|
- VPCS device configuration using telnetlib3
|
|
- Node and link management
|
|
- Drawing management
|
|
- Notes management
|
|
|
|
Main modules:
|
|
- config_tools_nornir: Multiple device configuration command execution tool using Nornir
|
|
- display_tools_nornir: Multiple device command execution tool using Nornir
|
|
- vpcs_tools_telnetlib3: VPCS device configuration tool using telnetlib3 (concurrent execution)
|
|
- gns3_create_node: GNS3 node creation tool
|
|
- gns3_create_link: GNS3 link creation tool
|
|
- gns3_start_node: GNS3 node startup tool
|
|
- gns3_get_node_temp: GNS3 template retrieval tool
|
|
- gns3_get_drawings: GNS3 drawing retrieval tool
|
|
- gns3_create_drawing: GNS3 drawing creation tool
|
|
- gns3_update_drawing: GNS3 drawing update tool
|
|
- gns3_delete_drawing: GNS3 drawing deletion tool
|
|
- gns3_create_area_drawing: GNS3 area annotation creation tool (ellipse for 2 nodes)
|
|
- gns3_drawing_utils: Drawing utility functions for calculating SVG parameters
|
|
- linux_tools_nornir: Linux Telnet batch command execution tool using Nornir
|
|
- window_controller: Frontend window control and text input tools (async WebSocket-based)
|
|
|
|
Note: GNS3TopologyTool is now available from gns3_client package
|
|
|
|
Author: Guobin Yue
|
|
"""
|
|
|
|
# Import main tool classes
|
|
from .config_tools_nornir import ExecuteMultipleDeviceConfigCommands
|
|
from .display_tools_nornir import ExecuteMultipleDeviceCommands
|
|
from .gns3_create_area_drawing import GNS3CreateAreaDrawingTool
|
|
from .gns3_create_link import GNS3LinkTool
|
|
from .gns3_create_node import GNS3CreateNodeTool
|
|
from .gns3_get_node_temp import GNS3TemplateTool
|
|
from .gns3_start_node import GNS3StartNodeTool, GNS3StartNodeQuickTool
|
|
from .gns3_update_node_name import GNS3UpdateNodeNameTool
|
|
from .linux_tools_nornir import LinuxTelnetBatchTool
|
|
from .vpcs_tools_telnetlib3 import VPCSMultiCommands
|
|
from .window_controller import WindowControllerTool, TextInputTool
|
|
|
|
# Dynamic version management
|
|
try:
|
|
from importlib.metadata import version
|
|
|
|
__version__ = version("gns3-copilot")
|
|
except Exception:
|
|
__version__ = "unknown"
|
|
|
|
__author__ = "Guobin Yue"
|
|
__description__ = "AI-powered network automation assistant for GNS3"
|
|
__url__ = "https://github.com/yueguobin/gns3-copilot"
|
|
|
|
# Export main tool classes
|
|
__all__ = [
|
|
"ExecuteMultipleDeviceConfigCommands",
|
|
"ExecuteMultipleDeviceCommands",
|
|
"VPCSMultiCommands",
|
|
"GNS3CreateNodeTool",
|
|
"GNS3LinkTool",
|
|
"GNS3StartNodeTool",
|
|
"GNS3StartNodeQuickTool",
|
|
"GNS3UpdateNodeNameTool",
|
|
"GNS3TemplateTool",
|
|
"GNS3CreateAreaDrawingTool",
|
|
"LinuxTelnetBatchTool",
|
|
"WindowControllerTool",
|
|
"TextInputTool",
|
|
]
|
|
|
|
# Package initialization message
|
|
# print(f"FlowNet-Lab Tools package loaded (version {__version__})")
|