mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 22:41:12 +02:00
feat(gns3-copilot): add get_gns3_server_host utility and integrate into Nornir tools
- Add `get_gns3_server_host()` function to `connector_factory.py` for extracting GNS3 server hostname from controller, config, or default URL
- Export new function in `__init__.py` for public API access
- Replace `os.getenv("GNS3_SERVER_HOST", "127.0.0.1")` calls with `get_gns3_server_host()` in Nornir configuration tools (`config_tools_nornir.py`, `display_tools_nornir.py`)
- Ensures consistent host detection across tools using the same priority logic as `get_gns3_connector`
This commit is contained in:
1 parent
8917ef39c9
commit
cabcf4f1cb
7 files changed
+54
-1390
No files matched your search
@@ -27,7 +27,11 @@ Main functions:
|
||||
- get_gns3_connector_with_llm_config: Factory function to create connector AND retrieve LLM config
|
||||
"""
|
||||
|
||||
from .connector_factory import get_gns3_connector, get_gns3_connector_with_llm_config
|
||||
from .connector_factory import (
|
||||
get_gns3_connector,
|
||||
get_gns3_connector_with_llm_config,
|
||||
get_gns3_server_host,
|
||||
)
|
||||
from .custom_gns3fy import (
|
||||
CONSOLE_TYPES,
|
||||
LINK_TYPES,
|
||||
@@ -93,6 +97,7 @@ __all__ = [
|
||||
"GNS3UpdateDrawingTool",
|
||||
"get_gns3_connector",
|
||||
"get_gns3_connector_with_llm_config",
|
||||
"get_gns3_server_host",
|
||||
"add_file_to_index",
|
||||
"get_file_list",
|
||||
]
|
||||
Reference in new issue
Block a user