Compare commits

...
4584 Commits
Author SHA1 Message Date
Jeremy Grossmann 111a4b756c Merge pull request #3061 from yueguobin/fix/remove-ace-route-dump
Remove leftover debug print dumping all routes on ACE creation
2026-11-05 17:26:11 +01:00
Jeremy Grossmann c80bea5279 Merge pull request #3060 from yueguobin/feat/user-privileges-endpoint
Add endpoint returning the current user's privileges
2026-11-05 17:25:29 +01:00
YueGuobin 425d91c085 fix: remove leftover debug print dumping all routes on ACE creation
Creating an ACE printed every route path of the application to stdout.
The debug loop was left behind when the route iteration moved to
_iter_route_paths() in 021991410.
2026-11-05 23:13:42 +08:00
YueGuobin 3ddfe0254d api: add endpoint returning the current user's privileges
Add GET /access/users/me/privileges. It returns the effective privileges
of the logged in user, flattened across all roles assigned to the user
(directly or through group membership). Superadmins get the full
privilege list.

This gives clients a way to render their UI based on permissions. The
server stays the authority for permission checks: a privilege in the
list can still be denied on a specific resource path.
2026-11-05 23:05:28 +08:00
Jeremy Grossmann 94077b4884 Merge pull request #3051 from GNS3/arm64-qemu-support
Enhance aarch64 support with UEFI and improved console options
2026-11-05 14:06:29 +01:00
Jeremy Grossmann 2e5e761c3e Merge pull request #3057 from GNS3/dependabot/pip/3.1/langgraph-gte-1.2.19
Update langgraph requirement from >=1.0.9 to >=1.2.19
2026-11-05 14:04:49 +01:00
Jeremy Grossmann ac54b6d717 Merge branch '3.1' into dependabot/pip/3.1/langgraph-gte-1.2.19 2026-11-05 13:21:28 +01:00
Jeremy Grossmann ddd1f61b6a Merge pull request #3056 from GNS3/dependabot/pip/3.1/python-dotenv-gte-1.2.4
Update python-dotenv requirement from >=1.2.1 to >=1.2.4
2026-11-05 13:20:27 +01:00
Jeremy Grossmann 0a04d084cc Merge pull request #3055 from GNS3/dependabot/pip/3.1/langchain-core-gte-1.7.3
Update langchain-core requirement from >=1.2.16 to >=1.7.3
2026-11-05 13:20:01 +01:00
Jeremy Grossmann 0331cfd2f3 Merge pull request #3054 from GNS3/dependabot/pip/3.1/langchain-openai-gte-1.7.3
Update langchain-openai requirement from >=1.7.2 to >=1.7.3
2026-11-05 13:19:44 +01:00
Jeremy Grossmann d6e70da9ff Merge pull request #3053 from GNS3/dependabot/pip/3.1/langgraph-checkpoint-sqlite-gte-3.1.3
Update langgraph-checkpoint-sqlite requirement from >=3.1.2 to >=3.1.3
2026-11-05 13:19:29 +01:00
Jeremy Grossmann 5943887031 Merge pull request #3058 from GNS3/dependabot/pip/3.1/langchain-xai-gte-1.3.0
Update langchain-xai requirement from >=1.2.2 to >=1.3.0
2026-11-05 13:19:06 +01:00
Jeremy Grossmann b539793281 Merge pull request #3059 from yueguobin/fix/duplicate-project-created-by
fix: attribute duplicated project to the user who duplicated it
2026-11-05 12:49:08 +01:00
dependabot[bot] c327055703 Update langchain-xai requirement from >=1.2.2 to >=1.3.0
Updates the requirements on [langchain-xai](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-xai==1.2.2...langchain-xai==1.3.0)

---
updated-dependencies:
- dependency-name: langchain-xai
  dependency-version: 1.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 11:26:06 +00:00
dependabot[bot] 9429dad9d0 Update langgraph requirement from >=1.0.9 to >=1.2.19
Updates the requirements on [langgraph](https://github.com/langchain-ai/langgraph) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/1.0.9...1.2.19)

---
updated-dependencies:
- dependency-name: langgraph
  dependency-version: 1.2.19
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 11:23:29 +00:00
dependabot[bot] 2480fb669e Update python-dotenv requirement from >=1.2.1 to >=1.2.4
Updates the requirements on [python-dotenv](https://github.com/theskumar/python-dotenv) to permit the latest version.
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v1.2.1...v1.2.4)

---
updated-dependencies:
- dependency-name: python-dotenv
  dependency-version: 1.2.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 11:23:18 +00:00
dependabot[bot] 70155eac83 Update langchain-core requirement from >=1.2.16 to >=1.7.3
Updates the requirements on [langchain-core](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.16...langchain-core==1.7.3)

---
updated-dependencies:
- dependency-name: langchain-core
  dependency-version: 1.7.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 11:23:13 +00:00
dependabot[bot] e7b901de30 Update langchain-openai requirement from >=1.7.2 to >=1.7.3
Updates the requirements on [langchain-openai](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==1.7.2...langchain-openai==1.7.3)

---
updated-dependencies:
- dependency-name: langchain-openai
  dependency-version: 1.7.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 11:22:59 +00:00
dependabot[bot] 6a7c9e4417 Update langgraph-checkpoint-sqlite requirement from >=3.1.2 to >=3.1.3
Updates the requirements on [langgraph-checkpoint-sqlite](https://github.com/langchain-ai/langgraph) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/checkpointsqlite==3.1.2...checkpointsqlite==3.1.3)

---
updated-dependencies:
- dependency-name: langgraph-checkpoint-sqlite
  dependency-version: 3.1.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 11:22:40 +00:00
YueGuobin 517b0b0d85 fix: attribute duplicated project to the user who duplicated it
duplicate() kept the original author in created_by. The project list
filters on created_by, so a non-admin user could not see the copy they
just made. Pass the caller through both duplication paths, the same way
import already does since #3017.
2026-11-05 19:22:27 +08:00
Jeremy Grossmann 7230e86c15 Merge pull request #3052 from yueguobin/fix/legacy-project-list-visibility
fix: keep legacy projects visible to non-admin users
2026-11-05 09:49:00 +01:00
YueGuobin 70ef92b55f fix: keep legacy projects visible to non-admin users
Projects created before GNS3 3.1 have no created_by field. The project
list filtered them out for every non-superadmin user, so all old
projects disappeared from the list after an upgrade.

Fall back to the pre-3.1 ACE-only visibility rule when created_by is
not set. Projects owned by another user stay hidden.
2026-11-05 15:42:51 +08:00
grossmj 5e11378a03 feat(qemu): improve UEFI boot configuration and add KVM acceleration warning 2026-11-04 13:07:21 +07:00
Jeremy Grossmann bbb1dc4f80 Merge pull request #3050 from yueguobin/fix/graceful-shutdown-timeout
Bound graceful shutdown and stop notification WebSockets on exit
2026-11-04 06:40:42 +01:00
YueGuobin a56fce4c36 fix: do not monkeypatch attributes on Starlette State in tests
pytest 9.2 reads the old value of a monkeypatched attribute from the
instance __dict__. Starlette State keeps attributes in an internal
dict, so the old value looks unset and the teardown deletes the
attribute for the rest of the test session. The first test that
touches app.state.exiting passes but removes it, and every later
monkeypatch.setattr on it fails with AttributeError.

Use plain assignments instead.
2026-11-04 09:22:15 +08:00
grossmj 0a88127e33 feat(qemu): enhance aarch64 support with UEFI and improved console options 2026-11-04 00:31:52 +07:00
Guobin Yue 8f763c0439 Merge branch '3.1' into fix/graceful-shutdown-timeout 2026-11-04 00:59:22 +08:00
Jeremy Grossmann 9bcffab41e Merge pull request #3049 from yueguobin/copilot-tool-name-align
copilot: reuse MCP tools, align tool names, and manage the step budget
2026-11-03 17:37:42 +01:00
YueGuobin 52c19002f2 fix: bound graceful shutdown and stop notification WebSockets on exit
By default uvicorn waits for open connections forever. A long-lived
streaming response keeps the server waiting after Ctrl+C. One common
case is the MCP Streamable HTTP transport: the client opens a
standalone GET request and the server answers with an SSE stream
(not the old SSE transport). A second Ctrl+C sets force_exit. Uvicorn
then skips the lifespan shutdown, so project and controller cleanup
does not run.

Add timeout_graceful_shutdown. After the timeout uvicorn cancels the
remaining tasks and runs the lifespan shutdown. Also make the four
notification WebSocket handlers stop when app.state.exiting is set.
The HTTP stream handlers already do this.
2026-11-04 00:32:34 +08:00
YueGuobin 42e0a5dd5b fix(copilot): bound LLM requests with a timeout and one retry
A field log showed one request stayed silent for 604s (the OpenAI SDK
default timeout), then the SDK retried on a fresh connection and got
200 OK in under a second. The abort signal did not cancel the in-flight
HTTP call, so the turn could look hung for ten minutes.

- set timeout (default 120s, request_timeout in the LLM config wins),
  max_retries=1 and stream_usage=True for the providers that accept them
  (openai, deepseek, anthropic, xai). ollama and google-genai reject
  these kwargs, so they keep the old behavior.
- log the elapsed time of each LLM call. A slow first token or an SDK
  retry now shows up in the log line.
- add request_timeout to the LLM config schemas and docs (JSON column,
  no migration).
- tests: cover the defaults, the override, invalid values, provider
  filtering and the title model.
2026-11-03 23:57:07 +08:00
YueGuobin f2f42c4817 docs(mcp): document show_filters_icon on link tools
The server link schema has show_filters_icon (default true) and the PUT
passes it through, but the MCP tool docs did not mention it. The old
copilot packet filter tool always set it to false to hide the filter icon
during fault injection; after the move to link_update the icon stayed
visible because the model had no way to know the field exists.

- link_update: add show_filters_icon to the supported kwargs
- link_list: add show_filters_icon to the available response fields
2026-11-03 23:19:00 +08:00
YueGuobin 5a294461e8 fix(copilot): make the step budget real, configurable and visible
The graph passed remaining_steps=20 (50 for injection) in the run inputs.
RemainingSteps is a LangGraph managed value derived from recursion_limit,
so the input was ignored and the real budget was 25 (100 for injection).
No one could see those numbers, and a turn that hit the cap ended on a
bare tool result with no explanation.

- Remove the dead remaining_steps input.
- Add resolve_recursion_limit(): max_steps from the LLM model config wins;
  otherwise 25 teaching_assistant, 50 lab_automation_assistant, 100
  troubleshooting_injection.
- When fewer than 4 steps remain after a tool run, route to the new
  budget_wrapup node. The next llm_call binds no tools and gets a wrap-up
  instruction, so the turn ends with a short summary of what was done and
  what remains.
- should_continue skips the title call after a wrap-up (no step left).
- budget_exhausted is reset at the start of every user turn.
- Add max_steps to the LLM config schemas. The config is a JSON column,
  so no migration is needed.
- Tests: 16 new tests cover the resolver, the routing, the tool-free
  wrap-up call and the removed input. Docs updated.
2026-11-03 23:16:26 +08:00
YueGuobin e8462507a5 feat(copilot): surface console, snapshot, capture and marker tools per mode
The bridge made 49 project-scoped MCP tools available, but the mode
tables still mirrored the old copilot capability set. Expand them:

- lab_automation_assistant: node_console_exec (raw console for nodes
  without a device_type tag), node_list, snapshot_list/create/delete/
  restore
- teaching_assistant: node_list/node_get, link_list, link_marker
  (read-only diagnostics plus traffic-insight markers)
- troubleshooting_injection: link_capture_start/stop/download and
  marker_definition (inject -> capture -> verify loop)

Also fix the tools_by_name registry: it was built from the lab and
injection tables only, which worked while teaching was a strict subset
of lab. Teaching-only tools would have raised KeyError in tool_node
when the LLM called them; the registry now unions all three mode
tables. A new test pins each mode's exact toolset, checks that no
administration tool leaks in, and asserts every referenced name is
resolvable.
2026-11-03 22:57:09 +08:00
YueGuobin 6a4cbe39c1 refactor(copilot): reuse MCP tools via a bridge; extract shared device runners
The copilot and the MCP service maintained two parallel wrapper layers
(LangChain BaseTool classes vs @mcp.tool() functions) over the same
handlers in gns3_client/api_handlers.py. Descriptions and parameters
drifted apart (compute_id and link_type were missing on the copilot
side). This makes the MCP registration the single source of truth and
removes the duplicated wrappers.

tools_v2/mcp_bridge.py adapts the MCP server's tool registration into
LangChain tools: names, descriptions and argument schemas come from the
MCP tools. The pool is filtered to project-scoped tools
(MCP_ALLOWED_TOOLS) because the copilot runs inside one open project —
project management, compute/appliance/image administration and server
info tools stay out. The bridge carries the copilot's request JWT into
the MCP contextvars (username/token_version decoded from the token so
ticket-minting tools work) and runs the async MCP functions from the
copilot's sync tool node on either thread flavor.

Mode toolsets (teaching / lab_automation / troubleshooting_injection)
are now composed from adapted MCP tools plus a few copilot-native ones
that add value the MCP versions lack: link_create (port-name
resolution), wait_seconds, packet_analysis(+skills), and the topology
reader. Eight orphaned LangChain wrappers are deleted.

The device command tools had the dependency inverted (the MCP handlers
instantiated the copilot LangChain classes and round-tripped through
JSON strings). The Nornir/Netmiko classes moved verbatim (git mv) into
the shared layer as plain runners — DeviceConfigCommandRunner,
DeviceShowCommandRunner, VpcsCommandRunner — with _run(json_string)
becoming run(params, gns3_ctx). The optional Jinja2 template rendering
moved from the MCP handlers into the runners (and into
utils/device_configs.render_device_template), so both entry paths get
it; the MCP handlers are now pure delegation. This also drops the
json.dumps/json.loads detour the MCP path used to take.

test_tool_params consistency gate extended: a handler that forwards the
whole params dict to a callee is a wildcard (same rationale as the
params.items() case) — the per-key check cannot see through delegation.
2026-11-03 22:04:57 +08:00
YueGuobin 9c27a293d0 refactor(copilot): align tool names with MCP convention
Rename five copilot tools to the MCP <object>_<verb> naming so both
agent surfaces expose the same names:

- create_gns3_node              -> node_create
- create_gns3_link              -> link_create
- create_gns3_text_drawing      -> drawing_create_text
- create_gns3_rectangle_drawing -> drawing_create_rectangle
- create_gns3_ellipse_drawing   -> drawing_create_ellipse

Also close two capability gaps found during the comparison:

- node_create: accept optional per-node compute_id (passed through to
  the shared handler; before, every node landed on local)
- link_create: accept optional per-link link_type (ethernet default,
  serial supported; before, serial links were impossible)

All tools keep calling the same shared handlers in
gns3_client/api_handlers.py, so the rename has no effect on execution
semantics. Old names appeared nowhere else (prompts, tests, mode tool
lists are clean); docs updated accordingly.
2026-11-03 15:30:44 +08:00
Jeremy Grossmann bfe25641fc Merge pull request #3048 from yueguobin/mcp-console-exec-websocat
feat(mcp): node_console_exec — run console commands in one tool call
2026-11-03 06:22:26 +01:00
YueGuobin c63b2e3e14 docs(mcp): node_console_exec — QEMU serial getty login needs one call
Field finding from the smoke test: login flushes typed-ahead input
before printing "Password: ", so a password sent in a separate call is
lost (Login incorrect loop). Sending username and password in the same
command string logs in reliably; the shell then persists across calls.
2026-11-03 00:32:55 +08:00
YueGuobin 78199d14a4 fix(mcp): collect the console stream in websocat binary mode (-b)
websocat's text mode (-t, and also the default) appends a newline after
every received WebSocket message and turns CR/LF inside a message into
spaces. The compute ships console output as one BINARY frame per
arbitrary read(1024) burst, so text mode diced the stream at every frame
boundary — prompts split into pieces, short "narrow-column" lines, lost
carriage-return redraws (field report: Password: broken in three).

Measured against a local WS server sending known frames:
  -t:  A\nB\nC\na b\na  b\n  ("a\rb" -> "a b")
  -b:  ABCa\rba\r\nb        (byte-exact, both directions)

Binary command frames stay console data on the compute side (only a line
that is itself a JSON {cols,rows} object would be taken as a resize
frame). The regression test fails on -t and passes on -b.
2026-11-03 00:02:58 +08:00
YueGuobin 7bf18ac2e8 feat(mcp): node_console_exec — one-shot console session via the host's websocat
Replaces node_console (which handed a URL + ticket to the client for a
bash websocat chain) with a tool that runs the whole session server-side:
spawn `timeout N websocat -t --no-close <console-ws-url>`, feed the
command lines through stdin (paced, CRLF), read stdout until the timeout
kills websocat, return the collected output as plain text.

- plain text replies: "output: ..." or bare error text — no JSON
  envelope, no status field (the server cannot judge command success)
- raw output: UTF-8 decode with replacement only, no telnet/ANSI
  stripping; control keys are real characters (description teaches
  \u0003, no \x03 translation)
- output funnel: grep=<python regex> filter; <=50 lines return as-is;
  beyond that a 10-line sample plus hints — regrep=true re-filters the
  node's cached capture (no re-run), full=true returns the last 400
  lines / 64 KiB, and the full capture is written to the node's files
  (console-capture.txt) with a ticketed curl download URL
- get_node_console_info_handler removed with its hashlib/TTL imports;
  the node-bound console ticket redemption path stays (comment updated,
  no current producer)
2026-11-02 22:52:46 +08:00
Jeremy Grossmann 0afd646856 Merge pull request #3039 from yueguobin/mcp-console-exec
MCP: Streamable HTTP transport (SDK 2.3) + skills knowledge tools + VPCS/auth fixes
2026-11-02 03:55:27 +01:00
yueguobin 92feea2a51 test(vpcs): assert the pcname-derived prompt pattern
The window-size tests still asserted the old hardcoded PC\d+> default;
the driver now derives the prompt from the node name.
2026-11-01 23:09:38 +08:00
yueguobin efc097f0ad feat(mcp): injection_skill_get — expose fault-injection skills to MCP
The skills repository carries per-protocol fault-injection knowledge
(symptoms, injection commands, verification steps) that only the
copilot could read through InjectionSkillsTool. Add the MCP counterpart
with the same multi-call protocol:

  list (context REQUIRED) -> category index -> single fault

The list step is topology-filtered: context matches a skill's category,
key and declared protocols (case-insensitive), so aliases such as ebgp,
ospfv3 and stp select the right category instead of relying only on key
substrings. Fault bodies stay gated behind detail/issue requests.

Fault category keys are derived from repository filenames
(injection_<file>_issues). Correct the stale injection_ospf examples in
the registry docstrings, the loader comment and the copilot docs, which
pointed at keys that never existed.

Docs: 84 tools; new Fault Injection Skills section.
2026-11-01 23:09:38 +08:00
yueguobin 21fb84e91c fix(skills): load categories independently and support non-git checkouts
SkillsManager refused to start when the local skills directory was not a
git repository (cloning into a non-empty path fails), and reload_skills()
returned early when injection/ was missing, so device and feature skills
never loaded. reload_packet_analysis_protocols() had the opposite bug:
an empty result wiped the registry while still reporting success.

- initialize(): accept a non-empty directory without .git as a local-only
  source (skip automatic updates, keep loading files); degrade to local
  files when GitPython is unavailable.
- _update_if_needed(): re-create/clone when the local directory vanished
  or moved, instead of reusing a stale handle forever.
- reload_skills(): injection, device and feature load independently; a
  missing category keeps its previously loaded entries.
- reload_packet_analysis_protocols(): an empty/missing directory keeps
  the existing registry and reports failure.
- reload_skills_repository(): drop the console guard cache so
  config/console_guard.txt applies on reload.

MCP device_skill_get now exposes the category filter, documents the
single-file (topic-less) layout, and returns a sections list for
index/summary of skills that have no topics/issues. An uninitialized
skills repository fails with a clear error instead of an empty list.
2026-11-01 23:09:38 +08:00
yueguobin 5ed252455d feat(mcp): device_skill_get — expose the GNS3-Skills repository to MCP clients
The skills repository carries per-device operational knowledge the
generic tools cannot know (FRR's console lands in vtysh, its ping has
no -c, scripted config needs 'do' prefixes; VPCS syntax; IOS paging
pitfalls), but only the embedded copilot could read it — MCP's sole
consumer was console_guard.txt.

device_skill_get reuses the copilot's framework-free core
(get_skill/list_available_skills) rather than the LangChain tool shell,
so both surfaces share the same access protocol by construction:
list -> device topic index -> one targeted topic body, bodies only on
an explicit topic request. The caller passes the skill key exactly as
the list returned it; there is no name mapping or node-based resolution
in this layer.

The tool description also tells clients that support subagents to
delegate the discovery steps on long tasks, keeping the full skill
bodies out of the main conversation's context.
2026-11-01 23:09:38 +08:00
yueguobin abb59b3d06 test(vpcs): mock read_channel in the strip-ansi test
The send_command read loop polls read_channel (netmiko decorates it
with a session-lock wrapper that only __init__ can satisfy), so the
old read_until_pattern mock died with AttributeError on instances
built via __new__.
2026-11-01 23:09:38 +08:00
yueguobin b184ea4c70 fix(mcp): renew an API-key session's JWT when it ages out
Tool handlers run in the session task created at initialize and inherit
its context; contextvars set by later requests never reach them. In a
long-lived API-key session (the documented setup — keys never expire)
the minted 24h JWT eventually expired while the transport kept
authenticating, so every tool call failed with 401.

Remember the raw API key at initialize; when the session's JWT has aged
out, take the current one from the per-request API-key cache (every
tools/call POST refreshes it) or re-mint synchronously. JWT logins are
unchanged: the client's own credential expiring is the client's
business.
2026-11-01 23:09:38 +08:00
yueguobin 68c8c0f1a0 fix(vpcs): wire pcname into the nornir inventory; keep partial output on read timeout
The pcname kwarg was added to VPCSTelnet but never passed by the only
production instantiation path, so a node renamed away from PC<n> never
matched the prompt pattern and every command stalled the full read
timeout. Pass pcname via the netmiko connection extras (the host key is
the node name).

send_command now owns its read loop instead of delegating to netmiko's
read_until_pattern: that helper raises ReadTimeout discarding accumulated
output, so a command slower than the timeout returned an empty string
that looked like success. The partial output is returned instead.
2026-11-01 23:09:38 +08:00
yueguobin eea1b807d1 docs(mcp): add Claude Code verification and scope examples 2026-11-01 23:09:38 +08:00
yueguobin 571646c296 docs: record the SIGHUP session-disconnect mass-node-death known issue
SSH disconnect SIGHUPs the session; the server absorbs it (reload) while
every emulator child default-terminates without cleanup, leaving stale
anchor TAPs that 409 the first start afterwards. Root-caused with a
second-level journalctl/gns3.log correlation; addressed by deployment
guidance (systemd / setsid nohup / tmux), product-side hardening noted
as deferred. Indexed under Known Issues.
2026-11-01 23:09:38 +08:00
yueguobin fe1b2a5cb0 Upgrade MCP SDK to 2.3 and switch transport from SSE to Streamable HTTP
- Drop the unused fastmcp wrapper pin (mcp-requirements.txt) and depend on
  the official SDK directly: mcp>=2.3,<3. The code only ever imported
  mcp.server.* modules; fastmcp was pulled in solely as a dependency
  vehicle and its <4 pin kept mcp locked at 1.x.
- Migrate to the SDK 2.x API: FastMCP -> MCPServer
  (mcp.server.mcpserver); transport_security moves from the constructor
  into streamable_http_app().
- Replace the deprecated SSE transport (spec-deprecated 2025-06-18) with
  Streamable HTTP at POST/GET/DELETE /v3/mcp/transport, mounted at /v3/mcp.
- Run the StreamableHTTP session manager in the FastAPI lifespan
  (Starlette does not execute mounted sub-app lifespans), entered before
  startup finishes so no request passes the MCP ready gate first.
- Authenticate every request (the SSE wrapper only checked the opening
  GET and trusted POSTs by session). Add a 5-minute TTL cache for API-key
  resolutions so the stricter per-request check does not cost a bcrypt
  round on every call.
- Update docs to the new endpoint, auth flow, and client configuration.

Wire-format verified unchanged against SDK 1.30 (structured output
auto-detection and content conversion are byte-identical for the
list[dict] returns used by all tool handlers).
2026-11-01 23:09:38 +08:00
Jeremy Grossmann a5e98e2109 Merge pull request #3046 from GNS3/feat/aarch64-qemu-vms
Add support for running aarch64 Qemu VMs
2026-11-01 12:55:51 +01:00
grossmj 5af41c7e8d Sync appliances 2026-11-01 18:50:55 +07:00
grossmj 524fff814b feat: add support for running aarch64 Qemu VMs 2026-11-01 18:48:41 +07:00
grossmj 47944067f7 fix: suppress deprecation warnings in pyproject.toml 2026-11-01 16:11:22 +07:00
Jeremy Grossmann 09ad329db3 Merge pull request #3045 from GNS3/update-dependencies
Update dependencies
2026-11-01 07:04:47 +01:00
grossmj 5afd9bf384 chore(deps): update dependencies 2026-11-01 12:46:50 +07:00
Jeremy Grossmann 368d1af3d5 Merge pull request #3043 from GNS3/bugfix/3019
Hardware acceleration support for ARM architectures in QEMU
2026-10-31 17:45:44 +01:00
grossmj af7b70001a fix: hardware acceleration support for ARM architectures in QEMU 2026-10-31 23:38:29 +07:00
Jeremy Grossmann f06166da71 Merge pull request #3042 from GNS3/fix-pytest-warnings
Fix pytest warnings
2026-10-31 16:07:44 +01:00
grossmj ac65698eea refactor: update authentication handling to use aiohttp.encode_basic_auth and adjust request options + fix other pytest warnings 2026-10-31 22:00:21 +07:00
Jeremy Grossmann 1608a65a01 Merge pull request #3041 from GNS3/update-dependencies
Update dependencies
2026-10-31 13:52:58 +01:00
grossmj 110638d81a refactor: replace os.path.commonprefix with os.path.commonpath for path comparisons 2026-10-31 19:43:52 +07:00
grossmj be368dd222 chore: update dependencies to latest versions in dev-requirements.txt 2026-10-31 19:38:58 +07:00
grossmj bef6e9d019 chore: update dependencies to latest versions in requirements.txt 2026-10-31 19:29:18 +07:00
Jeremy Grossmann 2821cbdf80 Merge pull request #3040 from GNS3/cleanup-windows-darwin-code
Remove platform-specific code for Darwin and Windows
2026-10-31 13:23:42 +01:00
grossmj 1f2b79cff2 refactor: remove macOS and Windows crash report info 2026-10-31 19:14:43 +07:00
grossmj c7e085e23c refactor: remove local gns3vm support and remove more platform-specific code 2026-10-31 17:51:37 +07:00
grossmj bad48286a5 refactor: remove platform-specific code for Darwin and Windows. Clean up Qemu options handling 2026-10-31 16:49:23 +07:00
grossmj 4d1b9e4700 fix: update web-ui bundling commit message to include release link 2026-10-31 12:20:42 +07:00
Jeremy Grossmann 4cbc339ab1 Merge pull request #3038 from GNS3/dependabot/pip/3.1/langchain-deepseek-gte-1.1.1
Update langchain-deepseek requirement from >=1.0.1 to >=1.1.1
2026-10-29 13:44:13 +01:00
Jeremy Grossmann 6b5863a5df Merge pull request #3037 from GNS3/dependabot/pip/3.1/langchain-openai-gte-1.7.2
Update langchain-openai requirement from >=1.1.10 to >=1.7.2
2026-10-29 13:43:53 +01:00
Jeremy Grossmann 331531de1b Merge pull request #3036 from GNS3/dependabot/pip/3.1/langgraph-checkpoint-sqlite-gte-3.1.2
Update langgraph-checkpoint-sqlite requirement from >=3.0.3 to >=3.1.2
2026-10-29 13:35:03 +01:00
dependabot[bot] 1d30cb49e9 Update langchain-deepseek requirement from >=1.0.1 to >=1.1.1
Updates the requirements on [langchain-deepseek](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-deepseek==1.0.1...langchain-deepseek==1.1.1)

---
updated-dependencies:
- dependency-name: langchain-deepseek
  dependency-version: 1.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-29 12:32:18 +00:00
dependabot[bot] d7d5231853 Update langchain-openai requirement from >=1.1.10 to >=1.7.2
Updates the requirements on [langchain-openai](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==1.1.10...langchain-openai==1.7.2)

---
updated-dependencies:
- dependency-name: langchain-openai
  dependency-version: 1.7.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-29 12:32:18 +00:00
Jeremy Grossmann e9b9bea1df Merge pull request #3034 from GNS3/dependabot/pip/3.1/langchain-google-genai-gte-4.4.2
Update langchain-google-genai requirement from >=4.2.1 to >=4.4.2
2026-10-29 13:29:48 +01:00
dependabot[bot] 62cb8af70b Update langgraph-checkpoint-sqlite requirement from >=3.0.3 to >=3.1.2
Updates the requirements on [langgraph-checkpoint-sqlite](https://github.com/langchain-ai/langgraph) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/checkpointsqlite==3.0.3...checkpointsqlite==3.1.2)

---
updated-dependencies:
- dependency-name: langgraph-checkpoint-sqlite
  dependency-version: 3.1.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-29 11:22:59 +00:00
dependabot[bot] cbd7065584 Update langchain-google-genai requirement from >=4.2.1 to >=4.4.2
Updates the requirements on [langchain-google-genai](https://github.com/langchain-ai/langchain-google) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain-google/releases)
- [Commits](https://github.com/langchain-ai/langchain-google/compare/libs/genai/v4.2.1...libs/genai/v4.4.2)

---
updated-dependencies:
- dependency-name: langchain-google-genai
  dependency-version: 4.4.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-29 11:22:37 +00:00
Jeremy Grossmann 0c34520017 Merge pull request #3032 from tikD1337/fix/ai-stub-shadows-access-routes
fix(api): keep the LLM stub from shadowing /access routes without AI extras
2026-10-28 16:09:02 +01:00
Jeremy Grossmann 16c5d028dc Merge pull request #3033 from tikD1337/fix/web-ui-lib-assets
fix(web-ui): ship the bundled consoles' lib/ files (VNC and xpra)
2026-10-26 15:34:29 +01:00
tikD1337andClaude Opus 5.5 406086c177 fix(web-ui): ship the bundled consoles' lib/ files (VNC and xpra)
The ".gitignore" rules "lib" and "lib64" (from the Python template, meant
for a virtualenv at the repository root) match a directory with that name
at any depth. They kept two folders of the bundled web UI out of git:

- assets/vnc-console/novnc/vendor/pako/lib/ (12 files, zlib for noVNC)
- assets/xpra-html5/js/lib/ (20 files)

Anything built from a git checkout (GitHub archives, Docker images) ships
without them. The server answers a missing asset with the web UI page, so
noVNC's module graph fails to load (a module served as text/html) and the
VNC console stays on "Initializing VNC Console..."; the xpra console loses
its scripts the same way.

Anchor both rules to the repository root and add the 32 files, taken from
gns3-web-ui v3.1.0a7 (the bundled version); every blob is identical to the
one in that tag. A test walks the VNC console's module imports and the xpra
pages' scripts and fails on any file that is not in the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:09:50 +01:00
tikD1337andClaude Opus 5.5 09b8420354 fix(api): keep the LLM stub from shadowing /access routes without AI extras
Without the AI dependencies the LLM model configuration router is replaced
by a stub that answers 501. It was a catch-all ("/{path:path}") included
under the /access prefix, so it also answered every /access route included
after it: creating an API key (POST /v3/access/api-keys) failed with "AI
Copilot is not available", which left API keys unusable on servers without
the AI extras.

The LLM stub now covers only the LLM model configuration paths, under
/access/users/{user_id}/ and /access/groups/{group_id}/. The stub routers
are built by build_ai_stub_routers() so tests can check them with or
without the extras, and add_stub_routes() takes the paths to stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:35:12 +01:00
Jeremy Grossmann ac01ee6190 Merge pull request #3031 from yueguobin/docs/netem-seed-kernel-requirement
docs: state the Linux 6.6 requirement of the netem seed filter
2026-10-26 08:02:53 +01:00
yueguobin c988ede19c docs: state the Linux 6.6 requirement of the netem seed filter
Aligns with uBridge's tc.md correction: TCA_NETEM_PRNG_SEED (uapi slot 14,
added in Linux 6.6 — not the nonexistent TCA_NETEM_SEED at "5.1") is what
the seed filter rides on; pre-6.6 kernels parse qdisc options
non-strictly and silently drop the attribute, so seed determinism is
unavailable there while every other netem knob applies. Stated in both
filter tables and the seed section of packet-filters.md, the seed rows of
the MCP and copilot tool descriptions, and the kernel-impairment spec.
2026-10-26 13:23:05 +08:00
Jeremy Grossmann fa4b763640 Merge pull request #3027 from tikD1337/fix/ubridge-kernel-datapath-version
Require uBridge >= 1.3.1
2026-10-25 02:49:15 +02:00
tikD1337andClaude Opus 5.5 07b0c21fe5 Require uBridge >= 1.3.1 instead of gating the kernel datapath
Review feedback: 3.1 is still in alpha and the GNS3 VM ships a matching
uBridge, so a hard minimum is simpler than a version-based degrade path,
and it also covers Docker endpoints and the builtin Ethernet switch,
which never went through the anchor probes. Raise minimum_required_version
to 1.3.1 and drop supports_kernel_datapath and its uses; the relay
fallback for capability problems (no CAP_NET_ADMIN) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 01:39:52 +02:00
Jeremy Grossmann dc6a9b3c7e Merge pull request #3028 from tikD1337/fix/switch-stale-bridge
fix(ethernet-switch): release a leftover bridge's ports before the crash-recovery delete
2026-10-24 17:31:11 +02:00
Jeremy Grossmann dd19d96fbf Merge pull request #3029 from tikD1337/fix/qemu-tap-partial-csum
fix(qemu): open the adapter TAP with vnet_hdr=off so relay links carry finished checksums
2026-10-24 09:20:16 +02:00
tikD1337andClaude Opus 5.5 156b77000c fix(qemu): open the adapter TAP without a vnet header
The TAP netdev kept QEMU's default vnet_hdr, so virtio-net, e1000e, igb
and vmxnet3 guests offload TCP/UDP checksums (and TSO) to the TAP: their
frames carry only the pseudo-header sum in the checksum field. A kernel
bridge link finishes them, but the uBridge relay (cloud, NAT, hub, ...)
reads the TAP with libpcap and forwards the frames as they are, so DNS
and TCP through a cloud fail while ICMP and DHCP work.

With vnet_hdr=off QEMU stops offering the offloads and the guest (or the
emulated NIC) sends finished frames, as with the 2.x socket netdev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:28:53 +02:00
tikD1337andClaude Opus 5.5 d440849886 fix(ethernet-switch): release a leftover bridge's ports before the crash-recovery delete
A server killed before close() leaves the switch's kernel bridge behind
with its ports still enslaved: a peer's persistent anchor TAP and cascade
veth ends outlive uBridge. uBridge's brctl delete refuses a bridge that
still has ports (EBUSY), so the best-effort recovery delete in
_ensure_bridge() failed silently and brctl create hit EEXIST: the switch,
and the project holding it, could no longer be opened (HTTP 409 "Could
not create bridge gns3xxxxxx: File exists").

List the leftover bridge's ports from /sys/class/net/<bridge>/brif and
release each with brctl delif before the delete. uBridge's brctl show
reports no ports, and the switch already reads sysfs on the same host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:10:13 +02:00
tikD1337andClaude Opus 5.5 52fcc83494 Gate the TAP/kernel datapath on uBridge >= 1.3.1
uBridge 1.2.3 already has the tap module, so the persistent-TAP probes
(_probe_persistent_taps on the node, probe_tap_support and siblings for
/capabilities) pass on it. QEMU, Dynamips and VPCS nodes then anchor on
TAPs and the controller builds kernel links that need 1.3.x commands:
kernel markers and the eBPF tc modes (1.3.0) and per-interface kernel
captures (`capture stop_kernel <ifc>`, 1.3.1). On 1.2.3 a MikroTik CHR
node sent frames but never got DHCP past DISCOVER/OFFER, and stopping
a capture failed with "Bad number of parameters".

Add Hypervisor.supports_kernel_datapath (version >= 1.3.1) and refuse
older builds in the node-side probe and the four anchoring capability
probes (tap, iol tap, bridge tap, vxlan). The existing fallback then
applies: nodes keep the legacy relay datapath with the usual warning,
which now names the installed version, and links stay on the relay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:00:27 +02:00
Jeremy Grossmann 2c10782635 Merge pull request #3026 from tikD1337/fix/node-names-adapter-type
fix: node names from templates with "+" and custom adapters with a null type
2026-10-23 14:08:47 +02:00
Jeremy Grossmann efc77267fa Merge pull request #3025 from tikD1337/fix/qemu-kvmclock-hyperv
fix(qemu): turn off kvmclock and TSC deadline timer on Hyper-V hosts without a usable TSC
2026-10-23 14:04:53 +02:00
tikD1337andClaude Opus 5.5 7e9ecf2a61 docs(config): add the Qemu kvmclock setting to the sample config
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 13:50:04 +02:00
tikD1337andClaude Opus 5.5 dd69a01fba fix(controller): make node names from template names valid hostnames
Creating a node from a template whose name has characters invalid in a
hostname, such as "MikroTik CCR1072-1G-8S+", failed on the compute with
"'MikroTikCCR1072-1G-8S+-1' is an invalid name to create a Qemu node":
the template name was only stripped of spaces.

Replace the other invalid characters by hyphens, following the rules the
compute validates node names with (RFC 1123 for Qemu and Docker, IOS for
Dynamips and IOU), as project import already does for existing nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:56:49 +02:00
tikD1337andClaude Opus 5.5 b9cf9158ca fix(compute): ignore null settings of custom adapters
When only a port is renamed in a template's custom adapters, the adapter is
saved with "adapter_type": null. The emulators read it with
custom_adapter.get("adapter_type", self._adapter_type), which returns None
for a key set to null: QEMU was then started with "-device None,..." and
died ("'None' is not a valid device model name"), GNS3 only reporting
"Could not start Telnet QEMU console". VirtualBox and VMware read the
adapter type the same way.

Drop the null settings in _get_custom_adapter_settings so the node's own
adapter type (and MAC address) applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:56:48 +02:00
Tikhon Ulyanov 23edfc0269 Merge branch '3.1' into fix/qemu-kvmclock-hyperv 2026-10-22 19:28:50 +02:00
Jeremy Grossmann 4d55cb1b9c Merge pull request #3023 from GNS3/dependabot/pip/3.1/langchain-aws-gte-1.9.0
Update langchain-aws requirement from >=1.8.1 to >=1.9.0
2026-10-22 18:43:12 +02:00
dependabot[bot] fdf6e36555 Update langchain-aws requirement from >=1.8.1 to >=1.9.0
Updates the requirements on [langchain-aws](https://github.com/langchain-ai/langchain-aws) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain-aws/releases)
- [Commits](https://github.com/langchain-ai/langchain-aws/compare/langchain-aws==1.8.1...langchain-aws==1.9.0)

---
updated-dependencies:
- dependency-name: langchain-aws
  dependency-version: 1.9.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 16:26:05 +00:00
Jeremy Grossmann ab5eb192ad Merge pull request #3024 from GNS3/dependabot/pip/3.1/sentry-sdk-gte-2.72.0-and-lt-3
Update sentry-sdk requirement from <3,>=2.70.0 to >=2.72.0,<3
2026-10-22 18:25:39 +02:00
Jeremy Grossmann 85493aad77 Merge pull request #3022 from GNS3/dependabot/pip/3.1/langchain-ollama-gte-1.1.0
Update langchain-ollama requirement from >=1.0.1 to >=1.1.0
2026-10-22 18:24:52 +02:00
Jeremy Grossmann 532b2cdf8d Merge pull request #3021 from GNS3/dependabot/pip/3.1/rust-just-1.59.0
Bump rust-just from 1.58.0 to 1.59.0
2026-10-22 18:24:26 +02:00
Jeremy Grossmann bd5e3c6412 Merge pull request #3020 from GNS3/dependabot/pip/3.1/nornir-gte-3.6.0
Update nornir requirement from >=3.5.0 to >=3.6.0
2026-10-22 18:24:03 +02:00
tikD1337andClaude Opus 5.5 53164eccee fix(qemu): turn off kvmclock and TSC deadline timer on Hyper-V hosts without a usable TSC
When the compute is itself a Hyper-V guest without an invariant TSC (e.g.
the GNS3 VM on hosts whose CPU lacks TSC scaling), Linux falls back to the
hyperv_clocksource_tsc_page clocksource and the guest timekeeping KVM
derives from the TSC is broken with recent kernels:

- kvmclock runs thousands of times too fast: Linux guests (MikroTik
  RouterOS, ...) panic with "watchdog: BUG: soft lockup - CPU#0 stuck for
  29604s" and reboot in a loop right after boot;
- TSC deadline timers fire far too late: guests with -cpu host hang.

The only workaround so far was -machine accel=tcg, i.e. no KVM at all.

Add a kvmclock setting to the [Qemu] section (auto, enabled, disabled).
In auto mode, KVM guests started on a host whose clocksource is a Hyper-V
one get kvmclock and tsc-deadline turned off: on the -cpu given in the
additional options (unless it sets these features itself), otherwise on
QEMU's default CPU model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:38:10 +02:00
dependabot[bot] 9549425924 Update sentry-sdk requirement from <3,>=2.70.0 to >=2.72.0,<3
Updates the requirements on [sentry-sdk](https://github.com/getsentry/sentry-python) to permit the latest version.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.70.0...2.72.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-version: 2.72.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 11:22:58 +00:00
dependabot[bot] 3d304a01ea Update langchain-ollama requirement from >=1.0.1 to >=1.1.0
Updates the requirements on [langchain-ollama](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-ollama==1.0.1...langchain-ollama==1.1.0)

---
updated-dependencies:
- dependency-name: langchain-ollama
  dependency-version: 1.1.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 11:22:47 +00:00
dependabot[bot] 176fc4bb5d Bump rust-just from 1.58.0 to 1.59.0
Bumps [rust-just](https://github.com/gnpaone/rust-just) from 1.58.0 to 1.59.0.
- [Release notes](https://github.com/gnpaone/rust-just/releases)
- [Changelog](https://github.com/gnpaone/rust-just/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gnpaone/rust-just/compare/1.58.0...1.59.0)

---
updated-dependencies:
- dependency-name: rust-just
  dependency-version: 1.59.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 11:22:37 +00:00
dependabot[bot] 926900dd08 Update nornir requirement from >=3.5.0 to >=3.6.0
Updates the requirements on [nornir](https://github.com/nornir-automation/nornir) to permit the latest version.
- [Release notes](https://github.com/nornir-automation/nornir/releases)
- [Changelog](https://github.com/nornir-automation/nornir/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/nornir-automation/nornir/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: nornir
  dependency-version: 3.6.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 11:22:32 +00:00
grossmj 09ad486966 Development on 3.1.0.dev8 2026-10-21 16:04:23 +07:00
grossmj 2ea13ca49a Release v3.1.0a7 2026-10-21 15:47:16 +07:00
grossmj 179e7e0d17 Bundle web-ui v3.1.0a7 2026-10-21 15:24:00 +07:00
Jeremy Grossmann c1fdd55cb3 Merge pull request #3018 from aastefanov/3.1
Change project creator on import
2026-10-21 04:44:35 +02:00
Albert Stefanov cf2b455bf1 Reformat file
Signed-off-by: Albert Stefanov <aastefanov@outlook.com>
2026-10-20 20:44:21 +03:00
Albert Stefanov 63d7fec8a7 Change project creator on import
Fixes #3017

Signed-off-by: Albert Stefanov <aastefanov@outlook.com>
2026-10-20 20:29:51 +03:00
grossmj 68c929e224 Sync appliances 2026-10-20 18:53:07 +07:00
Jeremy Grossmann ada64e39a1 Merge pull request #3016 from GNS3/qemu-minimum-version-support
Add QEMU support documentation and enforce minimum version requirement
2026-10-20 13:14:38 +02:00
grossmj a82b06d676 feat: add QEMU support documentation and enforce minimum version requirement 2026-10-20 18:01:25 +07:00
Jeremy Grossmann aab5432a5f Merge pull request #3015 from GNS3/bugfix/3007
Fix SPICE socket binding failure
2026-10-20 12:23:59 +02:00
grossmj cfba748677 fix: SPICE socket binding failure 2026-10-20 17:16:44 +07:00
Jeremy Grossmann 1498282c6b Merge pull request #3014 from GNS3/remove-windows-code
Remove Windows code
2026-10-20 07:04:37 +02:00
grossmj 437f68961b chore: clean up Windows specific code 2026-10-20 11:51:29 +07:00
Jeremy Grossmann 9e9f1316aa Merge pull request #3009 from markparonyan/3.1
refactor(gns3server,tests): ruff fixes
2026-10-19 18:49:33 +02:00
grossmj 569b46d272 refactor: fix lint issues 2026-10-19 23:28:49 +07:00
Jeremy Grossmann 68b5e89bfa Merge branch '3.1' into 3.1 2026-10-19 18:11:29 +02:00
Jeremy Grossmann b956bba917 Merge pull request #3013 from cristian-ciobanu/feat-#2496
feat(cloud): attach TAP interfaces to existing Linux bridges
2026-10-19 17:34:34 +02:00
Cristi 53aa7ab0d9 fix(cloud): keep ports_mapping getter and setter adjacent 2026-10-19 16:02:39 +03:00
Cristi a9f5306f16 feat(cloud): attach TAP interfaces to existing Linux bridges 2026-10-19 15:42:18 +03:00
Jeremy Grossmann e57acfb7b1 Merge pull request #3011 from cristian-ciobanu/feat-#3049
feat(qemu): support two CD/DVD images and consistent ISO handling
2026-10-19 04:42:18 +02:00
Cristi 58e5591935 feat(qemu): support SATA CD-ROM interfaces
- Add per-drive IDE/SATA selection with backward-compatible IDE defaults
- Persist interfaces in nodes, templates, and appliance imports
- Add database migration support for versioned and unversioned databases
- Prevent partial updates when rejecting live interface changes
- Validate interfaces and support SATA media changes through the monitor
2026-10-18 22:07:37 +03:00
Jeremy Grossmann a1e483b894 Merge pull request #3012 from yueguobin/fix/marker-replay-remote-computes
fix: fetch remote-compute marker pcaps in tag replay
2026-10-18 14:06:25 +02:00
YueGuobin 33b28a3b5f fix: fetch remote-compute marker pcaps in tag replay
Marker pcaps are written by uBridge on the compute that hosts the capture
node. The tag replay only looked in the project folder on the controller.
So a source from a remote compute showed count 0 and no frames, with no
error. Its frame detail returned 404 and said nothing ever matched (#3010).

Each source now gets its pcap through the compute of its capture node.
Local files are read as before. Remote files are fetched over HTTP on
every acquire into a small cache (32 idle files, cleared at shutdown).
A file is replaced only when its bytes changed. This keeps the old mtime,
so the sharkd session for that file stays alive.

When a compute cannot be reached, its source now shows an error message
in the timeline instead of just showing nothing. The detail endpoint now
returns an error instead of 404.
2026-10-18 16:36:11 +08:00
Cristi 84b4c05b9f feat(qemu): support two CD/DVD images and consistent ISO handling 2026-10-17 23:08:11 +03:00
Jeremy Grossmann d047ca0a5f Merge pull request #3006 from yueguobin/feat/vxlan-cross-compute
feat: cross-compute VXLAN kernel datapath
2026-10-17 13:39:13 +02:00
Mark Paronyan 4c311baabf refactor(gns3server,tests): StrEnum, ASYNC109 and others 2026-10-17 12:02:53 +03:00
Mark Paronyan b7e6c02647 refactor: ruff autofixes 2026-10-17 11:43:36 +03:00
Mark Paronyan 54139dced2 chore(ruff): target version to py311 2026-10-17 11:43:20 +03:00
YueGuobin 0d91d9252b feat: default vxlan_dstport to the IANA VXLAN port 4789
The custom 14789 was picked to keep our demux socket off the ports other
VXLAN software listens on, but a private default surprises operators and
blocks interop with gear that pins the standard port. Default to the
IANA-assigned 4789 instead; the gns3_server.conf override is unchanged
for computes where swarm overlay/flannel-style VXLAN already owns 4789.

Mixed-version deployments must pin the port on every compute until they
all run the new default, or the two tunnel ends will disagree.
2026-10-17 14:11:00 +08:00
YueGuobin 6679774de7 docs: spell out how the VXLAN lower device is chosen
Per tunnel, not a host setting: a connected UDP socket runs the
kernel's route lookup for the peer, the chosen source address is
matched back to its owning interface, and that interface becomes
the dev= (and with it the derived MTU and the outer source
address). Different peers may ride different lower devices with
independently derived MTUs; an unresolvable peer is a wiring error
that degrades the link to the relay. Re-creation re-resolves too,
so route changes ride the same node-start / link-recreation paths
as MTU changes.
2026-10-17 14:11:00 +08:00
YueGuobin 577be9b94e docs: pin down the VXLAN MTU derivation and its re-derivation paths
Verified against the running kernel's sources (7.2.6): the 50-byte
headroom is 20 outer IPv4 + 8 UDP + 8 VXLAN + 14 inner Ethernet
header (vxlan_headroom(), include/net/vxlan.h); the vxlan driver has
no NETDEV_CHANGEMTU handler so a live tunnel never follows its lower
device, while the bridge does follow its ports at runtime
(NETDEV_CHANGEMTU -> br_mtu_auto_adjust). Document the operational
consequence: the wiring path re-creates the device on every node
start and link (re)creation, so raising the underlay MTU on both
computes and stop/start-ing the nodes is the fix — no manual
ip link needed.
2026-10-17 14:11:00 +08:00
YueGuobin ca31031fdc test: drop the cross-compute VXLAN e2e scenario
The scenario needed root for its network namespace and its fabric subnet
turned out host-specific: policy routing (a proxy's table consulted
before main) sends any non-RFC1918 destination out the default route, so
the peer compute was unreachable behind the veth — unfixable by picking
another subnet, and the failure paths leaked namespaces and processes.
Too environment-coupled to keep in the suite.

Unit coverage is unchanged (selection matrix, tunnel spec derivation,
VNI retry/degrade/self-heal, device lifecycle, capability probe); the
feature doc's Verification section now carries the manual two-compute
checklist instead of the e2e reference.
2026-10-17 14:11:00 +08:00
YueGuobin 21b866aeed feat: cross-compute VXLAN kernel datapath
Cross-compute links can ride kernel VXLAN tunnels instead of the uBridge
UDP relay: each endpoint creates one VXLAN device (uBridge's rtnetlink
vxlan module) enslaved into the same per-link Linux bridge the same-host
datapath uses, so filters, markers, capture and suspend keep running on
the anchor unchanged. Opt-in (Server.enable_vxlan_cross_compute, default
off) because the tunnel caps the usable MTU at the underlay minus the
outer headers; the relay stays the default and the fallback.

The controller derives what the pair must agree on: one VNI per link
(upper VNI space, per-link random salt) and deterministic device names
(gvl{link}{node}) that make crashed-run leftovers claimable
(show -> delete -> create). Same-host compute pairs, switch endpoints
and serial/unix-socket containers stay on the relay.

A VNI the kernel refuses self-heals on every path it can surface:
interactive create retries a fresh salt then degrades to the relay;
project open re-dispatches refused batch entries the same way; node
start recognises the refused device, stops the half-started node,
re-wires both ends on a fresh VNI (or degrades the link) and retries
the start. The device MTU is derived from the lower device (dev=) and
the per-link bridge inherits it - no configuration. The capability
probe (ubridge_vxlan in /capabilities) runs one scratch create/delete
on a scratch port that never equals the configured dstport.

The e2e scenario runs two computes on one machine (a network namespace
joined by a veth pair as the fabric) and needs root.
2026-10-17 14:11:00 +08:00
Jeremy Grossmann 5514b2e929 Merge pull request #3008 from yueguobin/fix/mypy-2-4-username-mapped
Fix mypy 2.4 type error on User.username and bump mypy to 2.4.0
2026-10-17 08:09:26 +02:00
YueGuobin c557324bcb chore: bump mypy to 2.4.0
Supersedes the dependabot bump in #2998; the tree is mypy 2.4-clean after
the previous commit.
2026-10-17 14:00:23 +08:00
YueGuobin 9887e3d5d7 fix: type User.username as str via Mapped-style column
mypy 2.4 (native parser by default) flags _jwt_username_var.set(user.username)
in agent/mcp/__init__.py: with the legacy `username = Column(String)`
declaration, instance access is typed Column[str], not str. Migrate the
column to the Mapped/mapped_column style already used by token_version and
last_login in the same table, with an explicit nullable=True so the schema
stays identical to the former Column(String) declaration.
2026-10-17 14:00:23 +08:00
Jeremy Grossmann 344a342924 Merge pull request #3004 from Xeriioo/fix/docker-vnc-display-race
fix(docker): give each VNC node its own X display
2026-10-16 12:57:38 +02:00
Jeremy Grossmann 8801e5fd4b Merge pull request #3005 from yueguobin/fix/node-update-while-running
fix: refuse Docker node updates that would recreate a running container
2026-10-16 12:17:57 +02:00
Guobin Yue 03c1564482 Merge branch '3.1' into fix/node-update-while-running 2026-10-16 17:07:39 +08:00
Jeremy Grossmann ddaf4b9376 Merge pull request #2999 from GNS3/dependabot/pip/3.1/nornir-utils-gte-0.3.0
Update nornir-utils requirement from >=0.2.0 to >=0.3.0
2026-10-16 11:03:08 +02:00
Guobin Yue d2b851f148 Merge branch '3.1' into fix/node-update-while-running 2026-10-16 16:56:40 +08:00
Jeremy Grossmann 7b8bb7140f Merge branch '3.1' into dependabot/pip/3.1/nornir-utils-gte-0.3.0 2026-10-16 10:54:32 +02:00
Jeremy Grossmann d20bcab40b Merge pull request #2997 from GNS3/dependabot/pip/3.1/pyjwt-gte-2.15.1
Update pyjwt requirement from >=2.10.1 to >=2.15.1
2026-10-16 10:53:12 +02:00
Jeremy Grossmann 642dd976a8 Merge pull request #2996 from GNS3/dependabot/pip/3.1/langsmith-gte-0.14.7
Update langsmith requirement from >=0.7.7 to >=0.14.7
2026-10-16 10:52:55 +02:00
Jeremy Grossmann ae3739e2b2 Merge pull request #2995 from GNS3/dependabot/pip/3.1/tiktoken-gte-0.14.0
Update tiktoken requirement from >=0.8.0 to >=0.14.0
2026-10-16 10:52:34 +02:00
Jeremy Grossmann 57f2a687de Merge pull request #2977 from GNS3/python-3.15-support
Python 3.15 support
2026-10-16 10:51:54 +02:00
Jeremy Grossmann 578dbdceeb Merge pull request #3003 from yueguobin/fix/mcp-device-config-remote-compute
Fix MCP device tools for nodes on remote computes
2026-10-16 10:49:56 +02:00
YueGuobin 1090a32bbb fix: refuse Docker node updates that recreate a running container
Updating any Docker node property destroys and recreates the container
(the route calls DockerVM.update() as soon as the property diff is
non-empty), so it discards everything written inside it. On a running
node that happened silently, as a side effect of an unrelated edit: the
user only saw the node restart.

Refuse the update while the container is up and say what stopping it is
for, like QEMU, IOU, Dynamips, VPCS, VirtualBox and VMware already do
for their own restart-requiring settings. The check runs before anything
is applied — a refused update leaves the node untouched — and only when
the PUT really changes a property, since Web clients send the whole node
back on every edit.

is_running() is not reusable for the question: it reports a paused
container as not running and stops crashed containers as a side effect,
so DockerVM gains is_up() for "running or paused".
2026-10-16 16:49:11 +08:00
YueGuobin 290c542afe fix: roll back a node update the compute refused
A compute 409 (for instance "must be stopped to change the console type
to vnc") left every value that had already been applied locally on the
controller node, because the update loop sets them before the PUT.
Nothing was dumped at that point, but project.dump() serializes the
whole topology: the next successful change anywhere in the project wrote
the refused values to disk, and the next project open recreated the node
with them — this time accepted by a stopped node. A refused change
silently landed later.

Restore the applied properties, the node properties, custom adapters,
missing images and the derived ports before re-raising, the way the
degraded-image create() path already cleans up after its own failure.
2026-10-16 16:49:06 +08:00
Jeremy Grossmann 2821fbd42a Merge branch '3.1' into python-3.15-support 2026-10-16 10:39:56 +02:00
ClemandClaude Opus 5.5 c736d5863b fix(docker): give each VNC node its own X display
When a project is opened, Docker nodes are created in parallel. The free
display was found by checking whether /tmp/.X11-unix/X<n> exists, but that
socket only appears once Xvnc has started, so several nodes got the same
display. Only the first Xvnc started; the others exited with "Server is
already active for display N" ("The vnc process has stopped with return
code 1"), and their containers drew on the screen of another node.

- reserve the displays given to the nodes of this server, and also skip a
  display whose lock file belongs to a live process
- restart a crashed Xvnc on the display the container was created with,
  after removing its stale socket, instead of picking a new display the
  container cannot reach (black screen)
- on close, only remove the X socket of our own Xvnc, never the socket of
  the node that owns the display

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:29:19 +02:00
Jeremy Grossmann 638a8be180 Merge pull request #3000 from yueguobin/feat/compute-auto-connect
Auto-connect flag and disconnect endpoint for computes
2026-10-16 07:08:07 +02:00
YueGuobin f47cb56495 fix: dial per-node console hosts in MCP device config tools
The device tools (device_config_send / device_show_run / vpcs_config_set)
built their Nornir inventory with only the console port and inherited the
group hostname, which is always the controller host. Console ports of
nodes on remote computes are bound on the compute's own host, so those
nodes were unreachable from the MCP tools - only local-compute nodes
worked.

Pass the per-node console_host through the project inventory and inject
it as a host-level Nornir hostname (which overrides the group's
controller-wide default). Missing or wildcard (0.0.0.0/::) values keep
the group inheritance, so single-machine setups behave exactly as
before. VPCS builds its own host entries, so it carries the hostname
over explicitly.
2026-10-16 10:29:19 +08:00
Guobin Yue 0130048baa Merge branch '3.1' into feat/compute-auto-connect 2026-10-15 23:04:52 +08:00
YueGuobin 7737630cb4 fix(tests): derive head revision in the migration round-trip test
The round-trip test builds its catalog from the models (which already
carry the head schema), then stamps the revision that was newest when the
test was written and replays everything above it. Any migration landing
on top therefore ran its DDL against a schema it had not rolled back -
the new computes.auto_connect migration failed with "duplicate column
name: auto_connect".

Stamp the current head instead and let the downgrade roll back every
revision above the inventory one before the upgrade replays them.
2026-10-15 23:02:53 +08:00
Jeremy Grossmann b79dcaa49d Merge pull request #3001 from yueguobin/chore/pre-commit-hooks
chore: add pre-commit hook running ruff and mypy checks on staged files
2026-10-15 16:52:47 +02:00
YueGuobin 6734d2d666 feat: add auto_connect flag and disconnect endpoint for computes
Computes can now be flagged auto_connect in the database. The controller
connects to flagged computes in the background at startup (reusing the
one-second delayed fire-and-forget mechanism), and enabling the flag via
PUT /computes/{id} triggers a background connection without the request
ever waiting for it. Disabling the flag does not drop an existing
connection.

Add POST /computes/{id}/disconnect to tear a compute down manually: the
notification stream and HTTP session are closed and every reconnection
path (retry backoff, notification stream reconnect, lazy connection in
http_query) is blocked until connect() is called again or the controller
restarts with auto_connect enabled. Disconnecting a compute used by an
opened project is rejected with 409 unless force=true; forcing only
drops the controller-side control channel, nodes keep running unmanaged.
The local compute cannot be disconnected.

Also make test_compute_list create its own compute (it relied on rows
from earlier tests and failed under reordering), and stop scheduling the
delayed add_compute connection during tests: the timer leaked real
connection attempts into other tests' event loops.
2026-10-15 22:50:22 +08:00
YueGuobin fa3dd827f9 chore: add pre-commit hook running ruff and mypy checks on staged files
Mirrors the fast static checks from CI (justfile lint + type-check):
ruff check, ruff format --check and mypy (gns3server package only,
matching the files = ["gns3server"] scope in pyproject.toml). Only
staged Python files are checked; pytest and pip check are left to CI.

Enable with: just install-hooks
2026-10-15 22:44:24 +08:00
dependabot[bot] 35a2d54740 Update nornir-utils requirement from >=0.2.0 to >=0.3.0
Updates the requirements on [nornir-utils](https://github.com/nornir-automation/nornir-utils) to permit the latest version.
- [Release notes](https://github.com/nornir-automation/nornir-utils/releases)
- [Changelog](https://github.com/nornir-automation/nornir-utils/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nornir-automation/nornir-utils/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: nornir-utils
  dependency-version: 0.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-15 11:22:59 +00:00
dependabot[bot] c9a367a32f Update pyjwt requirement from >=2.10.1 to >=2.15.1
Updates the requirements on [pyjwt](https://github.com/jpadilla/pyjwt) to permit the latest version.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.10.1...2.15.1)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-version: 2.15.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-15 11:22:50 +00:00
dependabot[bot] cf75aeeac0 Update langsmith requirement from >=0.7.7 to >=0.14.7
Updates the requirements on [langsmith](https://github.com/langchain-ai/langsmith-sdk) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langsmith-sdk/releases)
- [Commits](https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.7...v0.14.7)

---
updated-dependencies:
- dependency-name: langsmith
  dependency-version: 0.14.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-15 11:22:45 +00:00
dependabot[bot] a27c135840 Update tiktoken requirement from >=0.8.0 to >=0.14.0
Updates the requirements on [tiktoken](https://github.com/openai/tiktoken) to permit the latest version.
- [Release notes](https://github.com/openai/tiktoken/releases)
- [Changelog](https://github.com/openai/tiktoken/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openai/tiktoken/compare/0.8.0...0.14.0)

---
updated-dependencies:
- dependency-name: tiktoken
  dependency-version: 0.14.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-15 11:22:35 +00:00
Jeremy Grossmann 716edc3a6a Merge pull request #2993 from yueguobin/feat/multi-kernel-capture
Concurrent kernel captures, one per interface
2026-10-15 06:02:58 +02:00
Jeremy Grossmann 59759f8963 Merge pull request #2994 from yueguobin/docs/packet-filters-guide
docs: packet filters — parameter reference, per-filter guide and REST examples
2026-10-15 05:59:47 +02:00
YueGuobin eda2d640ab docs: packet filters — deepen the per-filter guide with mechanism notes
Follow-up enrichments to the Per-filter guide, one per filter, each
answering the question a reader asks right after "what does it do":

- window_drop: explicit recurrence formula ([Start + k*Period, +Outage),
  duty cycle) and ASCII timelines of the three forms (one-shot /
  recurring / jittered); Chance spelled out as an independent per-packet
  draw gated to the window; jitter explained as per-cycle re-draws that
  break phase-locking with protocol timers
- quota: transparent until the budget is consumed; Chance equals
  packet_loss in draw mathematics but runs in the eBPF classifier stage
  (no correlation parameter, outside seed, invisible to captures)
- limit: the phantom-loss symptom (throughput below the configured rate
  with rate+delay set = the 1000 default overflowing)
- seed: reproduction also requires the same traffic pattern (draws are
  consumed per arriving packet); one pinned realization is not the
  distribution — statistical conclusions need several seeds
- gemodel: scattered-vs-bursty timeline at the same 5% mean (fast
  retransmit vs RTO), and a parameter recipe (M and L -> r, p)
- reorder: the mechanism is queue-jumping on the netem delay queue —
  hence the delay requirement, the limit overflow interaction and the
  delay-bounded reorder depth
- rate: per-direction independent shaping (symmetric full duplex, no
  shared budget); asymmetric rates need in-guest netem
- duplicate: real-world prototype (802.11 ARQ retransmissions), example
  values with the correlation-collapse anchors (10/25 -> ~1.8%, 25/25
  -> ~16.7%)
2026-10-15 01:08:53 +08:00
YueGuobin 63873f6041 docs: packet filters — parameter reference, per-filter guide and REST examples
Make the feature doc usable as a standalone reference:

- Parameter reference: all 13 filters' parameters, ranges and units, the
  cross-filter rules (reorder+delay, gemodel/packet_loss exclusivity,
  period>=outage, distribution needs jitter), the zero-means-disabled
  convention, and the UI display names served by available_filters
  (the Web UI labels gemodel as "Gilbert-Elliot loss", never by type)
- Per-filter guide: purpose, per-parameter meaning, caveats and a copyable
  example for each of the 13 types, including the four jitter
  distributions compared (uniform/normal/pareto/paretonormal)
- REST surface: endpoint table with privileges, a filters PUT example,
  and common recipes (WAN latency, bursty loss via gemodel, rate cap,
  ICMP blackhole, scheduled outage)
- Clarify gemodel's "one-way" mean: per direction, independent instances
  per endpoint, round trip compounds to 1-(1-mean)^2; one-directional
  loss is not expressible through the link filters dict
- Fix an inaccuracy: available_filters is a dedicated endpoint's response,
  not a field of the link payload
2026-10-15 00:50:46 +08:00
YueGuobin 3e6a53c4b9 style: apply ruff format to the files this branch touches 2026-10-14 22:13:58 +08:00
YueGuobin 97b5514134 style: zip() with strict= in the capture e2e assert message 2026-10-14 22:09:53 +08:00
YueGuobin 9e0d5050db feat: concurrent kernel captures, one per interface
uBridge's capture module now serves one AF_PACKET capture per interface,
any number per process, and `capture stop_kernel` takes the interface it
stops — this rides that (breaking, paired-binary) protocol change.

The server-side single-slot tracker (_kernel_capture_ifc with its
reserve/release/owned_by helpers) is gone: same-port duplicates were
already refused by the NIO capturing flag, uBridge answers EALREADY on a
same-interface duplicate, and per-interface stops removed the process-
wide stop the ownership gating guarded against.

The docker e2e drives ten concurrent captures on one node's uBridge and
asserts a per-interface stop freezes exactly the stopped half while the
live half keeps recording.
2026-10-14 21:52:34 +08:00
Jeremy Grossmann 149549e029 Merge pull request #2990 from yueguobin/fix/cloud-hide-kernel-datapath-interfaces
Hide kernel-datapath interfaces from the cloud node
2026-10-14 05:55:34 +02:00
YueGuobin c0568dc25f fix: hide kernel-datapath interfaces from the cloud node
The cloud node offered the kernel datapath's host-side interfaces —
node anchors (gv/gq/gi/gd/gx/gp), switch cascade veth ends (gs) and
cross-compute VXLAN devices (gvl) — in its interface list and even
pre-filled them as ports on a freshly created cloud: none of them is
flagged special and only "gns3*" names were filtered. These interfaces
belong to the link or node that created them for the project's whole
lifetime, so bridging a cloud to one would race its owner.

Add is_kernel_datapath_interface() next to the naming contract in
utils/kernel_anchor.py: exact-shape matching (prefix plus its
fixed-length id-derived tail), so a user interface that merely starts
with "gv" is never swallowed. The cloud keeps managed names out of its
host-interface list and default ports mapping, while saved mappings
keep working (the existence checks still see the full interface list).
2026-10-14 10:11:49 +08:00
Jeremy Grossmann b08441b9ad Merge pull request #2983 from yueguobin/fix/docker-image-digest-translation
fix(docker): accept the pinned image id when the two daemons report different ids for the same content
2026-10-13 16:23:39 +02:00
Jeremy Grossmann c188a7f21a Merge pull request #2989 from GNS3/dependabot/pip/3.1/pyyaml-gte-6.0.3
Update pyyaml requirement from >=6.0.0 to >=6.0.3
2026-10-13 16:20:58 +02:00
Jeremy Grossmann 3a0b00e8ab Merge pull request #2988 from GNS3/dependabot/pip/3.1/langchain-aws-gte-1.8.1
Update langchain-aws requirement from >=1.3.1 to >=1.8.1
2026-10-13 16:17:33 +02:00
Jeremy Grossmann 126b6dd14e Merge pull request #2986 from GNS3/dependabot/pip/3.1/nornir-salt-gte-0.23.4
Update nornir-salt requirement from >=0.23.0 to >=0.23.4
2026-10-13 15:58:14 +02:00
Jeremy Grossmann 56aa77b809 Merge pull request #2985 from GNS3/dependabot/pip/3.1/setuptools-gte-84.0.0
Update setuptools requirement from >=61.0 to >=84.0.0
2026-10-13 15:56:35 +02:00
dependabot[bot] af430439ce Update pyyaml requirement from >=6.0.0 to >=6.0.3
Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0...6.0.3)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-13 13:32:08 +00:00
dependabot[bot] 1ec79601ac Update langchain-aws requirement from >=1.3.1 to >=1.8.1
Updates the requirements on [langchain-aws](https://github.com/langchain-ai/langchain-aws) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain-aws/releases)
- [Commits](https://github.com/langchain-ai/langchain-aws/compare/langchain-aws==1.3.1...langchain-aws==1.8.1)

---
updated-dependencies:
- dependency-name: langchain-aws
  dependency-version: 1.8.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-13 13:32:04 +00:00
dependabot[bot] 6bb44d0efc Update nornir-salt requirement from >=0.23.0 to >=0.23.4
Updates the requirements on [nornir-salt](https://github.com/dmulyalin/nornir-salt) to permit the latest version.
- [Release notes](https://github.com/dmulyalin/nornir-salt/releases)
- [Commits](https://github.com/dmulyalin/nornir-salt/compare/0.23.0...0.23.4)

---
updated-dependencies:
- dependency-name: nornir-salt
  dependency-version: 0.23.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-13 13:31:53 +00:00
dependabot[bot] a839a90e65 Update setuptools requirement from >=61.0 to >=84.0.0
Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v61.0.0...v84.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 84.0.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-13 13:31:48 +00:00
grossmj e8c641bd08 docs: update comments regarding Ethernet switch replacement with Linux bridge 2026-10-13 20:18:29 +07:00
YueGuobin 90917c4a2c fix(docker): accept the pinned image id when the stores report different ids
Docker ids are not comparable across image stores: for the same content a
classic store reports the config digest while a containerd store (or an
image loaded from an OCI archive) reports the manifest digest. The
controller pins the id of its own daemon, so a compute whose store reports
another id for that content answered ImageMissingError forever: every node
creation streamed the image again (save/load round trip) without ever
converging, then failed with "The image 'x' is missing" after the six
retries. Docker 29 makes this easy to hit, since the id a daemon reports
now depends on how the image entered it.

The load endpoint now takes the tag and the digest pinned by the
controller, and the compute records how its own daemon identifies the
image it just received. Node creation accepts the pin through that pair,
and only while the tag still resolves to the synced content: a tag moved
to some other image, or an image the controller never pushed here, still
counts as missing. The pair lives in the compute process, so a restarted
compute syncs once more.

Computes that predate the new endpoint parameters keep the previous
behaviour, as do controllers that do not send them.
2026-10-13 17:10:17 +08:00
Jeremy Grossmann 2799780eca Merge pull request #2980 from yueguobin/docs/vpcs-anchor-startup
docs: amend vpcs-kernel-datapath.md with the anchor startup sequence
2026-10-12 14:58:25 +02:00
YueGuobin 031abf0e52 docs: record the VPCS anchor startup sequence and capability model
The ordered startup (uBridge creates the persistent TAP and hands it to
the server's uid before vpcs is launched, vpcs attaches with -e -d), why
the attach needs no privileges while creating a TAP does, that uBridge
stays off the data path, and that the setcap in the vpcs install target
is for standalone use only.
2026-10-12 20:10:56 +08:00
Jeremy Grossmann 6d838c890d Merge pull request #2979 from yueguobin/feat/vpcs-kernel-datapath
feat: VPCS kernel datapath
2026-10-12 13:12:43 +02:00
YueGuobin 3f2b44101f style: apply ruff format to the VPCS datapath test 2026-10-12 17:26:46 +08:00
YueGuobin c7ffe919dc feat: VPCS kernel datapath
A VPCS node's single adapter anchors on a persistent TAP the server
creates (tap create + set_owner via uBridge) and the vpcs process
attaches to by name: -e -d <gp{id8}e0p0> -n, the same
server-creates/guest-attaches shape as QEMU's netdev. -n (a vpcs fork
feature) keeps the guest's ip command from ifconfig'ing the anchor on
the host; the vpcs build is probed once per binary identity
(vpcs_tap capability, usage scan) and gates kernel links together
with ubridge_tap — anything else keeps the node on the relay (the
legacy local UDP tunnel on a stock binary, an AF_PACKET endpoint on
the anchor with a capable one).

VPCSVM takes KernelDatapathMixin: _connect_nio dispatches kernel
(enslave into the per-link bridge) / relay-on-anchor / legacy,
captures pick capture start_kernel vs the bridge engine, stop runs
under an execute lock and terminates the process before deleting the
anchor TAPs (a held device refuses deletion), and the duplicate-port
guard backstops the controller's. The NIO routes accept nio_bridge
and write suspend back on update.

_delete_anchor_taps verifies each tap is gone from sysfs and retries
a bounded three times: a holder can release its fd a moment after its
process was reaped (vpcs's daemon parent kills its console child and
exits first), so the unconditional delete raced EBUSY and leaked the
anchor intermittently.

The vpcs side needs IFNAMSIZ (16) instead of its own IFNAMESIZ (12)
for the -d name buffer — anchor names are 14 chars and truncated to a
nonexistent device, which TUNSETIFF then tries to create without
CAP_NET_ADMIN (fixed in the vpcs fork).

e2e (tests/e2e/test_vpcs_kernel_datapath.py): kernel and relay
scenarios green against the real binary — real ICMP both ways, §E.1/§
E.2 on the anchors, delay/suspend/capture, link delete/re-create,
node stop/restart self-heal, zero leftovers; the relay control passes
with both the fork binary and a stock one.
2026-10-12 17:19:57 +08:00
Jeremy Grossmann ad8f5430e2 Merge branch '3.1' into python-3.15-support 2026-10-11 16:59:19 +02:00
Jeremy Grossmann 4ced753e8d Merge pull request #2969 from GNS3/cache-apt-packages
ci: add caching for APT packages
2026-10-11 16:59:01 +02:00
grossmj 806f7b6cf2 ci: use cache-apt-pkgs-action to install sharkd 2026-10-11 21:34:56 +07:00
grossmj 5592bad023 feat: add support for Python 3.15 2026-10-11 16:58:39 +07:00
Jeremy Grossmann cb8918b584 Merge pull request #2976 from GNS3/enable-iou-l1-keepalive
fix: enable Layer 1 keepalives by default at the template level
2026-10-11 11:57:22 +02:00
grossmj dff5fbfd7d fix: enable Layer 1 keepalives by default at the template level 2026-10-11 16:50:14 +07:00
grossmj a437d46138 Revert "fix: enable Layer 1 keepalives by default. Ref #2975"
This reverts commit e4c25549f0.
2026-10-11 16:44:07 +07:00
grossmj e4c25549f0 fix: enable Layer 1 keepalives by default. Ref #2975 2026-10-11 16:34:44 +07:00
Jeremy Grossmann 2e3557d534 Merge pull request #2974 from GNS3/bugfix/2935
fix: update error logging to handle exceptions in WebSockets
2026-10-10 12:40:48 +02:00
grossmj 6aaa0c578c fix: update error logging to handle exceptions in WebSockets 2026-10-10 17:32:44 +07:00
Jeremy Grossmann bf9278adbc Merge branch '3.1' into cache-apt-packages 2026-10-10 12:15:43 +02:00
Jeremy Grossmann d50b1996e3 Merge pull request #2971 from yueguobin/feat/mcp-text-drawing-tool
feat(mcp): Web UI compatible drawing creation (text tool + shared SVG builders)
2026-10-10 12:15:27 +02:00
Guobin Yue c66d678e35 Merge branch '3.1' into feat/mcp-text-drawing-tool 2026-10-10 15:00:57 +08:00
Jeremy Grossmann e4e117013d Merge pull request #2973 from GNS3/depfix/2725
Fix CVE-2026-44405
2026-10-10 08:53:57 +02:00
grossmj 3f76d43ffc fix(deps): update paramiko and netmiko versions to address security vulnerability 2026-10-10 13:45:34 +07:00
YueGuobin 23f117de51 style: apply ruff format to drawing builder files 2026-10-10 14:34:28 +08:00
Guobin Yue cff42e32e8 Merge branch '3.1' into feat/mcp-text-drawing-tool 2026-10-10 14:22:47 +08:00
Jeremy Grossmann be06f753ab Merge pull request #2970 from yueguobin/fix/node-lifecycle-status-flood
fix(controller): stop flooding clients with transitional node statuses
2026-10-10 07:22:56 +02:00
Jeremy Grossmann 11c10dd85c Merge branch '3.1' into fix/node-lifecycle-status-flood 2026-10-10 06:49:50 +02:00
Jeremy Grossmann 2bf35c31e4 Merge branch '3.1' into feat/mcp-text-drawing-tool 2026-10-10 06:49:24 +02:00
Jeremy Grossmann 15dd9f7d18 Merge pull request #2959 from markparonyan/api-issue-10-0eztih
feat: add response models for endpoints returning untyped objects
2026-10-10 06:49:07 +02:00
grossmj 4fc601e919 refactor: remove unused link filter schemas and fix test_add_v8_version_appliance 2026-10-10 06:40:52 +02:00
grossmj 6004e06499 Merge branch '3.1' into fork/markparonyan/api-issue-10-0eztih
# Conflicts:
#	gns3server/schemas/__init__.py
2026-10-10 06:39:15 +02:00
grossmj 64d4defae2 ci: add cache hit status logging 2026-10-09 19:06:55 +02:00
grossmj e206e70300 ci: update APT cache key 2026-10-09 18:56:05 +02:00
grossmj 5497b0368a ci: use cache@v6 2026-10-09 18:31:22 +02:00
YueGuobin 0796d455a0 test: make the version output test order-independent
controller_host is recorded on the mounted compute sub-application
when the controller queries the compute capabilities; the test relied
on another test having made that call first and failed when run on
its own. Set the state directly in the test.
2026-10-10 00:29:17 +08:00
grossmj 437fa5458e ci: add caching for APT packages 2026-10-09 18:27:49 +02:00
YueGuobin 82015dcb5c fix(controller): stop flooding clients with transitional node statuses
Every node lifecycle call (start/stop) emitted a "starting"/"stopping"
node.updated notification on entry, and for the whole duration of the
call asdict() masked the real status with the transitional one — every
compute event forwarded in that window was re-emitted as a duplicate
transitional status.

Stop-all/start-all on a 13-node project pushed two transitional events
per node before the final state. Clients that do not render these
transitional statuses (the Web UI) showed nodes flickering through an
unexpected suspended-looking state before reaching started/stopped.

Remove the transitional notification and the status masking: clients
see the real statuses again (started/stopped), from the forwarded
compute events plus the controller-side confirmation. The wait option
on the lifecycle routes, the strict stop error handling and
wait_for_status() are unchanged.
2026-10-10 00:24:20 +08:00
Jeremy Grossmann 5c6478e77e Merge pull request #2944 from yueguobin/fix/duplicate-device-configs-merge
Kernel datapath: wire local Ethernet links through host kernel interfaces (veth/TAP + Linux bridges)
2026-10-09 17:00:22 +02:00
Guobin Yue 7df7ce1c96 Merge branch '3.1' into fix/duplicate-device-configs-merge 2026-10-09 21:23:38 +08:00
Jeremy Grossmann fbe93c4c4e Merge pull request #2954 from markparonyan/api-issue-05-2xftmd
feat(api): add strict_names and batch node and link creation
2026-10-09 14:39:10 +02:00
grossmj 4195f3b7c1 fix: remove incorrectly merged code 2026-10-09 14:29:04 +02:00
grossmj 868973bb7c Revert "fix: "LinkFilterParameter" already defined"
This reverts commit 8fee1d4c36.
2026-10-09 13:22:41 +02:00
YueGuobin 4de6758e2f refactor(mcp): drop the raw drawing_create tool
The templated drawing_create_text/_rectangle/_ellipse tools cover the
LLM-relevant creation paths, and line/image/curve creation is not
needed from MCP or copilot for now. The management tools stay, so
existing drawings (including images and lines created in the Web UI)
remain fully manageable; drawing_update's raw svg parameter remains
the escape hatch for edits.
2026-10-09 11:12:18 +08:00
YueGuobin 5e8272fdd8 feat(agent): share Web UI compatible drawing builders between MCP and copilot
The text drawing tool was MCP-only; the copilot needs the same
capability and its area-annotation helper carried the same Web UI
compat bugs. Split into three layers with a single implementation:

- gns3server/utils/drawings.py: pure SVG builders (text, rectangle,
  ellipse) with full input validation (ValueError) — the Web UI
  format knowledge lives in core utils next to picture.py
- api_handlers.py: shared REST handlers (create_text_drawing_handler
  moved here, create_rectangle/ellipse_drawing_handler added) — the
  layer both consumers already share
- thin shells: MCP tools (drawing_create_text unchanged, plus new
  drawing_create_rectangle/_ellipse) and three LangChain tools
  (tools_v2/gns3_create_drawing.py) registered in both copilot mode
  lists

Shape builder details:

- rectangle: solid fill or "none", stroke block emitted only when a
  stroke is given, rx corner radius, dasharray validated against the
  Web UI's Qt remap table (QtDasharrayFixer rewrites those patterns)
- ellipse: bounding-box API; cx/cy derived as offsets inside the
  drawing box (the Web UI treats them as box-relative, not canvas
  coordinates); odd sizes round down and the actual size is returned

gns3_drawing_utils now delegates to the shared builders, fixing the
px-blind sizing, the ignored text-anchor/x/y centering and the
missing XML escaping in the area-annotation path.
2026-10-09 11:12:18 +08:00
YueGuobin 73cbb0387c feat(mcp): add drawing_create_text tool with Web UI compatible SVG assembly
The Web UI re-parses drawing SVG into its own element model instead of
rendering it raw, which makes hand-assembled SVG error-prone for LLM
callers. The new tool assembles the SVG server-side, mirroring what the
Web UI itself serializes for text drawings:

- XML-escaped text content, validated color (#RGB/#RGBA/#RRGGBB/
  #RRGGBBAA) and font family (attribute-safe charset)
- multi-line support: literal newlines render as stacked lines in the
  Web UI (tspan split), width/height computed from the longest line
- pt-aware sizing: the Web UI renders font-size in pt (1pt = 4/3 px),
  so width uses a 0.8/char factor for monospace (1.0 proportional) and
  line height 1.9 x font_size, instead of the px-based 0.62 estimate
- ET.fromstring pre-check so bad input fails loudly instead of hitting
  the controller's silent drop of unparseable 500+ char SVG
- computed width/height/line_height returned for label layout

Also correct the raw drawing_create docstring: root width/height are
required (the parser reads them for the selection box), x/y on rect are
ignored, <g> is unsupported, <path> is re-interpreted as a freehand
curve, and the old examples lacked the mandatory root dimensions.
2026-10-09 11:12:18 +08:00
YueGuobin 1e0d123f4b Merge branch '3.1' into fix/duplicate-device-configs-merge
Resolve conflicts against the upstream wave (PRs #2952-#2965, incl. the
typed-response/schema hardening and the drop of Python 3.10):

- controller/node.py: keep upstream's _transitioning/_confirm_status
  lifecycle guard; the kernel-anchor link wiring (node_started) runs
  after the transition completes.
- controller/link.py: keep upstream's add_node rollback (release_ports
  on create failure) and delete via release_ports; release_ports now
  resolves ports live (same staleness reason as _bind_members) and
  discards the node link unconditionally.
- schemas/controller/links.py: extend LinkFilterType with the eight
  kernel-datapath filter types and LinkFilterParameter.type with "str"
  so the newly typed /available_filters response validates; Link.filters
  stays a free-form dict — the vocabulary is capability-gated per link
  and validated by the controller (409), not by a strict request schema.
- schemas/controller/topology.py: drop the type: ignore made redundant
  by the dict filters field.
- tests: route-level filter validation now expects the controller's 409
  (unknown types, out-of-range values); packet_loss correlation is a
  valid kernel parameter (positive test added); OpenAPI assertions match
  the free-form filters property.
2026-10-09 10:03:50 +08:00
Jeremy Grossmann aab707a48e Merge branch '3.1' into api-issue-10-0eztih 2026-10-08 19:31:48 +02:00
grossmj 8fee1d4c36 fix: "LinkFilterParameter" already defined 2026-10-08 19:31:25 +02:00
Jeremy Grossmann acfd4f9c1b Merge pull request #2956 from markparonyan/api-issue-07-x7z6we
feat(api): generate unique readable OpenAPI operationIds
2026-10-08 19:26:08 +02:00
Mark Paronyan 719d9cc667 refactor: ruff fixes 2026-10-08 20:25:20 +03:00
Jeremy Grossmann aeac649c7f Merge branch '3.1' into api-issue-10-0eztih 2026-10-08 19:21:07 +02:00
grossmj 34266d9d7b style: reorder imports for comply with lint 2026-10-08 19:16:57 +02:00
Jeremy Grossmann 2dd1652e8a Merge branch '3.1' into api-issue-07-x7z6we 2026-10-08 19:10:42 +02:00
Jeremy Grossmann 044b23564d Merge pull request #2955 from markparonyan/api-issue-06-8s9swu
fix(api): declare binary and streaming bodies in OpenAPI
2026-10-08 19:08:42 +02:00
Jeremy Grossmann 57e4d1632d Merge branch '3.1' into api-issue-05-2xftmd 2026-10-08 19:04:36 +02:00
Jeremy Grossmann 7a3a34d3fc Merge branch '3.1' into api-issue-06-8s9swu 2026-10-08 19:01:57 +02:00
Jeremy Grossmann 24634b8f0d Merge pull request #2965 from GNS3/drop-python-3.10
Drop Python 3.10 support
2026-10-08 19:01:34 +02:00
grossmj d1d4e7dce5 fix(deps): install the SQLAlchemy asyncio module so the 'greenlet' library is installed 2026-10-08 18:45:04 +02:00
grossmj e0260f27c7 fix(rbac): annotate query variables with Select type for better type checking 2026-10-08 18:39:20 +02:00
Jeremy Grossmann 8dd438190d Merge pull request #2960 from markparonyan/api-issue-12-cu0jkp
feat(api): add discriminators to link iface, appliance version and template settings schemas
2026-10-08 17:17:02 +02:00
grossmj d8118fa355 chore(deps): downgrade websockets to v16.1.1 2026-10-08 17:08:17 +02:00
grossmj f50653107b style: fix import and lint errors after merging 2026-10-08 16:57:41 +02:00
Jeremy Grossmann 48ac1ee5b7 Merge branch '3.1' into drop-python-3.10 2026-10-08 16:56:36 +02:00
Jeremy Grossmann 451e947d65 Merge pull request #2962 from markparonyan/api-issue-15-r12z73
fix(api): derive OpenAPI version from package, add servers, hide AI stub routes
2026-10-08 16:50:59 +02:00
Jeremy Grossmann cea858acc4 Merge branch '3.1' into api-issue-12-cu0jkp 2026-10-08 16:46:37 +02:00
Jeremy Grossmann 029983260c Merge branch '3.1' into api-issue-15-r12z73 2026-10-08 16:42:57 +02:00
grossmj 57286c4f09 style: fix lint errors 2026-10-08 16:01:51 +02:00
Jeremy Grossmann ddcf661e11 Merge branch '3.1' into api-issue-07-x7z6we 2026-10-08 15:51:11 +02:00
grossmj 917b19d808 chore(deps): update dependencies 2026-10-08 15:40:29 +02:00
grossmj 2642345b0a fix: import errors 2026-10-08 15:33:53 +02:00
grossmj 059056e97f Revert "Set target-version = "py310" in pyproject.toml"
This reverts commit 330741598a.
2026-10-08 15:27:53 +02:00
grossmj 330741598a Set target-version = "py310" in pyproject.toml 2026-10-08 15:25:32 +02:00
grossmj 90a98e7a45 Python 3.15 is not yet available on GA 2026-10-08 15:16:58 +02:00
grossmj 811b45f863 fix: drop Python 3.10 and add Python 3.15 support 2026-10-08 15:14:34 +02:00
Jeremy Grossmann 3187828325 Merge branch '3.1' into api-issue-06-8s9swu 2026-10-08 15:02:51 +02:00
Jeremy Grossmann a9e5f859c8 Reorder import statements in test_nodes.py 2026-10-08 14:49:12 +02:00
Jeremy Grossmann 71da996362 Merge branch '3.1' into api-issue-05-2xftmd 2026-10-08 14:40:53 +02:00
Jeremy Grossmann 83d5bf6835 Merge pull request #2953 from markparonyan/api-issue-04-burx2g
fix(links): reserve ports on add, accept port name and auto, add port_in_use code
2026-10-08 14:26:50 +02:00
Jeremy Grossmann 53f3169107 Fix module list after merging 2026-10-08 14:17:07 +02:00
Jeremy Grossmann a32f466183 Merge branch '3.1' into api-issue-04-burx2g 2026-10-08 13:59:00 +02:00
YueGuobin d640050d4b docs(features): quantify the kernel netem correl bias that collapses small rates
The kernel's correlated-random generator (get_crandom, sch_netem.c) truncates
instead of wrapping, starving both edges of the stationary distribution: an
event threshold below the correlation value is almost never reached. Measured
with stock iproute2 on this kernel — uBridge's netlink encoding is identical:
loss 1% + correl 25% drops nothing over 2000 pings (expected ~2%), 10%/25%
measures ~1.8% one way, only the 50% symmetry point survives. duplicate and
reorder correl share the same comparison structure and collapse the same way;
gemodel is immune (Markov chain over plain uniform draws) and is the honest
tool for bursty loss at a chosen mean rate.

Documented in the packet-filters correlation-bias bullet, and surfaced in the
two machine-facing descriptions (MCP link_update packet_loss note, controller
filter schema) so agents and clients stop walking into the trap.
2026-10-08 19:42:18 +08:00
Jeremy Grossmann 48b6257410 Merge pull request #2952 from markparonyan/api-issue-02-rp8mx3
feat(api): return node and add wait option on node lifecycle calls
2026-10-08 11:05:28 +02:00
Jeremy Grossmann 5055664456 Merge pull request #2957 from markparonyan/api-issue-08-67pip0
feat(api): add machine-readable error codes and align OpenAPI error schemas
2026-10-08 09:30:13 +02:00
Jeremy Grossmann ed8b0c3e20 Merge pull request #2958 from markparonyan/api-issue-09-aef9as
feat(api): return token lifetimes and document API keys as bearer tokens
2026-10-08 04:35:19 +02:00
Jeremy Grossmann dc57c95f1c Merge pull request #2963 from markparonyan/api-issue-16-0gmylm
feat(api): add Snapshot.created and type NodeFile timestamps as date-time
2026-10-08 04:15:01 +02:00
Jeremy Grossmann d797069921 Merge pull request #2964 from markparonyan/api-issue-17-asr039
feat: add optional ETag/If-Match concurrency for projects, nodes and links
2026-10-08 04:14:04 +02:00
Jeremy Grossmann 0a78a2bf12 Merge pull request #2961 from markparonyan/api-issue-13-bfbm9z
feat(api): add Notification schema and document notification streams
2026-10-08 04:11:14 +02:00
Jeremy Grossmann bcf38d74f8 Merge pull request #2951 from markparonyan/api-issue-11-gqdty1
feat(api): type link filters and available_filters response
2026-10-07 18:25:30 +02:00
Guobin Yue 5238bd3b39 Merge branch '3.1' into fix/duplicate-device-configs-merge 2026-10-07 23:59:30 +08:00
YueGuobin 5be4f52a2f docs(features): describe how the 13 filter types combine
A "Combining filters" section for packet-filters.md: deterministic drops
are an OR-gate (first kill wins — a clsact-dropped frame consumes no rate
serialization, no limit capacity and no netem counter), netem draws are
independent probabilities that multiply in one qdisc pass, and a round
trip squares everything. The couplings that do exist: quota's byte count
sees only frequency_drop survivors (ordered evaluation slows the burn),
delay/reorder/rate fold into one time_to_send, limit x rate x delay is
the tail-drop triangle to watch, and seed pins netem's draws but not the
eBPF program's own PRNG. Closes with a fully-loaded 12-filter walkthrough
of one frame through the gauntlet.
2026-10-07 22:47:15 +08:00
YueGuobin 96006dcf58 docs(features): give packet filters their own doc with the evaluation-order diagram
The Packet filters section of docker-kernel-datapath.md was the de-facto
filter documentation every other datapath doc pointed at; move it to
features/packet-filters.md as the node-type-neutral home (veth or TAP
anchor), centered on a mermaid walkthrough of all 13 types through the
anchor's egress chain: clsact first (the eBPF stateful classifier's nth /
quota / window modes at prio 1, then the bpf expression lines at 10-99,
first drop wins), the single netem qdisc behind it (enqueue draws, one
time_to_send drained by the delay queue).

Clarify a naming trap the table verbs invite: uBridge's tc module only
borrows the iproute2 vocabulary — the tc ... tokens are its own hypervisor
command names over hand-built netlink messages (RTM_NEWQDISC /
RTM_NEWTFILTER), raw bpf() syscalls, embedded distribution tables and
instruction array, libpcap as a library only; the tc binary is never
invoked outside the test suite's oracles. Verified against the uBridge
sources (hypervisor_tc.c, tc_impair.bpf.c, tc_ebpf.c), not just the
commands gns3-server sends.

docker-kernel-datapath.md keeps a pointer section; the iol doc's filter
reference and docs/README.md's tree and catalog point at the new doc.
2026-10-07 22:39:39 +08:00
Mark Paronyan 241c2b65e7 feat: add optional ETag/If-Match concurrency for projects, nodes and links 2026-10-07 16:53:11 +03:00
Mark Paronyan db031416a1 feat: add response models for endpoints returning untyped objects 2026-10-07 16:49:31 +03:00
Mark Paronyan 6ed9e44f00 feat(api): generate unique readable OpenAPI operationIds 2026-10-07 15:53:00 +03:00
Mark Paronyan 11a310dd9b feat(api): type link filters and available_filters response 2026-10-07 15:48:52 +03:00
Mark Paronyan a9e87df644 fix(links): reserve ports on add, accept port name and auto, add port_in_use code 2026-10-07 15:41:04 +03:00
Mark Paronyan e1a27dadcf feat(api): add strict_names and batch node and link creation 2026-10-07 15:35:45 +03:00
Mark Paronyan 6a416d1a2a feat(api): return node and add wait option on node lifecycle calls 2026-10-07 15:35:11 +03:00
Mark Paronyan ead44787f3 feat(api): add Snapshot.created and type NodeFile timestamps as date-time 2026-10-07 15:25:15 +03:00
Mark Paronyan 8cb92e7685 fix(api): derive OpenAPI version from package, add servers, hide AI stub routes 2026-10-07 15:21:30 +03:00
Mark Paronyan 86a279330d feat(api): add Notification schema and document notification streams 2026-10-07 15:14:50 +03:00
Jeremy Grossmann 0836e01525 Merge pull request #2950 from markparonyan/api-issue-14-yywwso
fix(api): return 200 instead of 201 for ACL endpoints, IOU license up…
2026-10-07 13:50:53 +02:00
Jeremy Grossmann 4eebe5c056 Merge pull request #2949 from markparonyan/api-issue-03-85fcdr
feat(api): add exact-match name filter to list endpoints
2026-10-07 13:41:59 +02:00
Mark Paronyan a4f20e0966 feat(api): add discriminators to link iface, appliance version and template settings schemas 2026-10-07 14:22:18 +03:00
Mark Paronyan fcfa968cc5 feat(api): return token lifetimes and document API keys as bearer tokens 2026-10-07 14:18:18 +03:00
Mark Paronyan 289f9394b6 feat(api): add machine-readable error codes and align OpenAPI error schemas 2026-10-07 14:15:41 +03:00
Mark Paronyan ba0465f191 fix(api): declare binary and streaming bodies in OpenAPI 2026-10-07 14:09:02 +03:00
Mark Paronyan 97d5480241 fix(api): return 200 instead of 201 for ACL endpoints, IOU license update 2026-10-07 13:56:08 +03:00
Mark Paronyan 852dc5be0f feat(api): add exact-match name filter to list endpoints 2026-10-07 13:40:34 +03:00
YueGuobin 980254b9e6 Merge branch 'feat/e2e-ipv6-dualstack' into fix/duplicate-device-configs-merge 2026-10-07 13:20:22 +08:00
YueGuobin 6459122113 test(e2e): run every traffic checkpoint dual-stack (IPv6)
The live suite asserted the datapath over IPv4 only. Give every guest a
ULA IPv6 address next to its v4 one and twin every v4 assertion point,
sharing the impairment window (one filter application, both families
asserted) so the runtime grows by minutes, not double.

- harness: configure_ios(eth_ipv6=), ping() dispatches to `ping ipv6`,
  docker_bring_up_ipv6 (the Docker daemon leaves eth0 with
  disable_ipv6=1 on v6-less bridge networks, so the interfaces-file
  route cannot work), family-aware docker_wait_address, pcap_records
  scans every record (a leading DAD/MLD frame must not mask the
  sampled ethertype), and pcap_icmp_rtt measures the wire round trip
  from capture timestamps;
- scenarios: connectivity/delay/suspend/isolation/churn checks in both
  families, captures assert 86dd next to 0800, the libpcap bpf drops
  are asserted family-selective (icmp vs icmp6, each killing its own
  family and leaving the other alive), the eBPF classifier modes on
  both families, marker v6 twins with an echo-specific expression
  (bare icmp6 also matches DAD/MLD and would break the exact counts),
  the v6 sharkd replay, and the link-local matrix gains the 86dd
  all-nodes row; serial (HDLC) legs stay v4-only;
- the dynamips-emulated classic IOS under-reports its `ping ipv6` RTT
  by ~40 % of a delayed round trip (pcap-verified: the wire carries the
  v6 echo exchange in the same ~230 ms as v4 while the console reports
  ~130 ms), so the dynamips-family scenarios assert the v6 delay from
  the capture's own timestamps — recorded in tests/e2e/README.md.

Full suite: 17 passed in 58m50s.
2026-10-07 13:19:38 +08:00
Jeremy Grossmann 2fb7056cb9 Merge pull request #2948 from cristian-ciobanu/ssh-web-console-crash
fix(console): keep SSH web console open after terminal resize
2026-10-07 04:58:08 +02:00
Cristi 51f7d06fae fix(console): keep SSH web console open after terminal resize 2026-10-07 00:21:03 +03:00
Jeremy Grossmann 49f047d07a Merge branch '3.1' into fix/duplicate-device-configs-merge 2026-10-06 17:09:32 +02:00
Jeremy Grossmann f051bf2505 Merge pull request #2945 from cristian-ciobanu/images-nested-folders-support
Support uploading images into nested subfolders inside predefined image directories, and check whether templates can be created for uploaded images based on  existing appliance definitions.
2026-10-06 17:07:28 +02:00
Jeremy Grossmann f184883aa7 Merge branch '3.1' into images-nested-folders-support 2026-10-06 16:50:40 +02:00
YueGuobin 96be37baa1 test: cover the namespace-failure veth cleanup and BridgeNIO field validation
Both fixes from the code-review pass were carried by other tests'
side effects: the move_to_ns failure path (the branch that used to skip
the delete_veth) and the required-but-nullable bridge field on the NIO
create routes.
2026-10-06 22:42:31 +08:00
Jeremy Grossmann 2d8ddb5ed7 Merge branch '3.1' into fix/duplicate-device-configs-merge 2026-10-06 16:34:48 +02:00
Jeremy Grossmann 37bcd9171e Merge pull request #2943 from markparonyan/fix-api
refactor: discriminate appliance settings by template_type
2026-10-06 16:21:31 +02:00
Jeremy Grossmann e2161fb66c Merge branch '3.1' into fix-api 2026-10-06 16:12:18 +02:00
Jeremy Grossmann 0170d2c8ce Merge branch '3.1' into fix/duplicate-device-configs-merge 2026-10-06 16:10:23 +02:00
Jeremy Grossmann 01425eb75d Merge pull request #2947 from markparonyan/fix-apii
refactor: derive update schemas with PartialUpdateModel
2026-10-06 16:07:19 +02:00
Mark Paronyan d9678ce98c refactor: derive update schemas with PartialUpdateModel 2026-10-06 16:46:22 +03:00
YueGuobin 1542a222f4 refactor: share the anchor-TAP lifecycle in the kernel-datapath mixin
The persistent-TAP lifecycle — probe, sweep, create, register, delete —
was implemented four times, once per node type, and the copies had drifted
(probe mechanism, _tap_datapath reset, keep-vs-recreate policy). The
mechanical half moves into KernelDatapathMixin:

- _probe_persistent_taps(probe_name): the scratch-TAP probe, returning the
  refusal for the caller's own warning (QEMU, Dynamips);
- _create_anchor_taps(ports, set_owner, keep_existing): sweep + create +
  optional ownership handover + carrier down + registry, with the ports
  enumerated by the node type and named through the new _tap_name hook;
- _delete_anchor_taps(): the suppressed tap sweep + per-link bridge
  cleanup + registry clear.

Each node type keeps what its fd holder dictates: the release step before
the tap sweep (the QEMU process, the IOL bridge, the hypervisor's NIO
bindings, the container port bridges), its probe policy, and its registry
lifetime. QEMU's now-unconditional registry clear aligns it with the other
three; everything else is behavior-preserving.
2026-10-06 21:17:50 +08:00
YueGuobin 35cf964882 test: cover the kernel-datapath review fixes
Regression coverage added with the fixes:
- capture-slot semantics: second-port refusal, failed-start rollback, and
  a non-owner port's stop not reaching `capture stop_kernel`;
- QEMU stop/start teardown on a mid-body or pre-launch failure, IOU start
  cleanup and filter guards, Dynamips half-attach undo plus retry;
- switch VLAN reconcile skipping a deferred anchor and rolling the
  ports_mapping back on failure;
- Docker/QEMU occupied-port refusal, probe ctime invalidation, probe
  survival of a failing uBridge start;
- env-marker dialects (mid-line mentions, falsy values) and the agent
  merge rejecting entries without a device_name.

Test-body imports of product modules move to the shared header.
2026-10-06 19:55:31 +08:00
YueGuobin c3c025ab2a fix: resolve the code-review findings on the kernel datapath
Compute:
- Track the anchor that owns uBridge's single AF_PACKET capture slot: a
  second kernel port's capture is refused with a clear error (its flag
  rolled back), a failed start no longer wedges the port, and only the
  owning port's stop issues the process-wide `capture stop_kernel`
  (docker/qemu/iou/dynamips/switch, via the mixin's slot helpers).
- Unwind failed starts instead of leaking uBridge and the anchor TAPs:
  QEMU's stop body runs under try/finally, QEMU and IOU start the datapath
  inside the launch try, Dynamips undoes a half-attached port (the retry
  used to be short-circuited into a silent black hole), and Docker deletes
  the veth pair when the namespace move fails.
- Restore the relay filter guard on IOU (kernel-only filters raise
  NodeError, an uncompilable BPF line degrades to a warning), validate the
  eBPF/quota/window/bpf filter shapes before touching the bridge (short or
  non-numeric values surfaced as 500s after partial state), and refuse a
  second NIO on an occupied Docker/QEMU port (the guard IOU and Dynamips
  already had).
- Probe fixes: `_probe_bridge_tap` survives a failing uBridge start, and
  the probe caches key on ctime too, so a chmod/setcap remedy re-probes.

Controller:
- Parse GNS3_UNIX_SOCKET_NIO like the compute does (line-anchored, truthy
  value) and mirror the compute's class selection in kernel_anchor_type.
- Read partial capability reports defensively; make BridgeNIO.bridge
  required-but-nullable so an omitted key is a 422 rather than a KeyError.
- Strip the packet_loss correlation slot even when it is zero: the relay
  filter takes exactly one argument and rejected `packet_loss 10 0`.

Ethernet switch: skip ports whose absorbed anchor does not exist yet (the
join is deferred by design) and roll the ports_mapping back when the VLAN
reconcile fails, so a retry still diffs against the old mapping.

Agent: reject device config entries without a device_name instead of
silently dropping them (a malformed batch used to execute partially while
reporting success).

Also split the netem builder to clear C901 and drop the two per-file ruff
ignores the PR had added, keeping the remove-only policy.
2026-10-06 19:55:21 +08:00
Cristi 5492105e58 fix(image-manager): Fix type-check errors in image uploads and appliance installation 2026-10-06 00:13:53 +03:00
Cristi a7f0c7174b fix(templates): Fixed template test formatting to pass CI 2026-10-06 00:04:26 +03:00
Mark Paronyan cbd4f457be Merge branch '3.1' into fix-api 2026-10-05 21:23:03 +03:00
Mark Paronyan b8e552ee9d refactor: ruff fixes 2026-10-05 21:05:24 +03:00
YueGuobin 87ca2138e3 chore(lint): apply the 3.1 f-string wave to the kernel-datapath code
The rebase onto 65c858d45 brought upstream's UP032 enforcement; the
conflict resolution kept this branch's semantics on the overlapping
lines, so their .format() calls needed the conversion afterwards
(ruff check --fix, 41 sites) plus the formatter's rewrap (7 files).

Replicates the CI recipe locally: pip check, ruff check/format, mypy
2.3.1 (clean, 434 files), unit suite 2216 passed.
2026-10-06 00:28:06 +08:00
YueGuobin 5841138cef docs(e2e): complete the README — requirements, image matrix, host notes
Adds what running the suite on a real machine actually requires (uBridge
with caps, tc for the filter assertions, a Docker daemon, cc -static for
the raw-frame probe), the full image-selection matrix (preferred
filenames, fallback patterns, per-folder layout, the alpine digest
ladder; missing images skip, never false-fail), the NetworkManager host
hazard and its record, timing/load sensitivity notes, the complete
GNS3_E2E_* environment-variable list — and the link-local scenario,
which the scenario list was missing.
2026-10-06 00:21:11 +08:00
YueGuobin f688e654e1 test(e2e): widen the fast-path RTT bound to 100 ms via harness.FAST_RTT_MS
The 'impairment cleared' asserts used avg < 50 on three-packet IOS pings;
the unimpaired baseline is 20-45 ms with 4 ms quantization, and host
scheduling jitter pushed averages to 54/56 in two full-suite runs
(esw, dynamips) — a margin, not an impairment (the qdisc asserts pass,
success is 100 %). The contrasted delayed regime is >= 150 ms, so a
100 ms bound still separates the two cleanly. Docker's sub-millisecond
veth asserts keep their 50 ms bound (three orders of magnitude of
headroom, never observed to flake).
2026-10-06 00:21:11 +08:00
YueGuobin f21d7be99c test(e2e): derive busybox ping loss from replies when the summary is lost
The exec stream can truncate after busybox's 4294967 ms RTT timer-wrap
artifact, dropping the summary line — docker_ping then reported a
phantom 100 % loss and made the corrupt-filter scenario fail spuriously.
Factor the parsing into _busybox_ping_parse: the summary stays
authoritative when present; otherwise the loss is derived from the
seq= replies actually seen (no replies at all still reports 100 %).
2026-10-06 00:21:11 +08:00
YueGuobin 15fbef93fb test(e2e): unmanage the TAP anchors in the remaining kernel scenarios
Same guard the ethernet-switch scenario already carries: NetworkManager
can release an NM-managed TAP from its bridge shortly after
(re-)enslavement (docs/bugs/networkmanager-tap-release.md). Applied to
the Dynamips, QEMU, IOU, IOL-runner and switch-cascade scenarios after
their nodes have booted (no-op where nmcli/NetworkManager is absent).
This keeps those tests deterministic on un-declared hosts.
2026-10-06 00:21:11 +08:00
YueGuobin 28e9b82a5f docs(bugs): managed-yes cannot re-arm the baseline once the conf matches 2026-10-06 00:21:11 +08:00
YueGuobin 20b7968e33 docs(bugs): note how to re-observe the baseline on an already-declared host 2026-10-06 00:21:11 +08:00
YueGuobin 6c73bb15f0 docs(bugs): embed the runnable TAP-release reproducer and the measurement method
The reproduction section described the harness only in prose; the actual
driver scripts were throwaway lab files. Embed the distilled, runnable
reproducer (drives uBridge's control socket through the repo's own client,
kept tap for the single-variable A/B), the exact measurement semantics
(40 re-enslavements, ~1 kHz / 200 ms membership sampling, a release = the
brif entry vanishing, latency print) and the flip protocol, so a reader
can reproduce the 19-20/40 vs 0/40 numbers on an affected host. Also point
the host-fix layer at the reproducer for re-verification.
2026-10-06 00:21:11 +08:00
YueGuobin 3018d3aecc docs(bugs): record the NetworkManager TAP-release root cause, repro and fix
A kernel-datapath link could die silently after a delete/recreate: on
NetworkManager hosts, NM's state machine releases an NM-managed TAP from
its bridge 58-87 ms after (re)enslavement (~50% while the tap has not
been assumed yet; the port stays up, no GNS3 process logs anything).
Root-caused with a server-free minimal harness (one uBridge, one tap,
one bridge, an addif/delif loop) and a single-variable NM A/B; the
NetworkManager side is explained by three of its commits (assumption
recheck on external enslavement, master removal during activation,
external changes not touching assumed slaves).

Records: forensic signatures (ifindex unchanged, flags 0x300 cleared,
heal-on-next-update), the reproducer, the verified host fix
(unmanaged-devices conf.d snippet: 19-20/40 -> 0/40, and the e2e
scenario green with test-side workarounds disabled), scope and history
(2016 issue #440 veth incident; the 2026-10-01 ethernet-switch
incident previously misattributed). Cross-linked from the L2-anchor
spec and the switch feature doc.
2026-10-06 00:21:11 +08:00
YueGuobin 1c85befbab test(e2e): take the switch anchors out of NetworkManager's reach
The esw kernel fast-path scenario deletes and re-creates a link, which
re-enslaves the peer anchor — and on NetworkManager hosts NM's netdev
state machine can release an NM-managed TAP from its bridge some 60-70 ms
after enslavement, ~50% of re-enslavements, while the tap is in NM's
not-yet-assumed state. The freed port stays administratively up and no
GNS3 process logs anything: the membership assert sees the join, then the
ping measures a silent blackhole (this was the line-277 e2e failure).

Root-caused with a server-free harness (one uBridge, one fresh tap, one
bridge, an addif/delif loop): the same tap frees 20/40 while NM-managed,
0/40 after `nmcli device set <tap> managed no`, 20/40 again when
re-managed. Docker's veth host ends are not NM-managed, which is why only
TAP anchors ever showed it — including the "anchor lost its bridge
membership after a ports_mapping update (TAP peers only)" incident from
the switch's development, whose conclusion is corrected in the docs.

Unmanage the anchors once the routers have booted, before the scenario
re-enslaves them; document the failure signature and the host-side remedy
(per-device nmcli call, or NM unmanaged-devices configuration) in the
L2-anchor spec and the switch feature doc.
2026-10-06 00:21:11 +08:00
YueGuobin dc5e2d90ba fix(iou): keep BridgeNIO filters across the NIO update route
Upstream's mypy pass narrowed the filter copy to UDPNIO only (the
Ethernet/TAP members of the union have no filters field). BridgeNIO —
the kernel-datapath NIO — carries filters too, so on an IOU kernel link
every PUT of a link's filters cleared them and applied nothing: netem
never landed on the anchor (e2e test_iou_kernel_datapath caught it).

Narrow to (UDPNIO, BridgeNIO): still avoids attribute access on the
models without the field, keeps both filter-carrying types.
2026-10-06 00:21:11 +08:00
YueGuobin 7d04d08dba fix: repair imports lost in the 3.1 rebase and meet the new lint baseline
The rebase onto upstream 3.1 (mypy + ruff I001/F401 waves) left the tree
short of the newly enforced baselines in three ways:

* contextlib / UbridgeError imports dropped as false duplicates during
  conflict resolution left NameErrors in iou_vm and qemu_vm (F821);
  the Dynamips router grabbed the compute-level NIOTAP instead of the
  hypervisor one, breaking TAP anchoring (test failure).
* unused imports (KERNEL_UNSUPPORTED_FILTERS, UbridgeError, List) and
  unsorted blocks left behind where the stack's later commits moved the
  last usage elsewhere — ruff I001/F401/RUF022 now enforce these.
* mypy, now baseline-free: cache dict annotations in tc_probe, the
  locators candidate list, the resolved-params None branch in the MCP
  runner, and validate_bpf_syntax keeps the upstream Dict[str, Any]
  return (the strict Optional[str] was wrong for the "valid" bool entry).

The e2e raw-frame probe resolves its compiler via shutil.which (S607)
and zips with strict= (B905); the remaining subprocess call is S603 by
nature and gets a per-file ignore like other test files.

ruff check/format clean, mypy at upstream parity (no new errors),
full unit suite 2167 passed.
2026-10-06 00:21:11 +08:00
YueGuobin e13e5f3804 fix(tools): merge same-device entries before device command execution
A batch carrying the same device twice lost all but the last entry's
commands: the per-device command map kept only the last entry while
result processing iterated every original entry, so each row reported
the last entry's output under its own command list.

c3c78f99a consolidated the merge into the MCP template renderer, but
that only runs when a template is passed — the MCP direct-commands
path and gns3-copilot's direct _run path were left uncovered.
Normalize once in each tool's _run (single point covering all entry
paths, restoring the c42b3a59b coverage) and keep the renderer merge
as boundary normalization. Blocked-command info now also accumulates
across same-device entries instead of last-winning in the per-device
map.
2026-10-06 00:21:11 +08:00
YueGuobin d0b0cdbd38 fix(compute): a passive absorbed anchor no longer resets the switch's tc state
The peer end of an Ethernet switch fast-path link is a NIOBridge with no
bridge of its own (the switch absorbed its anchor into the switch bridge).
Its update reconcile still ran the impairment pass with the empty filter
set the controller routes to that end — and an empty set is a plain
`tc reset` on the shared anchor, silently wiping the netem/cls_bpf/eBPF
the switch had just applied. Any link update did it (filters, markers,
suspend, capture start/stop), and the outcome depended on the link's
endpoint order: UdpLink.update() PUTs node1 then node2, so with the
switch first its apply ran first and the peer's reset ran last (API
green, data plane unimpaired), while with the peer first the reset ran
first and the filter survived. That order dependence is also why the
shipped e2e never caught it — it only created peer-first links.

Ownership is now explicit: only the end that owns the anchor's tc state
applies the impairment reconcile (_owns_anchor_impairments — a NIOBridge
with `bridge is None` is a passive carrier, the same idiom the
bridge-delete path already used). Markers, capture and the suspend
carrier still apply on both ends: markers reconcile per process, so
neither end can strip the other's, and the carrier converges by
agreement.

Red/green: two new docker unit tests fail on the unfixed tree with
`tc reset "<anchor>"` and pass after; the switch e2e also creates one
link switch-first and asserts the netem qdisc and the RTT hold under
that order (failed with the wipe, passes with the fix). Full unit suite
2110 passed; the switch e2e file passed end to end (378s).
2026-10-06 00:21:11 +08:00
YueGuobin 7a9a514ea3 docs: kernel-datapath family review pass — accuracy fixes and pinned claims
A correctness read-through of the five delivered datapath documents, plus
the two code comments that carried the same stale vocabulary.

Datapath selection: the VendorDockerVM selector is `console_type=docker_exec`
alone (`GNS3_SKIP_INIT` and friends are behavior knobs of the chosen class);
the cross-compute and anchor-less fallbacks are named for what they are; the
Ethernet-switch endpoint is the documented exception to the anchoring rule,
and the IOL runner container is called out as the Docker node that does not
anchor on a veth.

Filter vocabulary: the stateful eBPF program evaluates four modes
(nth → quota → window → flow), GNS3 exposes three of them, and window_drop
joins the kernel-only list; the correl suffixes gate on the `rate` token as
the extension-build marker.

group_fwd_mask: the 0xfffd port mask is applied inside uBridge's `brctl addif`
itself, not as a separate command — the link-creation sequences and the
operation tables no longer show an arrow the server never sends. Same class
of fix for `link set up` on the IOL anchor (addif already brought it up; the
command only pushes a suspended anchor back down) and for the QEMU carrier
replication (QMP `set_link`, gated by `replicate_network_connection_state`).

Lifecycles and stop orders re-worded around the invariant rather than the
node type: the fd holder must release before the devices are deleted, which
is QEMU's process-first order, IOU's uBridge-first order and Dynamips'
hypervisor-NIO-first order. Deferred wiring for a stopped endpoint is
documented as the common path it is, and the Dynamips "stop is not a close"
note now says what recovery from a dead hypervisor actually requires.

Dynamips specifics: a c7200 needs an adapter in slot 1 (slot 0 is the fixed
I/O slot), the tap-fd direction is stated correctly (writes inject into the
kernel, reads return what the kernel transmits), and the anchor registry is
name-keyed against the controller's port matrix by convention, not derivation.

IOL port bridge naming: `bridge{bay}` on unit 0, `bridge{bay}_{unit}`
elsewhere; the leg swap happens on link delete/re-create or a datapath
switch, while suspend is an in-place NIO update and a project reopen is a
fresh build.

Verified and Roadmap sections: the in-repo e2e suite is distinguished from
the isolated-instance development harness (IOU), assertions are stated with
their bounds and capability gates, and the roadmap entries collapse into the
one remaining project — VXLAN/GENEVE for cross-compute links.

Code comments: `flow` added to the documented mode order in the eBPF apply
path, and the `nio_bridge` module docstring corrected on which filter types
run on the kernel datapath (bpf via cls_bpf, frequency_drop/quota/window_drop
via the eBPF classifier — neither is relay-only any more).
2026-10-06 00:21:10 +08:00
YueGuobin 74010b9abd docs: dynamips kernel-datapath diagram suite, unified frame-path form across the family
The dynamips doc gets the full suite: anatomy (anchors reached by the
hypervisors' TAP fds, uBridge's AF_PACKET-tap / tc-qdisc sidebands), a
one-way copy-numbered relay comparison (six kernel/user crossings per
way against the kernel datapath's two TAP-fd legs), a staged walkthrough
(reserved-range diamond, egress clsact chain, capture/markers observation
sideband, copies 1-2) and a control sequence of real commands in real
order (hypervisor fd first, capture before markers, carrier last; router
handlers, not computes, as the per-node participants).

The four sibling frame paths are unified on the same form: netem qdisc
node labels, one capture/markers node outside the stages with AF_PACKET
tap edges anchored at ingress and post-chain egress, copy numbering
wherever the trace crosses the kernel/user boundary (qemu's two TAP-fd
legs, iol-docker's six socket/TAP legs), stage subgraphs with role-noted
titles everywhere (iol-docker restructured from its flat chain, iou's
chA/tapA variants folded into the canonical shapes).

The documentation skill records the rules as v3.1.0: four diagram kinds
(anatomy / comparison / control sequence / walkthrough), one step per
node, dashed sidebands per role with meaningful direction, numbered
crossings when copies are the point, glossary before the first diagram.
2026-10-06 00:21:10 +08:00
YueGuobin d0773aabea docs(iou): align the kernel-datapath doc with the delivered implementation
Sequence diagram: drop the phantom "port fwd_mask 0xfffd" step — uBridge
sets the per-port mask inside brctl addif and gns3-server never sends it.
Frame path: explain the ingress/egress mechanism in prose (the TAP-fd
write lands at the sender's anchor ingress, where nothing is installed;
the bridge's forward out the far anchor is the egress transmission the
tc chain sits on), and group the netio mailboxes into a kernel subgraph
matching the relay diagram. Suspend: a down anchor answers EIO on the
TAP fd in both directions (the section B hardening), not reads-block.
Term table: the anchor shape is per Ethernet bay (4 units per bay), not
the default 2x4. Link operations: carrier up is applied last, matching
_attach_kernel_nio. Link-local: note the verification matrix runs on the
Docker datapath. Reflow paragraphs to the soft-wrap convention.
2026-10-06 00:21:10 +08:00
YueGuobin 8bca2c70f8 docs: qemu kernel datapath doc in the family diagram style
Term table, QEMU↔QEMU topology with role-suffixed anchors and
frame-copies/qdisc-install dashed edges, relay copy-count diagram,
boxed frame path, link creation sequence; prose reflowed one
paragraph per line.
2026-10-06 00:21:10 +08:00
YueGuobin e04552cdb0 docs(iol): IOL runner kernel datapath — diagram suite and glossary
Replace the ASCII overview with mermaid diagrams per the documentation
standard: a glossary table first, then the two-container architecture
(port bridges inside their uBridge process blocks, the per-link Linux
bridge circled, dashed sidebands split by direction — frame copies flow
to uBridge, qdisc installs to the anchor), a copy-counted relay diagram
(six kernel/user crossings each way, datapath-invariant — swapping
datapaths only changes the middle two), the frame path with the
reserved-range diamond, and the link creation sequence. Details moved
from the old bullets into per-diagram prose; paragraphs reflowed to one
per line.
2026-10-06 00:21:10 +08:00
YueGuobin 2e29d053cf docs: docker kernel datapath — diagram suite, glossary and refreshed configuration
Replace the ASCII art with a mermaid suite (steady-state topology with
namespace boxes and sideband edge semantics, one-way frame path with
per-object boxes, link-creation sequence, full relay path with the four
kernel/user copies), add a term glossary ahead of the diagrams, reflow the
prose to soft-wrap, and refresh the stale parts: the configuration section
now describes enable_kernel_datapath as the global switch it already is,
with every anchorable node type landed and linked to its feature doc.
2026-10-06 00:21:10 +08:00
YueGuobin df79773bc0 test(e2e): live link-local matrix on the kernel datapath
Two Alpine containers on a kernel link, a static raw-Ethernet probe built
at run time and docker-cp'd in (the image has no raw-frame tool; DockerDaemon
gains the cp), injecting per-destination-MAC frames from guest 1 while
guest 2 counts arrivals: ordinary multicast, STP, LACP, 802.1X and LLDP must
cross, PAUSE must not (the documented kernel limit). Asserts the anchors'
sysfs brport group_fwd_mask reads 0xfffd through the server's own wiring
(int-parsed: newer kernels print it hex), that the bridge level stays 0, and
that a container stop/start replays the mask with LACP surviving. Negative
control is the uBridge suite's setportgroupfwd 0 case.
2026-10-06 00:21:10 +08:00
YueGuobin f03c94db6d docs: link-local frame transparency on kernel links — spec and per-datapath sections
A Linux bridge standing in for a cable does not forward the IEEE 802.1D
reserved range (01:80:c2:00:00:00-0f) by default, so LACP/LLDP/802.1X never
crossed a kernel-datapath link while the UDP relay carried them fine. uBridge
now opens every enslave'd port's IFLA_BRPORT_GROUP_FWD_MASK to 0xfffd at
brctl addif time (branch feature/bridge-tap-l2only, commits 0284500/03a18f1/
cf4e494), which the six kernel-datapath feature docs now document as a
section: STP, LACP, 802.1X and LLDP/DCBX cross; 802.3x PAUSE / PFC stays
dropped — br_handle_frame()'s case 0x01 discards it unconditionally, no mask
can enable it, and PFC labs must use a relay link. The full contract, kernel
references and requirements live in the new design spec, marked landed.
2026-10-06 00:21:10 +08:00
YueGuobin 86651604c4 test(e2e): relay capture and markers on both relay engines
The relay engines' observable paths had no live coverage: every
capture/start call in the suite sat on a kernel anchor (AF_PACKET
capture start_kernel) and markers were only asserted on marker
add_kernel. The two relay engines' own command shapes were unit-tested
only:
  * bridge engine  - bridge start_capture / bridge add_packet_filter ... mark
  * iol_bridge engine - iol_bridge start_capture / iol_bridge add_packet_filter ... mark

Docker relay control (bridge engine, 1 passed 33s): the capture start
REST call writes the ICMP exchange to a pcap off the relay bridge; a
mark filter attached with capture_node_id n1 signals exactly 10
marker.match events over the dedicated marker WS for 5 pings (5
requests + 5 replies, both directions), carrying node_id/link_id/tag and
the busybox frame length, writes exactly those 10 frames to the marker
pcap, and deleting the marker takes the pcap with it.

IOU relay control (iol_bridge engine, 1 passed 173s): the same two
checks on iol_bridge start_capture and the port's mark filter, driven
by the real IOS ping through the fabric socket relay.

Not duplicated in the ESW/VPCS/cloud relay controls: they issue the same
uBridge bridge commands through their own call sites, which stay covered
by unit tests; the IOL container relay goes through the same iol_bridge
engine already exercised here.
2026-10-06 00:21:10 +08:00
YueGuobin ff41a54364 test(e2e): assert the §E.2 idle-silence window in every kernel scenario
The L2-anchor spec's behavioral guarantee — an idle link stays silent for
5 s once the enslavement burst settles — only ran in the Dynamips and
Docker suites. It now also runs in QEMU, IOU, the IOL container, the
switch fast path and the switch cascade, which covers every host-device
creation path:

* tap create (Dynamips/QEMU/IOU anchors), docker create_veth (Docker host
  ends; the cascade's race-loser end is hardened after create by the
  server), bridge add_nio_tap (the IOL container anchor, the fifth
  creator), and the brctl switch bridges, whose multicast snooping is off
  precisely so the bridge role can reach silence;
* each scenario silences its guests first (IOS interfaces shut through
  the console; Docker guests' links down) and re-verifies the ping after;
* the cascade measures 8 devices at once (four absorbed router anchors,
  both cascade ends, both switch bridges).

IOL 158 s, cascade 293 s, ESW fast path 378 s, QEMU 428 s, IOU 308 s —
all green.
2026-10-06 00:21:10 +08:00
YueGuobin 1f544c96a5 test(e2e): classifier spot check and filter persistence on TAP anchors
The filter matrix (cls_bpf, the eBPF classifier) only ran on Docker veth
host ends; the IOU and IOL-container scenarios now spot-check it on their
TAP anchors and prove a filter survives a node restart:

* bpf "icmp" drops everything with clsact on the anchor, both ends, and
  clears back to an empty qdisc;
* frequency_drop 3 (the eBPF every-nth mode) measured 56 % round-trip
  loss (1 - (2/3)^2 = 55.6 % expected) in both scenarios;
* the IOU test applies delay 100 before a router stop/start: the fresh
  anchor gets netem back (tc level) and the restarted router's pings
  measure RTT >= 150 ms until the filter is cleared (a re-attach that
  dropped the filter would show ~100 ms).

IOU file 492 s, IOL file 182 s, both green.
2026-10-06 00:21:10 +08:00
YueGuobin 9d937802d5 test(e2e): relay filters shape real traffic on both relay engines
Extend the docker and IOU relay negative controls with the filters the
relay itself supports (delay, frequency_drop, bpf), asserted through real
ICMP — the first live coverage of the relay filter path:

* bridge engine (docker): delay 100 grows the RTT by ~200 ms and comes
  back on clear; frequency_drop 2 kills the round trips (the filter counts
  every packet crossing the bridge, both directions sharing one counter,
  so on an alternating ping stream one whole direction dies; verified
  against uBridge directly), frequency_drop -1 blackholes, and bpf drops
  by libpcap expression ('icmp', then 'greater 150' discriminating by
  frame size).
* iol_bridge engine (IOU): the same delay and frequency_drop effects
  through the port's iol_bridge filter list, plus the available_filters
  spot check.

Docker 33 s, IOU 168 s, both green.
2026-10-06 00:21:10 +08:00
YueGuobin 4fc0398423 test(e2e): live coverage for markers on the kernel datapath
Two Alpine containers on a kernel-only link with traffic-insight markers
attached to a veth anchor (marker add_kernel), observed on the dedicated
marker WebSocket via a new harness piece (WebSocketCollector, a sync
facade over websockets' sync client). Real ICMP proves: the marker.match
identity is complete (filter/tag/link_id/capture node/ts/len and the
tx/rx direction set of a ping), the main project channel carries no
matches, the BPF and direction are enforced (a non-matching sibling and
a tx-only marker each see exactly their traffic), the host pcap holds
exactly the matched frames, pausing silences one marker while a sibling
keeps counting (silence is never a dead channel), tag replay serves the
paused tag's timeline with display-filter/link/window narrowing and
refuses with 409 while capturing, and deleting a marker takes its pcap
and signals with it.
2026-10-06 00:21:10 +08:00
YueGuobin ad39b22ab4 test(e2e): live coverage for the switch cascade kernel datapath
Two switches cascaded through the link-owned veth pair, two c7200
routers per switch, real ICMP crossing both bridges: the pair is born
UP with exactly one end per switch bridge, a dot1q trunk cascade
carries two VLANs at once, the symmetric access/trunk mode flip on the
cascade ends isolates and revives a VLAN in place (asymmetric flips are
semantically broken — the access side egresses untagged into the far
trunk's native PVID), a delay filter lands as netem on both ends (one
per direction, RTT ~= 2x delay), suspend admin-downs both ends, and a
link delete/re-create retires the whole pair and mints a new one under
the new link id — zero host residue after the project goes.
2026-10-06 00:21:10 +08:00
YueGuobin cb7f74c77b fix(esw): harden the cascade end the create race leaves unhardened
docker create_veth hardens only its FIRST end (the Docker shape: host
anchor plus a container leg that keeps its L3 life). A cascade end is
that second, unhardened end whenever the peer switch's create won the
race, and the kernel gives it an IPv6 link-local — a silent L3 identity
on the switch fabric (ubridge-l2-anchor-spec §E). Each switch now
hardens its OWN end with 'link l2only <end> on' once the pair exists,
whatever branch brought it there (fresh create, lost race, reuse);
idempotent, and best-effort with a warning on a uBridge without the
command.
2026-10-06 00:21:10 +08:00
YueGuobin 6e36b58a5d fix(compute): refuse a duplicate port NIO and wire before bookkeeping
The compute-side backstop of the controller's duplicate-port guard
(keep-port-links + live-port bind made the controller guard reliable;
this is the layer under it). IOU and Dynamips bound the adapter NIO
before the uBridge/hypervisor attach: a failed attach left the port's
binding replaced — the link that still owned the port lost its handle
and its host state leaked (the IOU EBUSY incident's 8 orphan TAPs).
Dynamips was worse: its wiring idempotence check silently skipped the
attach on a second binding and rebound only the bookkeeping. A port
that already carries an NIO is now refused, and both types bind the
NIO only after the wiring succeeded.
2026-10-06 00:21:10 +08:00
YueGuobin 6839b279be docs(qemu): record the in-repo e2e coverage 2026-10-06 00:21:10 +08:00
YueGuobin 4fd7e1aa07 test(e2e): live coverage for the QEMU node kernel datapath 2026-10-06 00:21:10 +08:00
YueGuobin 928757542e fix(controller): bind and release link members on their live ports
Link.delete cleared the port link through the port object stored at
add_node time; a node update since then rebuilt the port list, so that
object was stale and the live port kept its link — the next link on the
port was refused with "Port is already used". Masked until now by the
older rebuild bug (c2d68a65d): links never survived a rebuild, so the
guard never fired and the stale clear never mattered.
2026-10-06 00:21:10 +08:00
YueGuobin 1e999d916d fix(controller): keep port links across a port-list rebuild
Node._list_ports() rebuilds every Port object, and it runs on each node
update — including every compute node.updated notification (a node
reporting started is one). The links are unaffected by that rebuild, but
the fresh port objects started out with link=None, so after any node
update the "Port is already used" guard in Link.add_node stopped matching:
a second link on an occupied port reached the compute, where the port's
NIO was replaced before the attach failed on the already-bound anchor,
leaving the link half-torn-down (on IOU, deleting the project afterwards
left the node's anchor TAPs and a per-link bridge on the host).

Carry the link back-references over by (adapter_number, port_number),
first match wins, mirroring get_port; a port that still exists keeps its
link. Regression tests pin both the reference (test_node) and the guard
(test_link: the duplicate link is refused after a node update).
2026-10-06 00:21:10 +08:00
YueGuobin a0d76b30c0 docs(iou): record the in-repo e2e coverage
The Verified section only described the /tmp driver with a fake IOU
image; the repository suite now carries the same scenario with real
routers on a real L3 image.
2026-10-06 00:21:10 +08:00
YueGuobin aaabf0409d test(e2e): live coverage for the IOU node kernel datapath
Two real IOU routers on a real L3 image (the image's own IOL fabric, the
real IOS CLI on the server's telnet console), driving the anchor TAPs the
kernel datapath builds on: anchors born with the node (one per Ethernet
bay/unit), real ICMP through the [fabric <-> TAP] port bridge, netem
delay, suspend, capture, link delete/re-create, node stop/start rewiring,
the serial link staying on the relay (serial bays never anchor) and a
relay negative control on an isolated instance. Every scenario ends with
no anchors, bridges or tmpdirs left behind.

harness: create_iou_node/iou_images/iou_anchor_name, and the IOS console
helper is now ios_console (dynamips, IOU and the IOL containers share it).
2026-10-06 00:21:10 +08:00
YueGuobin 765d706ec4 docs(docker): record the in-repo e2e coverage
The feature doc's Verification section now points at
tests/e2e/test_docker_kernel_datapath.py and what the suite pins down
(anchors/bridges, the filter matrix through real traffic, suspend,
capture, the stop/start and delete/re-create beats, the relay control and
the relay->kernel reopen upgrade), including the digest-pinned image the
scenarios share.
2026-10-06 00:21:10 +08:00
YueGuobin 897f50e430 test(e2e): live coverage for the standard Docker node kernel datapath
Two real Alpine containers on an isolated instance, addressed the way a
GNS3 user does it (the node's persistent /etc/network/interfaces, applied
by init.sh) and driven through the Docker daemon socket the server itself
uses. Four scenarios:

* fast path: the per-link kernel bridge enslaves exactly the two veth host
  ends, real ICMP crosses, the L2-anchor spec E.1/E.2 assertions hold
  (idle silence measured with the guests' links down -- a container's own
  boot-time IGMP report re-fires ~10 s later, so silencing is not just
  IPv6), netem delay, suspend/resume, capture, link delete/re-create,
  container stop/start (the veth host ends die with the adapter and are
  rebuilt from the NIO), zero residue on project delete;
* filter matrix, one type at a time, each asserted through real traffic
  and its tc state: netem core (delay, jitter+distribution, loss, corrupt,
  duplicate), the extensions (reorder+correl+gap, seed+limit, gemodel,
  rate), cls_bpf match-drop including a byte-size discriminator, the eBPF
  classifier (frequency_drop every-Nth and -1, quota byte-cap cutoff,
  window_drop single outage with per-seq pass/drop/pass evidence), plus
  available_filters offering the kernel-only types;
* relay control: no per-link bridge, the kernel-only types hidden;
* relay->kernel reopen upgrade: the datapath choice is flipped across a
  server restart and the project reopened -- the link is rebuilt on the
  kernel datapath and forwards.

The harness gains a Docker guest driver (a stdlib Engine API client over
the daemon socket: exec with stream demux, container id by deterministic
name -- the controller's node payload does not carry it, image inspect),
a digest-pinned image helper (cache hit = no network, miss = pull through
the server's own route, neither = skip) and Server.restart() for the
reopen scenario (which also needs the local compute's capabilities to be
up before a project open is accepted).

Live: 4/4 scenarios, 142 s for the file; full e2e suite 10/10 (1503 s);
unit suite 2149 passed; ruff clean. The matrix measures loss with 20
packets at 0.2 s spacing (143 s -> 58 s) and the jitter RTT assertion
keeps statistical margin (per-direction N(50,20); 10 packets, >= 65 ms).
2026-10-06 00:21:10 +08:00
YueGuobin e0329ceee6 test(e2e): give the dynamips routers a detected idle-PC
Without one every c7200 busy-waits a full CPU core for the whole scenario
-- the tests create raw nodes and no template supplies a value (measured:
constant ~100 % per router, up to ~6 minutes per dynamips scenario).

harness.dynamips_idlepc() detects a value through the controller's
auto_idlepc endpoint (the GUI idle-PC finder path: a throwaway project
boots the image, candidate values are validated by measuring actual CPU
usage) and caches it in ~/.cache/gns3-e2e/idlepc.json keyed by the image
checksum, so the cost (~100 s here) is paid once per image, not per run.
GNS3_E2E_IDLEPC overrides detection; any failure returns None and the
scenarios run without one rather than fail on a CPU optimisation.

All four scenarios that boot c7200 routers (dynamips kernel/relay,
ethernet switch kernel/relay) pass the value at creation. Live: detected
0x60189234 for the M11 image (238 s first run including detection); the
routers drop from ~100 % during boot to 3-8 % steady (sampled per
process), and a re-run reports the cached value with no detection.
2026-10-06 00:21:10 +08:00
YueGuobin f13da59f23 docs(ubridge): the fifth L2-only creator, and the call site that used it
The spec's B table grows its fifth row: bridge add_nio_tap mints a
transient TAP when the name is free and hardens it at creation, while an
attach to an existing device (possibly a user-owned TAP with addresses)
is left untouched. The rule paragraph spells out attach-is-not-a-creation.
Delivery: uBridge fb72758, closing the gap the new e2e assertions found
(live: the switch's gns3*-0 relay TAP carried fe80::). The server issues
no link l2only of its own -- the switch call site now documents that the
TAP is minted-and-hardened by add_nio_tap, and the ESW feature doc
describes the uBridge-side close instead of a server workaround.
2026-10-06 00:21:10 +08:00
YueGuobin 30cb7119e5 test(e2e): assert the L2-anchor spec's server-side guarantees
The spec's gns3-server alignment section promised three assertions the
suites never carried; they land in harness.py and run in every kernel
scenario (plus the relay controls' anchor checks):

- E.1 assert_pure_l2: anchors and bridges carry no L3 identity (addrgenmode
  none, no address in /proc/net/if_inet6, no ip -o -4 addr) -- the kernel
  scenarios' anchors and per-link/switch bridges, relay-mode anchors and
  the switch's relay TAPs alike (hardening is a creation-time property,
  not a datapath one);
- E.2 assert_idle_silence (Dynamips suite): guest interfaces shut to
  silence IOS's own CDP/keepalives, settle 2.5 s, then a 5 s window of
  zero traffic over both anchors and the per-link bridge;
- assert_forwarding: every attached port reports brport/state == 3 -- a
  bridge left DOWN keeps its ports disabled and forwards nothing, with no
  error anywhere; the assertion is the only signal.

harness.l2only_supported() probes a throwaway uBridge once (link l2only
against a nonexistent device: 208 = command present, 202-Unknown command
= old build); without the command the assertions skip -- the spec's
degradation contract, mirroring the tc-capability skip.

The first live run caught a fifth-creator gap: the switch's relay port
TAPs (minted implicitly by bridge add_nio_tap) carried a live fe80::.
Delivered uBridge-side per the spec (fb72758: the transient TAP is
hardened at creation, attaches untouched); the server needed no change,
and the relay-control E.1 check is that creator's end-to-end coverage.
2026-10-06 00:21:10 +08:00
YueGuobin 02340f2ed3 docs(iol): record the IOL runner container kernel datapath
The feature doc covers the architecture (one irreducible userspace hop
on the unix-socket leg; the link segment kernelized through the port
bridge's swappable TAP leg), the capability gate, the anchor lifecycle,
the swap flow, the inherited capture/markers/filters, the relay
fallback and the live verification — including the ensure-then-add
lesson (tap create is strictly create-only).

The other datapath docs' roadmaps catch up: the IOL runner container
has landed (and the ethernet-switch doc's stale 'cascade deferred'
exclusion from d2f8aba58 is corrected while there); the docker doc's
adapter table no longer rejects IOLDockerVM.
2026-10-06 00:21:09 +08:00
YueGuobin 72aa379e87 test(e2e): live IOL runner container kernel datapath suite
Two real iol-xe containers (Cisco CML iol-runner images, real IOS-XE on
the telnet console) against an isolated instance, the real uBridge with
the swappable bridge TAP leg:

* kernel link reports kernel_datapath; anchors exist from node start
  and the per-link bridge enslaves exactly the two of them;
* real ICMP crosses the [unix <-> tap] port-bridge relay; delay 100
  lands as netem on both anchors with the measured RTT growing >= 150 ms
  and returning < 50 ms when cleared;
* suspend admin-downs the anchor and kills the traffic; resume
  restores; AF_PACKET capture writes a real pcap;
* link delete/re-create swaps the port leg out and back in with the
  ping returning; node stop leaves no gx devices and a start recreates
  the whole wiring from the NIO; project delete cleans everything;
* the relay control on a relay-configured instance keeps the link off
  the kernel and still pings (anchors may exist idle — the same
  semantics as QEMU's and Dynamips' anchors: the server flag decides
  attachment, not anchor birth).

Harness: create_iol_router (the appliance's template properties),
docker_images, iol_anchor_name, stage_iol_base_config (the shipped
iol-xe-base.txt copied into the isolated instance's configs dir — the
GNS3_IOL_STARTUP_CONFIG lookup path), boot_wait(straight_prompt=True)
for images that boot from NVRAM straight into the CLI with no 'Press
RETURN' sentinel, and GNS3_E2E_DEBUG=1 to run the isolated instance
with debug logging (the uBridge command stream lands in server.log —
how the ensure-anchor EBUSY was pinned down).
2026-10-06 00:21:09 +08:00
YueGuobin 13c1ffb951 feat(controller): let IOL runner containers take the kernel datapath
_is_unix_socket_docker no longer excludes the IOL runner marker: those
containers anchor on persistent TAPs now (compute side), so they
graduate through _kernel_endpoint_ready's gate instead — both
ubridge_bridge_tap (the swappable leg) and ubridge_tap (the tap module)
strict True, an unreported capability keeping the link on the relay
where it always works. The generic GNS3_UNIX_SOCKET_NIO exclusion keeps
its shape (an IOL runner environment wins the compute's class
selection, so the exclusion must not fire when both markers are set).

The switch fast path names an IOL runner peer's anchor through
kernel_anchor_type — the iol_docker key, never the gv veth namespace.

The 307d676cb regression tests move with the semantics: the capability
matrix replaces the unconditional relay, and the switch-path test also
asserts the gx naming. Its original concern stands — a compute that
cannot serve the anchor lifecycle must never be handed a kernel link
(the switch's deferred join would make it a silent dead cable).
2026-10-06 00:21:09 +08:00
YueGuobin 4b4a0fc35f feat(iol): anchor IOL runner containers on persistent TAPs
IOL runner containers (IOLDockerVM, GNS3_IOL_RUNNER) had no kernel
datapath: their guest leg is the runner's AF_UNIX socket pairs, so every
link rode the uBridge relay. Their Ethernet bays now own persistent TAP
anchors (gx names, the iol_docker key of the shared naming contract —
born at node start like IOU's, before any link, so the switch fast
path's deferred join can never miss them), and the per-port bridge's
topology leg swaps between UDP (relay) and the anchor (kernel link)
through the frozen stop -> delete -> add -> start contract — the unix
binding never re-binds across a swap.

- iol_docker_vm: KernelDatapathMixin hooks, the anchor lifecycle
  (_prepare_tap_datapath at _start_ubridge: probe ubridge_bridge_tap +
  ubridge_tap, sweep leftover, tap create born down), the kernel attach
  (ensure-then-add — tap create is strictly create-only, IFF_TUN_EXCL,
  so the ensure checks /sys/class/net first: an unconditional create
  answers EBUSY on the device the start loop just made), the release
  (port bridge stop + delete_nio_tap before the shared teardown) and the
  stop order the fd holders dictate (port bridges first, then tap
  delete, then the per-link bridges — all before the hypervisor stops).
- vendor_docker_vm: the port-bridge creation factored into
  _ensure_unix_port_bridge (idempotent on the registered name), keeping
  the NIOBridge rejection for the generic unix-socket containers.
- docker_vm: the three _kernel_veths lookups go through the
  _kernel_host_ifc hook — behavior-identical for DockerVM, and it is
  what lets the subclass route without overriding the binding methods.
- kernel_anchor: the iol_docker key (gx) and kernel_anchor_type, the
  controller-side mapping for naming an IOL runner's anchor on the
  switch fast path (the marker check stays inline: this module sits
  below everything and must not import the controller package).
2026-10-06 00:21:09 +08:00
YueGuobin c20125c180 feat(compute): probe uBridge's swappable bridge TAP leg
The bridge module gained delete_nio_tap (uBridge's gns3server-integration
contract, section 'bridge — generic NIO relay with a swappable TAP leg'):
a per-port bridge can swap its topology leg between UDP and a persistent
TAP through stop -> delete -> add -> start, which is what lets an IOL
runner container's port bridge carry a kernel-link anchor.

The probe needs no scratch objects and no capabilities: one command
against a bridge that cannot exist — 202 (unknown command) is an old
build, 214 (bridge doesn't exist) is a new one. Cached by binary identity
like every other probe; any failure reports unknown.

GET /v3/compute/capabilities gains ubridge_bridge_tap; the controller's
default capability dict carries it too (the single schema definition, per
the 1e67fbf12 lesson).
2026-10-06 00:21:09 +08:00
YueGuobin d6851695cc test: give the argument-less pytest run the e2e-excluding configuration
CI runs the suite through `just test` -> `just unit`, i.e. `pytest` with
no path argument and the repository root as rootdir — which does not load
tests/pytest.ini, so its `addopts = -m "not e2e"` never applied there. The
e2e tests were collected and executed on every CI run and only stayed
green because a runner has no ~/GNS3/images directory: the harness skips
itself. A local run on a machine that does have images went ahead and
booted real servers for twelve minutes instead.

Declare the same policy in pyproject.toml, the file that argument-less
run does resolve, and add testpaths so the package-internal tests
(gns3server/agent/.../tests/) stay collected — `pytest tests` never
reached them either. That shape keeps resolving tests/pytest.ini and is
unchanged.
2026-10-06 00:21:09 +08:00
YueGuobin 90bcb32473 feat(esw): cascade two switches through a veth pair
Switch-to-switch links were the last shape left on the relay: the switch
fast path works by absorbing the *peer's* anchor, and a switch has none —
its ports are its own bridge, and a kernel interface belongs to exactly
one bridge, so two bridges cannot be joined by enslaving anything.

Join them with a veth pair instead: one end per bridge, each side
enslaving its own end and applying its own port mode to it — an access
port on one side and a trunk on the other behaves like the real cable it
models. uBridge's docker create_veth/delete_veth (the primitive every
Docker adapter is already born from) creates and destroys the pair; the
names derive from the link id (utils.kernel_anchor.kernel_cascade_names),
so each side computes its own end and the names survive a restart.

The pair belongs to the link, and the two ends are wired by two
independent uBridge processes — the project-open batch drives different
nodes concurrently — so the protocol is order-free: both sides create the
pair when their own end is missing (one create wins; the loser's failure
is re-checked against the kernel and "the pair is there" is not an
error), and either side's teardown destroys it (deleting one veth end
takes the other with it, so both converge on the same gone pair and the
second delif answers ENOENT). A pre-existing end — this switch restarted,
or a leftover from a previous life of the link id — is reused rather than
recreated, because the other end may still be a live port of the peer
switch; a stale tc qdisc is all a reused end can carry.

No new wire format was needed: a cascade is an anchor NIO on both ends,
the absorbed-anchor case plus the peer end's name. That also corrects the
filter routing — the single-sided rule exists because an absorbed anchor
is one interface, while a cascade has one per switch, so impairments go
to both ends like any other kernel link.

Tests: the wire format, the eligibility flip and the both-ends re-push on
node start (controller); the naming contract (utils); the switch-side
lifecycle — create, reuse, lost create race, delete destroys the pair
(compute routes).

Drive-by: the relay filter test's compute mock carried no awaitable
`put`, so tests/controller/test_kernel_datapath_link.py failed when run
alone while an argument-less full run passed; callers now get one.
2026-10-06 00:21:09 +08:00
YueGuobin caa054986f fix(controller): keep IOL runner containers off the kernel datapath
The unix-socket container gate matched GNS3_UNIX_SOCKET_NIO in the node
environment only, but the IOL runner reaches the same wiring through the
GNS3_IOL_RUNNER marker: the compute selects IOLDockerVM on it, and that
class forces the AF_UNIX socket pairs whatever the generic knob says —
and the documented environment for those nodes carries only the marker.
Such a container was therefore handed a kernel link its compute cannot
serve. The plain case failed at link creation (no veth end to enslave);
on the switch fast path it was worse — the switch defers a join against a
missing anchor by design (a link to a stopped node must not fail), so the
cable was silently dead instead of merely slow.

Match both markers, through the shared is_iol_runner_environment helper so
the controller and the compute select the same way. Verified live on a
real server: docker↔IOL-XE and switch↔IOL-XE links stay relay while the
docker↔switch control link still takes the kernel datapath.
2026-10-06 00:21:09 +08:00
YueGuobin a40503e44b fix(qemu): release the datapath under the execution lock
QEMU's process monitor calls stop() by itself when the process dies, so an
API stop and a process-death stop run concurrently in the normal case — and
the datapath release sat outside _execute_lock, letting both stops sweep the
adapter TAP map at the same time. Whichever finished first cleared
_kernel_taps under the other's iterator, which died with "dictionary changed
size during iteration" (the monitor's task, so it surfaced as "Task exception
was never retrieved") with the rest of its sweep, the orphan-bridge removal
and uBridge's shutdown skipped.

Keep the previous fix's ordering (process side first, then the devices) and
hold the lock across the release: serialized, the second stop finds uBridge
gone and sweeps nothing. Reproduced deterministically with two concurrent
stop() calls, the first parked mid-sweep — it raised at qemu_vm.py:1659
before the change, and every TAP is swept exactly once after it.
2026-10-06 00:21:09 +08:00
YueGuobin 0b78d313eb fix(qemu): release the datapath after the process is gone
QEMU is the guest side of every adapter TAP, and uBridge's tap delete
refuses a device another process holds open ('Device or resource busy') —
a best-effort delete whose failure is suppressed. QEMU's stop did the
delete first and stopped the process after, so every node stop or project
delete leaked the persistent TAPs: found by inspecting the host after a
project delete (16 taps left behind, carrier down, no holder), and the
held-tap behaviour reproduced against uBridge directly.

Stop the QEMU process first, then remove the TAPs and the per-link kernel
bridges — process side first, then the devices, the same lesson as IOU's
reverse stop order. Verified live: node stop and project delete now leave
no taps and no processes behind, while a restart recreates the TAPs.

The adapter anchor naming also goes through the shared
utils.kernel_anchor helper, like the other node types.
2026-10-06 00:21:09 +08:00
YueGuobin c343ce0b8f feat(esw): wire peer anchors straight into the switch bridge
The Ethernet switch's kernel fast path: instead of a link crossing the
switch's per-port uBridge relay, the switch absorbs the peer's anchor into
its own kernel bridge. The peer's interface (Docker veth host end, QEMU
TAP, IOU port TAP, Dynamips port TAP) becomes the switch port, and frames
cross anchor -> switch bridge -> switch ports entirely in the kernel.

Wire format: the switch end receives nio_anchor ('join this interface to
my own bridge' — the mirror of nio_bridge), the peer end nio_bridge with a
null bridge ('your anchor is bridged elsewhere': carrier, markers and
impairments only — never bridge membership, and never a bridge delete, on
an interface this node does not own). Anchor names come from the shared
naming contract (utils.kernel_anchor), a pure function of node type, id,
adapter and port — the controller computes the peer's anchor while the
node may be stopped, which is what makes links to stopped nodes wireable.

Stopped peers defer the join; after any node of a link starts
(UDPLink.node_started) the controller re-pushes the switch NIO, and the
switch completes — or repairs, when a peer restart replaced its interface
under the same name — the join against the kernel's actual membership
instead of assuming it.

VLAN changes now edit membership in place: only the ports whose mode/VLAN
actually changed are touched, each losing exactly the previous mode's
entries the new mode does not want (the dot1q admits-all entry is one
range operation in both directions), and no port ever leaves the bridge to
change its VLANs. This replaces the old 'reset by re-enslaving' shortcut
(delif+addif on every wired port, added when the ports were the switch's
own TAPs): on absorbed anchors, re-enslaving an interface owned by another
node is where live testing watched links die — anchors occasionally lost
their bridge membership right after a ports_mapping update (later updates
then failed with delif EINVAL), reproducibly with qemu, IOU and Dynamips
peers and never with Docker's veths.

Eligibility: the switch side needs no capability of its own (its bridge
exists by construction); the peer must be able to anchor. Switch-to-switch
cascades stay on the relay — a kernel interface belongs to one bridge, and
joining two bridges needs a veth pair, deferred.

Verified live on a real server: qemu peers through four VLAN cycles with
both anchors enslaved throughout; a mixed switch (2 IOU + 2 Dynamips, four
kernel ports); Docker peers with real ICMP isolating and recovering (with
both anchors still enslaved); VPCS relay ports likewise in place.
2026-10-06 00:21:09 +08:00
YueGuobin 3910a6b585 docs(dynamips): record the kernel datapath and its live verification
New features/dynamips-kernel-datapath.md: the anchor model (persistent TAP
per Ethernet port, the hypervisor opens it with nio create_tap), port
selection via the adapter registry, the anchor lifecycle with QEMU's stop
order and the stop-is-not-close semantics, link operations, capture/
markers/filters, the relay fallback, the live e2e results, configuration
and the roadmap (Ethernet switch next). The IOU and QEMU roadmaps note
that Dynamips has landed.
2026-10-06 00:21:09 +08:00
YueGuobin 5c2c8cdb0c test(e2e): a live end-to-end suite, Dynamips as the first scenario
Live e2e verification moves into the repository instead of being rewritten
as a throwaway script every time: tests/e2e/ carries a shared harness (REST
client, isolated-instance lifecycle, a deliberately dumb IOS console
driver, host-side kernel inspection: bridge membership, tap admin state,
tc qdiscs) and each node type adds only its scenario module. The e2e marker
plus 'addopts = -m "not e2e"' keeps these privileged, image-dependent
tests out of normal runs; they are opt-in: pytest -m e2e tests/e2e -s.

The harness targets an existing server via GNS3_E2E_URL or starts an
isolated instance (own config dir — DB and paths follow it — on a free
port) and deletes its project afterwards (GNS3_E2E_KEEP=1 keeps it on
failure).

The first scenario drives two real c7200 routers on a real IOS image
through the REST API and the consoles: the kernel link is created while the
routers are stopped (deferred wiring), the per-link kernel bridge enslaves
exactly the two anchors, real ICMP crosses it, delay 100 shows netem on
both anchors and grows the RTT (~200 ms), suspend kills the traffic on an
admin-down anchor, capture writes a pcap of ICMP records, a serial link
between the same routers stays on the relay and still pings, delete/
re-create and stop/start leave the wiring consistent, and deleting the
project removes every anchor and bridge. A negative control runs the same
topology on an isolated relay-configured instance (no per-link bridge,
nothing enslaved, still pings).
2026-10-06 00:21:09 +08:00
YueGuobin e5f65a510a feat(controller): offer Dynamips the kernel datapath
A Dynamips Ethernet port can anchor a kernel link whenever its compute's
uBridge has the tap module — the anchors are uBridge-created TAPs the
hypervisor merely opens, the same capability QEMU gates on, so no
Dynamips-specific capability is needed. Serial, ATM and POS ports are
excluded per port by the existing link-type check (the controller's port
matrix decides), keeping them on the relay whatever the capabilities.

Eligibility tests cover the mixed pairs (docker/qemu/iou endpoints on the
same compute), the strict tap-capability requirement, and the serial
exclusion.
2026-10-06 00:21:09 +08:00
YueGuobin 7201a870da feat(dynamips): anchor every Ethernet port on a persistent TAP
Dynamips links can now ride the kernel datapath like Docker, QEMU and IOU:
each Ethernet slot/port gets a persistent TAP anchor (gd{id}e{slot}p{port}),
created through uBridge's tap module, and the Dynamips hypervisor opens it
with nio create_tap — the hypervisor holds the fd, exactly QEMU's shape.
Links attach the anchor to their per-link kernel bridge; the legacy UDP
tunnel remains the relay datapath for every other port.

Anchor lifecycle: born at node start (tap module probed with one
create/delete cycle, sweep of stale devices, ownership handed to the server
user, born down); a kernel link opens the anchor in the hypervisor, binds
the slot/port and enslaves it; removing the link releases the fd again
(nio delete) and detaches. A link bound while the router is stopped is
wired by the next start (deferred wiring). Node close follows QEMU's stop
order — the hypervisor's TAP NIOs go before tap delete, since it is
Dynamips, not uBridge, that holds the fds.

Stop is not close: vm stop only halts the emulated router, so the
hypervisor, the TAP fds, the bindings and the per-link bridges all survive
a stop/start untouched (attach skips ports that still hold their TAP NIO).

Port selection follows the adapter registry: ETHERNET_ADAPTERS and
ETHERNET_WICS name the models whose ports carry Ethernet frames (WIC-1ENET
included, at its Dynamips port number); serial, ATM and POS ports never
anchor, and a kernel link there errors with the relay-datapath message
instead of half-wiring. Adapters hot-added to a running router (OIR) get
their anchors at once.

The compute NIO routes accept nio_bridge alongside nio_udp (the same
widening QEMU needed), carry the endpoint's suspend flag on update (it is
the anchor's admin state on a kernel link), skip the hypervisor delete for
a kernel NIO (its TAP NIO was already released by the slot removal), and
the close path leaves NIOBridge instances to _stop_ubridge.
2026-10-06 00:21:09 +08:00
YueGuobin 6633304e97 fix(mcp): let link_list return kernel_datapath
The tool descriptions have always advertised kernel_datapath as a
requestable field, but the handler's whitelist did not contain it: asking
for it was rejected as an invalid field, so the MCP clients could not see
which links run on kernel interfaces at all.

Also record what seeding a netem experiment on IOU costs: IOL emits its own
CDP/keepalive frames and they draw from the netem RNG stream, so a
seeded run only reproduces after `no cdp run` (verified bit-identical pcaps).
2026-10-06 00:21:09 +08:00
YueGuobin 4fa7f158fd fix(schemas): one definition of the capabilities payload
GET /computes/{id} answered with only part of the capabilities the compute
reports: the response schema kept a second, private Capabilities class of
its own (it knew ubridge_tc and nothing else), and FastAPI's response model
silently drops fields it does not define — so ubridge_tap and
ubridge_iol_tap never reached clients even though the compute had sent
them and links were already being built on those datapaths.

Import the one definition instead of duplicating it, so the next capability
cannot drift the same way.
2026-10-06 00:21:09 +08:00
YueGuobin 3b8172cbc8 docs(iou): record the IOU kernel datapath and its spec
* docs/features/iou-kernel-datapath.md: architecture (one irreducible
  userspace hop on the fabric leg, kernel link segment), datapath
  selection, the anchor lifecycle with the reverse-of-QEMU stop order,
  capture/markers/filters, relay fallback, and the verified numbers (an
  isolated server with two IOU nodes behind a fake ELF image, the test
  playing the IOL fabric: 64/64 kernel, 62/62 relay).
* docs/design/ubridge-iol-tap-anchor-spec.md: delivered — implemented on
  the ubridge fork's feature/iol-tap-anchor branch (both commands, the
  listener hardening, plus releasing every port NIO on iol_bridge delete
  even when the bridge was not running), with the implementation notes
  that came back (208 vs the older 214 for a missing bridge; one perror
  line per frame dropped on a down anchor).
* The Docker/QEMU feature docs point at it from their roadmaps.
2026-10-06 00:21:09 +08:00
YueGuobin f23c3bb6e6 fix(iou): carry suspend from the NIO update body
The IOU NIO update route never copied the body's suspend flag onto the
NIO; the Docker and QEMU routes always did. Harmless on the relay, where
suspend is emulated by the synthetic frequency_drop filter the controller
injects, but fatal on a kernel link, whose suspend *is* the anchor's
admin state: a suspended link kept forwarding traffic, and the resume
looked like it worked because nothing had ever stopped.
2026-10-06 00:21:09 +08:00
YueGuobin 806afec0d8 feat(controller): offer IOU the kernel datapath
Eligibility gains an IOU branch gated on the compute's ubridge_iol_tap
(strict True: an unreported capability keeps the link on the relay), and
a port-level rule: a kernel link is an Ethernet segment, so any endpoint
whose port is not Ethernet (IOU serial) disqualifies the link before it
is dispatched. Without that, a serial link between two capable IOU nodes
would be sent as nio_bridge and fail at the compute.

The IOU NIO routes accept nio_bridge alongside the UDP/TAP/Ethernet NIOs
— without the widening the controller's POST is 422'd before the node
ever sees it, the same trap the QEMU routes hit.
2026-10-06 00:21:09 +08:00
YueGuobin 200c946eef feat(ubridge): probe iol_bridge's TAP-port support
Whether an IOU port can terminate on a persistent TAP (iol_bridge
add_nio_tap) is a capability of its own: the tap module and that command
land independently, so a build may have one without the other. Probed on
a scratch IOL bridge with a scratch TAP — one add/delete cycle, no
iol_bridge start needed (attaching a NIO works on a stopped bridge) —
cached by binary identity, with the scratch bridge id above the per-node
id space the fabric locks (513..1024) so a probe cannot collide with a
running node. Any failure, including an old build's "Unknown command",
means unknown: IOU stays on the relay datapath.

Reported through /capabilities as ubridge_iol_tap, next to ubridge_tap.
2026-10-06 00:21:09 +08:00
YueGuobin 9a14a91293 feat(iou): anchor every Ethernet bay/unit on a persistent TAP
IOU's only wire is the IOL fabric (Unix datagrams, 8-byte headers,
NETMAP), so it has no host netdev to enslave — the kernel datapath gives
each Ethernet bay/unit a persistent TAP anchor the uBridge IOL bridge
binds the port to (iol_bridge add_nio_tap), which links then enslave into
their per-link kernel bridge exactly like Docker's veth and QEMU's TAP.

* IOUVM joins KernelDatapathMixin: one TAP per Ethernet bay/unit
  (gi{id8}e{bay}p{unit}), created at start after a capability probe and a
  stale sweep, born down and address-free; serial bays never anchor.
* _networking dispatches per NIO type: a relay link keeps iol_bridge
  add_nio_udp, a kernel link binds the anchor then runs _kernel_attach.
* Stop order is QEMU's reverse, because uBridge holds the anchor fds:
  iol_bridge delete (releases every port NIO) -> tap delete (a held TAP
  answers EBADFD) -> brctl delete -> hypervisor stop. Removing a single
  link releases its fd the same way (delete_nio_tap).
* The IOU-specific marker reconcile override is gone: marker primitives
  are polymorphic on the anchor (marker *_kernel on a TAP, iol_bridge
  commands on an IOL location), so the base reconcile serves both.

Capture on a kernel link anchors on the TAP (capture start_kernel);
filters are tc on the anchor, never combined with the userspace
iol_bridge filters a relay link uses.
2026-10-06 00:21:09 +08:00
YueGuobin 81ad9b837f docs(spec): record the delivered L2-only anchors and their residual
uBridge delivered `link l2only` (e2e3155) and the brctl delete refusal
(83a84fb); verified from the server side -- anchors and per-link bridges
report addrgenmode none, carry no addresses, and an idle anchor is silent
once the one-shot membership burst has settled.

That burst is the one thing the command cannot remove, so it is now recorded
where the acceptance criteria live, with the measurement: enslaving a port
makes the kernel announce the bridge's multicast memberships (90 B MLDv2 at
+0.00 s, 54 B IGMPv3 at +0.09 s, 90 B MLDv2 at +0.73 s, then silence; no
addresses involved, and IPv4 has no per-device IGMP switch). Decision:
accepted and documented, not suppressed -- §E.2 measures idle silence after a
settle window instead.

Pins the other delivered behaviour with a test: a bridge now survives a
single-sided node stop, so brctl create answers EEXIST on the common path
rather than only in a create race -- the attach must not short-circuit there,
because the restarted side has a brand-new anchor whose filters and markers
still have to be re-applied.
2026-10-06 00:21:08 +08:00
YueGuobin a1fcd29bce fix(qemu): build a command line for a headless node
_console_options() fell through the "none" branch and returned None, so
_build_command() blew up on `command.extend(None)`: a QEMU node with
console_type "none" -- offered by the GUI, and what API/MCP-driven labs use
to skip the console entirely -- failed to start with a 500 and a traceback.

Return an empty list, exactly like _aux_options() already does, and cover it
with a test that builds the command line for a headless node. Verified on a
live instance: such a node now starts (204) with `console: null` and no
-serial device in the QEMU command line.
2026-10-06 00:21:08 +08:00
YueGuobin 187201a08c feat(controller): offer QEMU the kernel datapath, gated per compute
Kernel eligibility becomes "both endpoints on one compute, each able to
anchor": Docker always (adapters are born as veth pairs), QEMU when that
compute's uBridge can create the persistent TAPs its adapters anchor on. The
question is asked per compute, because the link needs both ends anchored --
so a mixed or half-upgraded deployment degrades to the relay instead of
failing an attach.

probe_tap_support() creates and deletes one throwaway persistent TAP through a
scratch uBridge, cached by binary identity like the tc report; /capabilities
exposes `ubridge_tap` (absent = unknown, which keeps links on the relay).

The compute route for a QEMU adapter NIO took UDPNIO only, so a kernel link
was rejected with 422: its body and response now accept
Union[UDPNIO, BridgeNIO] exactly like Docker's.

Stale "Docker-to-Docker" wording in the config, link and MCP descriptions now
talks about anchors, and docs/features/qemu-kernel-datapath.md documents the
datapath -- verified end-to-end on a real instance: 32/32 kernel-datapath
checks and 29/29 on the relay variant.
2026-10-06 00:21:08 +08:00
YueGuobin 7d2d8c6747 feat(qemu): anchor QEMU adapters on a persistent TAP
QEMU had no host-side interface at all: every adapter was a local UDP tunnel
into uBridge (-netdev socket plus two UDP ports per adapter), so a link could
only ever be a userspace relay. Each adapter now owns a persistent TAP
(gq{node_id[:8]}e{adapter}p{port}), created by uBridge before QEMU is launched
and handed to this user, and the netdev is that TAP -- the anchor role Docker's
veth host end plays. Links attach to it:

* kernel link (NIOBridge): brctl create/up/addif enslaves the TAP into the
  per-link bridge and capture, markers and tc filters are installed on it,
  verbatim through the shared KernelDatapathMixin -- a TAP and a veth host end
  are interchangeable there (an egress qdisc on either impairs traffic entering
  the node, and PACKET_OUTGOING on either is the node receiving);
* relay link: bridge add_nio_ethernet plus add_nio_udp -- AF_PACKET, never the
  TAP NIO, which would take the fd QEMU itself holds.

The netdev type is fixed at launch, so this is all-or-nothing per VM: on the
TAP datapath every link type attaches to (or detaches from) a running VM,
including switching a link between the two datapaths. Stop un-persists the
TAPs (QEMU's open fd keeps each device alive until it exits) and removes the
per-link bridges; start sweeps leftovers first. A uBridge without the tap
module keeps the previous socket-netdev datapath, so an unupgraded install is
unaffected -- such a node simply cannot carry kernel links.
2026-10-06 00:21:08 +08:00
YueGuobin 12d8abce45 refactor(compute): share the kernel-datapath machinery across node types
Move the datapath-agnostic half of DockerKernelDatapathMixin into a new
KernelDatapathMixin (compute/kernel_datapath.py) so a second node type can
reuse it verbatim: the three marker primitives, the tc netem / cls_bpf / eBPF
appliers, the uBridge tc-capability probe, kernel marker teardown, link
detach, the per-link bridge cleanup and the adapter carrier -- plus
_kernel_attach(), lifted from DockerVM._connect_nio's kernel branch.

The mixin talks about "the anchor" (the host-side interface an adapter owns in
the root namespace) instead of "the veth host end": a node type provides
_kernel_host_ifc(), _kernel_anchors() and, when needed, _relay_carrier_bridge()
and _kernel_error(). Docker keeps only the veth lifecycle and those hooks;
behaviour is unchanged.

The C901 baseline entry moves with _netem_command_parts (the docker module is
no longer over the limit) and the bpf-compile-failure test patches the logger
of the module that now owns the code -- net zero new ignores.
2026-10-06 00:21:08 +08:00
YueGuobin 0b507773b9 docs(spec): require L2-only host anchors in uBridge
Every host-side device uBridge creates for the data plane (persistent TAP
anchors, veth host ends, per-link kernel bridges) must be pure L2: no IPv4
address, no IPv6 address and no IPv6 stack activity on that device.

Measured today: an idle TAP emits ~6 frames / 2 s of the host's own MLD/DAD
from its own link-local, the production Docker veth host end carries
fe80::5c30:e8ff:fe00:5d8d/64 and the per-link bridge fe80::f0d9:94ff:feac:e42b/64.
On a kernel link the bridge floods those frames into the emulated segment, on a
relay link uBridge relays them to the peer, and the host answers neighbor
solicitations for its own address (a phantom IPv6 neighbour for the emulated
nodes). IPv4 needs no equivalent knob: nothing self-provisions it, and the
anchors hold no IPv4 address.

The spec adds one command (link l2only <iface> [on|off], netlink addr-gen-mode
none -- never a /proc sysctl write, which fails the DAC check for a non-root
setcap'd uBridge), applied by the four creators themselves, with an
idle-silence acceptance test and a known-noise note in the Docker kernel
datapath document. No change to existing command grammar.
2026-10-06 00:21:08 +08:00
YueGuobin c1d0e6ee21 docs(spec): define the gemodel acceptance target
The F section asked for "gemodel loss within +/-5% of target" without
saying what the target is, and the A.1 table gave ranges only. Spell out
the semantics the kernel implements (and that the veth calibration
confirmed): p is the good-to-bad transition, r the bad-to-good
transition, 1-h the loss chance inside the bad state (the good state
loses nothing), mean loss p/(p+r)*(1-h) per direction. The functional
bullet now names that target and how to measure it (per-direction
counters, round-trip reads 1-(1-L)^2, pre-warm ARP when 1-h=100).

No wire-format or grammar change.
2026-10-06 00:21:08 +08:00
YueGuobin 1db9f171ca fix(controller): re-arm window_drop and expose kernel_datapath
Three fixes from live-calibrating the kernel impairment filters on an
isolated instance (Docker-to-Docker veth link, per-sequence evidence):

- update_filters skipped an unchanged filters dict as a no-op, so a
  one-shot window_drop outage that had already passed could never be
  re-armed: re-applying the same values produced no datapath command at
  all. A PUT still carrying window_drop now reconciles, restarting the
  schedule from the apply as documented. Measured: identical re-apply
  moves the outage window from seq 50-70 to 70-91 (arm at +8s of the
  new apply).

- gemodel parameter semantics were documented backwards in the
  validation rules, available_filters, the MCP/copilot descriptions and
  the feature docs. Measured against the kernel (per-direction counters,
  offered = sent + dropped): p is the good-to-bad transition chance, r
  the bad-to-good transition, 1-h the loss chance in the bad state (the
  good state loses nothing) - mean one-way loss p/(p+r)*(1-h), e.g.
  [10,30,100] -> 24.8%/25.7% measured vs 25% predicted, [5,45,100] ->
  10.8% both ways vs 10%.

- kernel_datapath was silently stripped from every REST/MCP link payload
  by the response model (LinkBase carried no such field), so clients
  could not tell a kernel link from a relay one.

Also verified on the same setup: the 3-argument window_drop form works
exactly as specified ([3000,5000,100] -> a single seq 31-55 outage,
[20000,6000,100] -> seq 115-144), and both generations of the command
builder emit the parameters unpadded.

Adds an API test for the field and controller tests for the no-op skip
and the window_drop re-arm exemption.
2026-10-06 00:21:08 +08:00
YueGuobin 5ac1521217 feat(mcp): accept project/node names as tool locators
LLM agents transcribe UUIDs unreliably — a 2-character slip invents an
id that never existed and is invisible to the eye. Tool parameters now
accept names wherever the server guarantees uniqueness: project names
among live projects, node names within a project. Links, drawings,
appliances and snapshots have no names and stay UUID-only.

Resolution sits in the single dispatch choke point (_run_handler_sync):
UUID-shaped values pass through untouched, names resolve with one list
call, and an unknown name fails fast listing the known names instead of
a confusing downstream 404. As a backstop for residual UUID typos,
error replies carrying "<UUID> doesn't exist" are matched against the
in-scope ids; a single candidate within edit distance 2 earns a
"Did you mean ...?" hint.
2026-10-06 00:21:08 +08:00
YueGuobin 935c00802f docs(mcp): refresh filter vocabulary in the MCP/copilot tool descriptions
link_update, link_available_filters and the copilot packet-filter tool
still advertised the pre-kernel-datapath five types. List the full
thirteen with positional parameter formats, ranges and kernel-only
marking, point at link_available_filters as the per-link authority
(topology + compute capability gated), and document window_drop's
apply-relative schedule restart. Also add kernel_datapath to the link
field lists.

Description-only: handlers pass filters through unchanged.
2026-10-06 00:21:08 +08:00
YueGuobin cecaf298bb feat(controller): expose kernel_datapath on the link payload
Runtime fact recomputed from the NIO wiring on every load (not
persisted). Without it clients cannot tell a relay link from a kernel
link whose compute lacks a filter capability — both show up as
kernel-only types missing from available_filters.
2026-10-06 00:21:08 +08:00
YueGuobin b4e4739d52 feat(compute): report uBridge tc capabilities and gate filters on them
Consume uBridge's ebpf_modes contract (feature/tc-window 40c36ae): a
stateful mode is usable iff ebpf=1 and its token is listed; builds
predating the field keep their shipped modes (nth/quota/flow), so the
pre-correction window semantics can never be installed silently.

- gns3server/utils/tc_capabilities.py: shared reply parser, mode
  policy and filter-type mappings (compute and controller gate on the
  same rules)
- gns3server/compute/ubridge/tc_probe.py: standalone probe spawning a
  throwaway uBridge as the server's own user, cached by binary
  identity (path/mtime/size - the version string cannot distinguish
  rebuilds); failures cache as unknown
- GET /v3/compute/capabilities gains ubridge_tc {netem, ebpf,
  ebpf_modes, cbpf}; the controller forwards it (Compute.capabilities)
  and available_filters hides kernel-datapath filter types an endpoint
  compute cannot run (both ends apply their own filters, so one
  incapable compute hides the type); computes without a report keep
  the full list and apply-time 409 stays the guard
- docker: _ubridge_apply_ebpf_drops gates per mode token; the cleanup
  path only sends "off" for modes the build declares
- split DockerVM's kernel-datapath machinery (veth lifecycle, carrier,
  marker primitives, tc filter translation, kernel NIO teardown) into
  compute/docker/docker_kernel_datapath.py (DockerKernelDatapathMixin)
2026-10-06 00:21:08 +08:00
YueGuobin 48dbdbe4a9 fix(docker): delete the per-link kernel bridge when a node stops
The bridge teardown only hung off the link-removal path, but deleting a
node or closing a project never issues a per-link delete — the veths
disappeared with their containers and left the bridge behind as an empty
orphan (reproduced: create a kernel link, DELETE the project, the
gns3{link_id} bridge survives). `_remove_kernel_veths` now deletes the
node's kernel-NIO bridges alongside the veth host ends: both endpoints do
it, the peer's still-enslaved port answers EBUSY (suppressed, last one
wins) exactly like link deletion, a relay NIO's uBridge bridge is left
alone (it dies with the process), and a node restart rebuilds the bridge
from the NIO in _connect_nio.

Found while cleaning up the window_drop e2e: seven such bridges had
accumulated on this host. Re-verified live: the bridge is gone after the
project delete, and the window_drop e2e (which includes a node restart
with the kernel link attached) still passes 15/15.
2026-10-06 00:21:08 +08:00
YueGuobin 316e7002c1 feat(docker): expose the eBPF time-window filter on kernel links
uBridge's window mode gained the semantics the B.2 spec asked for —
`tc window_drop <if> <start> <outage> <pct> [<period> [<jitter>]]`: a
single outage that traffic passes before *and* after, recurring flaps
with period >= outage, and a per-cycle jitter — so the kernel-only
`window_drop` filter type is now exposed:

- validation mirrors the tc grammar (3-5 params, ranges, period >=
  outage, jitter cap) and adds window_drop to KERNEL_ONLY_FILTERS;
  filter_inactive_filters keeps start=0 — unlike every other filter a
  zero first parameter means "the outage starts now", not "disabled".
- `_ubridge_apply_ebpf_drops` sends `tc window_drop` (positional
  pass-through) and turns the mode off explicitly when absent, under the
  same ebpf=1 gate.
- FILTERS entry (Start/Outage/Chance/Period/Jitter) + available_filters.

The schedule is relative to the apply: reconcile re-sets the classifier
on every apply, so any filter change, node restart or link reset restarts
the window.

Verified on a two-container kernel link, 15/15: a single outage
[1000, 1500, 100] arrives per-seq as [0..4, 13..19] (passing before the
window, dropped inside, passing after); recurring 1000/2000 ms = 52 %
round trip (duty cycle); period == outage = permanent outage; period <
outage = 409 before uBridge; jittered flap keeps the ~50 % duty cycle;
30 % chance on a permanent window = 53 % round trip against the
per-direction theory 1-0.7^2 = 51 %; coexist with netem; node restart
restores; available_filters kernel vs relay (409 + hidden); teardown
clean. P6b re-run as a regression on the same uBridge build: 13/13.

Worth recording for the next rebuild: the first delivered window program
loaded as root but reported ebpf=0 through gns3-server — the verifier's
non-root path loses the loop counter's bound, treats the catch-up loop as
unbounded and rejects the *whole* program (E2BIG, 8193 pending states),
which also took frequency_drop and quota down, with ebpf=0 as the only
symptom. Smaller trip caps did not help; the loop had to go (uBridge
572ca0c), on top of a Makefile header-dependency fix (53e34bb) that had
been shipping a stale program object.
2026-10-06 00:21:08 +08:00
YueGuobin 0c4ec8c38c feat(docker): eBPF stateful packet filters on kernel links
Consume the eBPF impairment classifier delivered in uBridge
feature/tc-precision: frequency_drop becomes the exact every-Nth mode
(tc nth_drop; -1 = drop everything maps to every 1st) and the new
kernel-only quota type is the byte-cap mode (tc quota_drop, 100 = hard
cutoff). KERNEL_UNSUPPORTED_FILTERS is gone entirely — kernel/relay
eligibility is now purely topological. Both modes gate on ebpf=1 from
the per-process tc capabilities probe (error names the setcap fix); the
cleanup path (modes off) only talks to the eBPF commands when the probe
reported them. Reconcile is a plain re-set: the netem reset-before-set
already detaches the program and clears uBridge's per-interface
registry, so a mode set after it is a fresh load+attach.

Documented semantic difference: the relay counts both directions
through one bridge counter, the kernel counts per direction — N=3
round-trip loss is 1-(2/3)^2 = 55.6% on kernel vs ~1/N on relay
(measured 57%). window_drop is NOT exposed: the delivered
implementation advances the window with no gap, making 'outside the
window packets pass' unreachable (needs outage/period fields —
recorded in the spec); flow_drop awaits a parameter-shape decision.

Also fixes a pre-existing restart bug the e2e exposed: _bridges (relay
bridge names) was never cleared on stop, so restarting a node with a
relay link skipped 'bridge create' and failed on add_nio_udp.

e2e (isolated instance): 13/13 — pref-1 tc_impair classifier on both
veths, 57% round-trip for N=3, -1 = exact 100%, quota hard cutoff,
delay coexistence, clean teardown, suspend/resume, node restart,
relay-leg frequency_drop regression through an Ethernet switch. Full
suite: 1925 passed.
2026-10-06 00:21:08 +08:00
YueGuobin d4b57d49fb feat(docker): expose netem-extension packet filters on kernel links
Surface the netem extensions delivered in uBridge feature/tc-netem-ext
as GNS3 filter types: rate (tc-style bandwidth string), reorder (needs
delay), gemodel (Gilbert-Elliot bursty loss, exclusive with
packet_loss), duplicate, seed and limit, plus the delay jitter
distribution and the loss/dup correlation parameters. All are
kernel-datapath only — the relay's packet-filter registry has no
equivalent, so available_filters hides them on relay links, setting one
on a created relay link returns 409, and the project-load path drops
them with a warning (update_filters runs before the datapath is
decided, so it cannot reject there). Validation mirrors the tc grammar:
reorder requires delay, gemodel and packet_loss are mutually exclusive,
a distribution requires jitter > 0, rate is integer+unit capped at
100gbit.

The translation in DockerVM._netem_command_parts emits the frozen
grammar order and gates extension keywords on the 'tc capabilities'
netem token list (probed once per uBridge process; a plain
delay/loss/corrupt/dup filter never probes, keeping old uBridge builds
untouched; the correl suffix has no token and gates on 'rate' as the
extension-build marker).

Reconcile became reset-before-set: the kernel's netem change merges
optional attributes (rate, correlation, reorder, corrupt, gemodel,
distribution, seed keep their previous value when the new message omits
them), so removing a parameter needs an explicit 'tc reset' — the
bpf_drop filters are re-added right after in the same flow, so the
clsact churn is invisible. The capability check runs before the reset
so a failed update leaves the previous qdisc in place.

e2e (isolated instance, kernel link): 24/24 — rate 512kbit adds exactly
2x the per-packet serialization to the RTT (45.5 ms for 1400-byte
pings), paretonormal jitter + rate-cleared leak check, reorder gap 5,
gemodel 50% bursty loss, duplicate, loss 30% correl 50%, seed 42 +
limit 5000 visible in the qdisc dump, suspend/resume and node restart
keep the filters, relay link rejects rate with 409, teardown leaves no
netem. Full unit suite: 1916 passed.
2026-10-06 00:21:08 +08:00
YueGuobin b1eb0984bc fix(docker): bring the veth host end up before a relay attach
The unified veth host end is born admin-down (carrier off until a link
attaches), and libpcap cannot open a packet socket on an admin-down
interface — its netlink promiscuous-mode transaction returns ENOENT, so
'bridge add_nio_ethernet' failed on every runtime relay link (and would
on any relay link at container start). Bring the interface up for the
attach; the carrier pass in the caller refines the state afterwards (a
suspended NIO sets it back down). Verified live with a direct uBridge
probe: attach on a down veth -> ENOENT, after 'link set up' -> OK.
2026-10-06 00:21:08 +08:00
YueGuobin 2b45f29b2c feat(docker): bpf packet filter on kernel links via cls_bpf match-drop
The GNS3 bpf filter (one expression per line, any line matching drops the
packet) now runs on the kernel datapath: uBridge's tc bpf_drop compiles
each line with libpcap (same compiler as the relay filter) into classic
BPF, attaches it to the veth host end's clsact egress as a cls_bpf
classifier with a gact TC_ACT_SHOT action, and the kernel migrates the
cBPF to eBPF internally -- no CAP_BPF needed.

- reconcile is flush + one add per line at priorities 10, 11, ... (OR
  semantics, same as the relay's per-line filters); tc reset (link
  delete / clear) is the full restore in uBridge and clears them
- capability-gated: the compute probes "tc capabilities" once per uBridge
  process (cached, invalidated on stop); without cbpf=1 the filter apply
  fails with an actionable upgrade error, and old uBridge builds without
  the tc module are never touched when no bpf filter is present
- a line that compiled for the controller's tcpdump but not for the
  compute's uBridge libpcap is skipped with a warning, mirroring the
  relay path
- KERNEL_UNSUPPORTED_FILTERS shrinks to frequency_drop (its eBPF stateful
  classifier is still pending, spec part B)

e2e (22/22): bpf "icmp" = 100% loss; size-discriminating expression
("greater 150") passes 98-byte and drops 300-byte pings (real byte-level
match); two-line OR; coexistence with netem (delay 50 -> small pings
100.2 ms while big dropped); clear removes clsact; suspend/resume keeps
the drops; link delete + recreate leaves no residual filters.
2026-10-06 00:21:08 +08:00
YueGuobin bd1c205651 docs: frozen uBridge spec for kernel impairment (netem extensions, eBPF/cBPF classifiers) 2026-10-06 00:21:08 +08:00
YueGuobin 0a8d430d50 feat(docker): packet filters on kernel-datapath links via tc netem
Impairment filters with a netem equivalent (delay, packet_loss, corrupt)
now run on the kernel datapath as one tc netem qdisc per veth host end,
pushed through uBridge's netlink tc module (tc netem set / tc reset).
This removes the relay delay filter's nanosleep bottleneck (upstream

Both link endpoints carry the filters: each end's qdisc egress covers
the traffic entering that container, so every direction is impaired
exactly once -- the same net effect as the relay, where both directions
cross the single filtered bridge.

- controller: eligibility keys on relay-only types (frequency_drop, bpf)
  instead of any filter; kernel links push the real filters (the
  synthetic suspend frequency_drop no longer flips a suspended link to
  relay on reopen/reset); update_filters 409s only relay-only types;
  available_filters hides them on kernel links
- compute: create_nio whitelists netem-capable filter types; the NIO
  update path keeps its own guard (PUT mutates the NIO in place);
  _ubridge_apply_netem translates the filter dict into one atomic
  netem-set (full re-apply IS the reconcile); node restart restores the
  qdisc, link deletion detaches it (the veth survives the link)
- e2e (27/27): delay 100 -> 200.2 ms RTT, atomic replace 50 -> 100.2 ms,
  clear -> baseline, packet_loss 30 -> 48 % round-trip (expected 51 %),
  suspend/resume and node restart keep the qdisc, link delete leaves no
  residual impairment
2026-10-06 00:21:08 +08:00
YueGuobin 94b5495683 docs: Docker kernel datapath implementation document
Cover the four-stage stack (kernel datapath, AF_PACKET capture, markers,
veth-everywhere): adapter interface types per node class, datapath
selection, veth lifecycle, link operations, suspend/capture/markers
semantics, uBridge command surface and the tc netem filters roadmap.
Cross-link from the traffic-insight marker doc for the kernel variant.
2026-10-06 00:21:08 +08:00
YueGuobin 672efda592 feat(docker): unify adapter interfaces on veth, allow kernel links at runtime
Every Docker adapter is now born as a veth pair at container start
(unified interface) regardless of NIO type: guest end in the container
namespace, host end in the root namespace. Kernel links enslave the host
end into the per-link Linux bridge; relay links attach it to the uBridge
relay via AF_PACKET (bridge add_nio_ethernet) — the TAP path is gone.

This makes the datapath a runtime decision:
- links can be created on running containers (kernel or relay) without
  touching container interfaces — the controller stopped-node
  eligibility check is removed
- project reopen re-prepares relay links and upgrades eligible ones to
  the kernel datapath
- packet capture start/stop now key on the NIO type (not veth presence)
  so relay-over-veth captures use the relay capture, kernel ones the
  AF_PACKET module
- vendor unix-socket containers keep their wiring: no veth is required
  on the relay path
2026-10-06 00:21:08 +08:00
YueGuobin 61020d3bbc feat(docker): traffic-insight markers on kernel-datapath links via AF_PACKET
Markers no longer disqualify the kernel datapath. They ride the NIO like
on the relay path and attach to the veth host end through uBridge's
marker add_kernel/delete_kernel/enable_kernel commands (AF_PACKET taps,
same BPF/direction/signal semantics as the relay mark filter).

- base_node: marker anchors are now polymorphic (relay bridge name or
  kernel veth host interface); the reconcile loop is datapath-agnostic
  and DockerVM overrides the add/delete/enable primitives to translate
  the commands. Marker-name validation extracted for both add paths.
- docker_vm: kernel NIO connect/update apply markers on the veth anchor;
  link deletion tears markers down explicitly (the veth survives the
  link, unlike a relay bridge whose death drops its filters).
- controller: eligibility and start_marker no longer exclude markers or
  project-level marker definitions; the kernel NIO carries the capture
  node's marker specs.
- NIO creation accepts markers on kernel NIOs (filters still rejected).
2026-10-06 00:21:07 +08:00
YueGuobin f6b869be63 feat(docker): packet capture on kernel-datapath links via AF_PACKET
Replace the capture rejection with wiring to uBridge's capture module:
an AF_PACKET socket bound to the veth host end writes into the same pcap
file the relay path uses (capture start_kernel <if> "<pcap>" /
capture stop_kernel), so the pcap streaming to clients is unchanged.

- capture survives node restarts: _connect_nio re-arms it when the NIO
  is already capturing, mirroring the relay path
- uBridge's kernel capture is a singleton per process: a concurrent
  second capture on the same node surfaces uBridge's EALREADY error
- update the datapath docs: filters and markers remain relay-only,
  capture is now served on both datapaths
2026-10-06 00:21:07 +08:00
YueGuobin 58b97b4ce5 fix(controller): don't push the synthetic suspend filter to kernel links
update_suspend() piggybacks on the filter system: get_active_filters()
returns {"frequency_drop": [-1]} while a link is suspended so relay-based
node types drop all traffic at the uBridge filter. Kernel-datapath links
implement suspend natively via interface carrier, and pushing the
synthetic filter tripped the compute-side guard, making suspend fail
with 409 on every kernel link (and leaving controller/kernel state torn).
_get_node_filters() now returns empty filters for kernel links.
2026-10-06 00:21:07 +08:00
YueGuobin 37d7b9121e feat(docker): wire Docker-to-Docker links through a kernel bridge
Eligible links (both endpoints Docker, same compute, no filters/markers,
stopped nodes, no unix-socket NIO containers) are wired as veth pairs
enslaved into a per-link Linux kernel bridge (gns3 + 11 hex of the link
id, filling IFNAMSIZ) instead of the uBridge UDP relay, so frames flow
entirely in the kernel.

- NIOBridge NIO type: the controller decides the datapath in
  UDPLink._prepare and both computes enslave their deterministic gv*/gc*
  veth pair via uBridge's docker/brctl modules
- carrier/suspend = host-end admin state; both endpoints race-safely
  create/delete the bridge (EEXIST/EBUSY/ENOENT tolerated)
- veth adapters can still attach relay (UDP) links on a running node:
  lazy relay bridge over AF_PACKET on the host end (add_nio_ethernet)
- filters/markers/capture are rejected with explicit errors on this
  datapath (they live in the uBridge relay); vendor unix-socket
  containers are excluded; Server.enable_kernel_datapath is the
  kill-switch (default on)
- host-end veths survive container death and are removed on stop plus
  swept by name on the next start (crash/stale recovery)
2026-10-06 00:21:07 +08:00
Cristi 207db770c6 feat(image-manager): Add support for nested image folders and appliance compatibility checks 2026-10-05 18:49:21 +03:00
Jeremy Grossmann 65c858d455 Merge pull request #2942 from markparonyan/ruff/pr03-fstrings
refactor: use f-strings
2026-10-05 14:35:56 +02:00
Mark Paronyan be52a0d0d4 refactor: discriminate appliance settings by template_type 2026-10-05 15:00:35 +03:00
Mark Paronyan b3b1ba0d4e Merge branch '3.1' into ruff/pr03-fstrings 2026-10-04 20:56:13 +03:00
Jeremy Grossmann 9f9be983cd Merge pull request #2939 from markparonyan/patch-1
fix: bump asyncssh - at least 2.24.1 for CVE-2026-62949 fixes
2026-10-04 18:15:03 +02:00
Mark Paronyan 1c5c3d1f76 fix: bump asyncssh - at least 2.24.1 for CVE-2026-62949 fixes
Updated asyncssh version to 2.24.1 in requirements.
2026-10-04 19:01:30 +03:00
Jeremy Grossmann 38cc7cc0a0 Merge pull request #2938 from markparonyan/ruff/pr02-unused-imports
Ruff/pr02 unused imports
2026-10-03 19:33:45 +02:00
Mark Paronyan 7e1bc67be2 chore(ruff): drop UP032 from the ignore baseline 2026-10-03 19:44:02 +03:00
Mark Paronyan 3135c8b7e3 refactor: use f-strings in remaining modules, scripts and tests 2026-10-03 19:44:02 +03:00
Mark Paronyan be943fcdf3 refactor: use f-strings in controller tests 2026-10-03 19:44:02 +03:00
Mark Paronyan bee6b3f8b1 refactor: use f-strings in compute tests 2026-10-03 19:44:01 +03:00
Mark Paronyan 7a9c600f54 refactor: use f-strings in controller modules 2026-10-03 19:44:01 +03:00
Mark Paronyan 552c0ca3e0 refactor: use f-strings in remaining compute modules 2026-10-03 19:44:01 +03:00
Mark Paronyan bbebf20825 refactor: use f-strings in dynamips manager 2026-10-03 19:44:01 +03:00
Mark Paronyan c458459626 refactor: use f-strings in dynamips NIO modules 2026-10-03 19:44:01 +03:00
Mark Paronyan fba3ecc5fc refactor: use f-strings in dynamips nodes 2026-10-03 19:44:00 +03:00
Mark Paronyan a5d2bca921 refactor: use f-strings in dynamips router node 2026-10-03 19:44:00 +03:00
Mark Paronyan 97f6805d0a refactor: use f-strings in iou compute modules 2026-10-03 19:44:00 +03:00
Mark Paronyan d5ad4c67c6 refactor: use f-strings in qemu compute modules 2026-10-03 19:44:00 +03:00
Mark Paronyan 7f2c0c7e9c refactor: use f-strings in docker compute modules 2026-10-03 19:44:00 +03:00
Mark Paronyan 72fae7a1ce refactor: declare new image sync models in the public API 2026-10-03 19:43:59 +03:00
Mark Paronyan d5e2832649 chore(ruff): drop F401 from the ignore baseline 2026-10-03 19:43:59 +03:00
Mark Paronyan b622ccae7b refactor: declare explicit public API in package __init__ modules 2026-10-03 19:43:59 +03:00
Mark Paronyan 01d890bc40 style: tidy import block after unused-import removal 2026-10-03 19:43:59 +03:00
Mark Paronyan 306d8fbde4 refactor: remove unused imports 2026-10-03 19:43:58 +03:00
Jeremy Grossmann 084004586c Merge pull request #2934 from markparonyan/ruff/pr01-imports
refactor: ruff fixes
2026-10-03 17:20:41 +02:00
Mark Paronyan 1ed8320e31 Merge branch '3.1' into ruff/pr01-imports 2026-10-03 14:21:22 +03:00
grossmj 64e2a62a04 fix: improve warning message for missing mtools in config disk creation. Ref #2778 2026-10-02 16:08:38 +02:00
Mark Paronyan b78672a8ca style: sort imports in the new image management modules 2026-10-02 12:43:26 +03:00
Mark Paronyan a64379cb78 chore(ruff): drop I001 from the ignore baseline 2026-10-02 12:43:26 +03:00
Mark Paronyan 83e7fbe63b style: sort imports in remaining tests and scripts 2026-10-02 12:43:26 +03:00
Mark Paronyan 6d16d923c7 style: sort imports in compute and controller tests 2026-10-02 12:43:26 +03:00
Mark Paronyan b46b9a1d26 style: sort imports in api tests 2026-10-02 12:43:26 +03:00
Mark Paronyan 55df230864 style: sort imports in controller 2026-10-02 12:43:26 +03:00
Mark Paronyan 61caa20524 style: sort imports in agent and remaining compute modules 2026-10-02 12:43:26 +03:00
Mark Paronyan 3b993b464f style: sort imports in schemas 2026-10-02 12:43:26 +03:00
Mark Paronyan 634189d443 style: sort imports in api and utils modules 2026-10-02 12:43:26 +03:00
Mark Paronyan 4ebc941951 style: sort imports in controller API routes 2026-10-02 12:43:26 +03:00
Mark Paronyan b9cdac487c style: sort imports in compute, db and services modules 2026-10-02 12:43:26 +03:00
Mark Paronyan 38e9ddca09 style: sort imports in compute node modules 2026-10-02 12:43:26 +03:00
Jeremy Grossmann 7f8d9c2f54 Merge pull request #2933 from markparonyan/ruff/trivia-fixups
refactor: ruff fixes
2026-10-01 23:18:29 +02:00
Mark Paronyan a77e06b907 Merge branch '3.1' into ruff/trivia-fixups 2026-10-01 19:58:02 +03:00
Mark Paronyan 269e7aaa67 chore(ruff): drop resolved trivia rules from the ignore baseline 2026-10-01 19:57:47 +03:00
Mark Paronyan 74943b4c74 refactor: convert remaining percent formatting in log messages 2026-10-01 19:57:47 +03:00
Mark Paronyan 95ada23395 refactor: replace percent formatting with format specifiers 2026-10-01 19:57:47 +03:00
Mark Paronyan 06899c92fc refactor: use iterable unpacking instead of concatenation 2026-10-01 19:57:46 +03:00
Mark Paronyan 2dc7479d11 style: remove f-strings without placeholders 2026-10-01 19:57:46 +03:00
Mark Paronyan c9416d2569 style: remove quotes from type annotations 2026-10-01 19:57:45 +03:00
Mark Paronyan fdb8d87a64 style: drop useless object inheritance 2026-10-01 19:57:45 +03:00
Mark Paronyan 396407827e style: drop redundant open mode arguments 2026-10-01 19:57:44 +03:00
Mark Paronyan d356a68987 refactor: replace aliased OSError subclasses 2026-10-01 19:57:44 +03:00
Mark Paronyan 7d0be62da8 style: drop redundant utf-8 encode arguments 2026-10-01 19:57:44 +03:00
Mark Paronyan 06ef803ee9 style: use not-in membership tests 2026-10-01 19:57:43 +03:00
Mark Paronyan 7a1e79a8a0 style: parenthesize chained boolean operators 2026-10-01 19:57:43 +03:00
Mark Paronyan 1a495ab318 refactor: replace getattr with attribute access 2026-10-01 19:57:42 +03:00
Mark Paronyan 0416ad8228 style: sort __all__ declarations 2026-10-01 19:57:42 +03:00
Mark Paronyan c5b5091f5e refactor: use explicit conversion in f-strings 2026-10-01 19:57:41 +03:00
Mark Paronyan 0f66fd6c2b style: remove trailing whitespace 2026-10-01 19:57:41 +03:00
Mark Paronyan 06e98f8b55 style: drop redundant utf-8 coding declarations 2026-10-01 19:57:40 +03:00
Mark Paronyan 9e5ab02147 style: remove unused noqa directives 2026-10-01 19:57:40 +03:00
grossmj be3da6f372 fix: require Python >= 3.10 in remote-install.sh when installing v3 2026-10-01 16:28:26 +02:00
Jeremy Grossmann 7be135f0ae Merge pull request #2903 from cristian-ciobanu/image-manager-out-of-sync
fix(image-manager): Reconcile the image inventory with filesystem changes
2026-10-01 15:42:14 +02:00
grossmj 1456d36bf0 chore(tests): fix mypy errors 2026-10-01 15:22:17 +02:00
grossmj 285af128f2 fix: ignore S324 error in tests 2026-10-01 14:53:54 +02:00
Jeremy Grossmann a2cdc14a25 Merge branch '3.1' into image-manager-out-of-sync 2026-10-01 14:44:24 +02:00
Jeremy Grossmann eb3ce3804d Merge pull request #2931 from markparonyan/mypy-api-controller-misc
chore: drop the mypy baseline ignore list
2026-09-29 21:37:31 +02:00
Jeremy Grossmann e90be1ebac Merge pull request #2930 from markparonyan/mypy-db-templates-images
fix(typing): resolve the remaining mypy errors (18 modules)
2026-09-29 21:37:14 +02:00
Mark Paronyan 98097a7f8f chore: drop the mypy baseline ignore list (no modules left) 2026-09-29 22:02:24 +03:00
Mark Paronyan eae69bd5c5 fix(typing): resolve mypy errors in compute.virtualbox.virtualbox_vm 2026-09-29 22:02:23 +03:00
Mark Paronyan 472c1b61fd fix(typing): resolve mypy errors in controller.project 2026-09-29 22:02:23 +03:00
Mark Paronyan 783f243230 fix(typing): resolve mypy errors in controller.appliance_manager 2026-09-29 22:02:23 +03:00
Mark Paronyan 0954723ebd fix(typing): resolve mypy errors in schemas.controller.computes 2026-09-29 22:02:22 +03:00
Mark Paronyan 36945daa83 fix(typing): resolve mypy errors in db.repositories.computes 2026-09-29 22:02:22 +03:00
Mark Paronyan 2fe4e39715 fix(typing): resolve mypy errors in db.repositories.api_keys 2026-09-29 22:02:22 +03:00
Mark Paronyan bacfab8465 fix(typing): resolve mypy errors in api.routes.controller.pools 2026-09-29 22:02:21 +03:00
Mark Paronyan adf9c15e21 fix(typing): resolve mypy errors in api.routes.controller.projects 2026-09-29 22:02:21 +03:00
Mark Paronyan 8f7b895cf4 fix(typing): resolve mypy errors in db.repositories.pools 2026-09-29 22:02:21 +03:00
Mark Paronyan fa9d1cde80 fix(typing): resolve mypy errors in db.repositories.rbac 2026-09-29 22:02:20 +03:00
Mark Paronyan 323055c486 fix(typing): resolve mypy errors in api.routes.controller.templates 2026-09-29 22:02:20 +03:00
Mark Paronyan bbf4e6aa2c fix(typing): resolve mypy errors in api.routes.controller.images 2026-09-29 22:02:20 +03:00
Mark Paronyan 81474b4651 fix(typing): resolve mypy errors in db.repositories.images 2026-09-29 22:02:19 +03:00
Mark Paronyan 4361598df0 fix(typing): resolve mypy errors in api.routes.controller.llm_model_configs 2026-09-29 22:02:19 +03:00
Mark Paronyan c048124c21 fix(typing): resolve mypy errors in db.repositories.llm_model_configs 2026-09-29 22:02:19 +03:00
Mark Paronyan b1d13edd2d fix(typing): resolve mypy errors in api.routes.controller.users 2026-09-29 22:02:18 +03:00
Mark Paronyan 8e96f18429 fix(typing): resolve mypy errors in db.repositories.users 2026-09-29 22:02:18 +03:00
Mark Paronyan 1aaf36fc80 fix(typing): resolve mypy errors in db.tasks 2026-09-29 22:02:18 +03:00
Jeremy Grossmann 5feebbc1d9 Merge pull request #2929 from markparonyan/mypy-restore-type-check
fix(typing): resolve mypy errors in services.templates and api.routes.controller.dependencies.authentication
2026-09-29 20:57:47 +02:00
Mark Paronyan a3cb73da3d fix(typing): resolve mypy errors in api.routes.controller.dependencies.authentication 2026-09-29 21:48:33 +03:00
Mark Paronyan dfea615248 fix(typing): resolve mypy errors in services.templates 2026-09-29 21:48:32 +03:00
Cristi 87df09c00c fix(images): Fix symlinked image imports and add regression tests 2026-09-29 20:16:22 +03:00
Cristi 2e12775911 fix(images): Fix symlink support in image inventory 2026-09-29 15:42:49 +03:00
Jeremy Grossmann 5f9fd6e595 Merge pull request #2928 from markparonyan/mypy-utils
fix(typing): resolve mypy errors in gns3server.utils
2026-09-29 13:42:11 +02:00
Jeremy Grossmann 5c87c0e1a4 Merge branch '3.1' into mypy-utils 2026-09-29 13:41:58 +02:00
Jeremy Grossmann b812ed75c0 Merge pull request #2927 from markparonyan/mypy-schemas-plus
fix(typing): resolve mypy errors in schemas + schemas.controller + services + utils.asyncio
2026-09-29 13:41:22 +02:00
Jeremy Grossmann 1838ad7f05 Merge branch '3.1' into mypy-schemas-plus 2026-09-29 13:41:11 +02:00
Jeremy Grossmann 053cd9479e Merge pull request #2926 from markparonyan/mypy-schemas
fix(typing): resolve mypy errors in gns3server.schemas
2026-09-29 13:40:10 +02:00
Jeremy Grossmann eace280c5f Merge branch '3.1' into mypy-schemas 2026-09-29 13:40:00 +02:00
Jeremy Grossmann 482e3faecb Merge pull request #2925 from markparonyan/mypy-schemas-compute
fix(typing): resolve mypy errors in gns3server.schemas.compute
2026-09-29 13:39:14 +02:00
Jeremy Grossmann e6410ed729 Merge branch '3.1' into mypy-schemas-compute 2026-09-29 13:39:01 +02:00
Jeremy Grossmann 76411f1eb0 Merge pull request #2924 from markparonyan/mypy-api-plus
fix(typing): resolve mypy errors in api + compute.dynamips + compute.iou + compute.vpcs + controller
2026-09-29 13:29:08 +02:00
Jeremy Grossmann 2f8277aeb7 Merge pull request #2922 from markparonyan/mypy-api-routes-controller-1
fix(typing): resolve mypy errors in gns3server.api.routes.controller
2026-09-29 13:28:43 +02:00
Jeremy Grossmann e8f49877fc Merge branch '3.1' into mypy-api-routes-controller-1 2026-09-29 13:28:33 +02:00
Jeremy Grossmann 7e5f5486eb Merge pull request #2921 from markparonyan/mypy-api-routes
fix(typing): resolve mypy errors in gns3server.api.routes
2026-09-29 13:25:46 +02:00
Jeremy Grossmann 7f4f9eb2d0 Merge branch '3.1' into mypy-api-routes 2026-09-29 13:25:35 +02:00
Jeremy Grossmann fd43f39a8d Merge pull request #2920 from markparonyan/mypy-api-routes-compute-4
fix(typing): resolve mypy errors in gns3server.api.routes.compute
2026-09-29 13:24:00 +02:00
Jeremy Grossmann 49f1af0962 Merge branch '3.1' into mypy-api-routes-compute-4 2026-09-29 13:23:50 +02:00
Jeremy Grossmann 87f469b299 Merge pull request #2919 from markparonyan/mypy-api-routes-compute-3
fix(typing): resolve mypy errors in gns3server.api.routes.compute
2026-09-29 13:23:15 +02:00
Jeremy Grossmann 1f7048d49d Merge branch '3.1' into mypy-api-routes-compute-3 2026-09-29 13:23:05 +02:00
Jeremy Grossmann 3be6da2476 Merge pull request #2918 from markparonyan/mypy-api-routes-compute-2
fix(typing): resolve mypy errors in gns3server.api.routes.compute
2026-09-29 13:22:22 +02:00
Jeremy Grossmann cbd29ece37 Merge branch '3.1' into mypy-api-routes-compute-2 2026-09-29 13:21:10 +02:00
Jeremy Grossmann 58c928759c Merge pull request #2916 from markparonyan/mypy-agent-gns3_copilot-plus
fix(typing): resolve mypy errors in agent.gns3_copilot + agent.mcp + agent.web_wireshark + api.routes
2026-09-29 13:20:39 +02:00
Jeremy Grossmann 726da8383a Merge branch '3.1' into mypy-agent-gns3_copilot-plus 2026-09-29 13:20:27 +02:00
Jeremy Grossmann 8493ddd2b4 Merge pull request #2915 from markparonyan/mypy-agent
fix(typing): resolve mypy errors in gns3server.agent
2026-09-29 13:19:43 +02:00
Jeremy Grossmann 468ad4e85f Merge branch '3.1' into mypy-agent 2026-09-29 13:19:30 +02:00
Jeremy Grossmann 2866dbc51b Merge pull request #2917 from markparonyan/mypy-api-routes-compute-1
fix(typing): resolve mypy errors in gns3server.api.routes.compute
2026-09-29 13:16:31 +02:00
Jeremy Grossmann 4efc22b7ab Merge branch '3.1' into mypy-api-routes-compute-1 2026-09-29 13:15:30 +02:00
Jeremy Grossmann 563b6080f0 Merge pull request #2923 from markparonyan/mypy-api-routes-controller-2
fix(typing): resolve mypy errors in gns3server.api.routes.controller
2026-09-29 13:13:58 +02:00
Jeremy Grossmann ec4b04ba54 Merge pull request #2914 from markparonyan/mypy-utils-misc
fix(typing): resolve mypy errors in utils
2026-09-29 13:01:12 +02:00
Jeremy Grossmann a6ae3984d4 Merge pull request #2913 from markparonyan/mypy-schemas-compute-nodes
fix(typing): resolve mypy errors in schemas.compute node schemas
2026-09-29 12:53:39 +02:00
Jeremy Grossmann 9e9a778f8b Merge pull request #2912 from markparonyan/mypy-api-controller-routes
fix(typing): resolve mypy errors in api.routes.controller
2026-09-29 12:50:06 +02:00
Jeremy Grossmann ce3911be71 Merge pull request #2911 from markparonyan/mypy-api-compute-routes
fix(typing): resolve mypy errors in api.routes.compute
2026-09-29 12:48:36 +02:00
Jeremy Grossmann 4bcaf596df Merge pull request #2910 from markparonyan/mypy-agent-copilot-utils
fix(typing): resolve mypy errors in agent.gns3_copilot.utils
2026-09-29 12:48:03 +02:00
Jeremy Grossmann f37a4c1bd3 Merge pull request #2909 from markparonyan/mypy-agent-copilot-tools-analysis
fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2 (packet analysis)
2026-09-29 12:47:41 +02:00
Jeremy Grossmann b73128d791 Merge branch '3.1' into mypy-agent-copilot-tools-analysis 2026-09-29 12:45:07 +02:00
Jeremy Grossmann 4337f8ccf6 Merge pull request #2908 from markparonyan/mypy-agent-copilot-tools-nornir
fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2 (nornir + packet filter)
2026-09-29 12:39:19 +02:00
Jeremy Grossmann 77a323e1e8 Merge branch '3.1' into mypy-agent-copilot-tools-nornir 2026-09-29 12:38:40 +02:00
Jeremy Grossmann f23302f52a Merge pull request #2907 from markparonyan/mypy-agent-copilot-skills
fix(typing): resolve mypy errors in agent.gns3_copilot.skills
2026-09-29 12:35:51 +02:00
Jeremy Grossmann a51af4a32e Fix module list after merging
Removed unused modules from the project configuration.
2026-09-29 12:35:33 +02:00
Jeremy Grossmann 7b40064658 Merge branch '3.1' into mypy-agent-copilot-skills 2026-09-29 12:30:40 +02:00
Jeremy Grossmann 080c907139 Merge pull request #2901 from markparonyan/mypy-controller-topology
fix(typing): resolve mypy errors in controller.topology
2026-09-29 12:28:01 +02:00
Jeremy Grossmann eb9a9ae19a Merge pull request #2904 from markparonyan/mypy-agent-web-wireshark
fix(typing): resolve mypy errors in agent.web_wireshark
2026-09-29 12:27:28 +02:00
Jeremy Grossmann 6aac6c8e34 Merge pull request #2906 from markparonyan/mypy-agent-copilot-client
fix(typing): resolve mypy errors in agent.gns3_copilot.gns3_client
2026-09-29 12:21:33 +02:00
Jeremy Grossmann 0ef6e80d94 Merge pull request #2905 from markparonyan/mypy-agent-copilot-agent
fix(typing): resolve mypy errors in agent.gns3_copilot.agent
2026-09-29 11:15:24 +02:00
Mark Paronyan 780b7f2ab6 fix(typing): resolve mypy errors in agent node lifecycle tools 2026-09-29 09:46:32 +03:00
Mark Paronyan bc27c4814f fix(typing): resolve mypy errors in agent.gns3_copilot.gns3_client.api_handlers 2026-09-29 09:46:31 +03:00
Mark Paronyan 9882eba088 fix(typing): resolve mypy errors in agent.gns3_copilot.chat_sessions_repository 2026-09-29 09:46:31 +03:00
Mark Paronyan 07560b0026 fix(typing): resolve mypy errors in agent 2026-09-29 09:46:31 +03:00
Mark Paronyan d783ccfc0d fix(typing): resolve mypy errors in controller.topology 2026-09-29 09:45:36 +03:00
Mark Paronyan a7b32ca6df fix(typing): resolve mypy errors in controller.appliance 2026-09-29 09:38:24 +03:00
Mark Paronyan 2542ad4647 fix(typing): resolve mypy errors in compute.vpcs.vpcs_vm 2026-09-29 09:38:24 +03:00
Mark Paronyan a7350ae0c8 fix(typing): resolve mypy errors in compute.iou.utils 2026-09-29 09:38:24 +03:00
Mark Paronyan 1babf7bcce fix(typing): resolve mypy errors in compute.dynamips.nodes.router 2026-09-29 09:38:24 +03:00
Mark Paronyan 68368220f2 fix(typing): resolve mypy errors in api.server 2026-09-29 09:38:17 +03:00
Mark Paronyan 1284701253 fix(typing): resolve mypy errors in utils.zipfile_zstd._patcher 2026-09-29 09:23:15 +03:00
Mark Paronyan df8b3c2903 fix(typing): resolve mypy errors in utils.asyncio.aiozipstream 2026-09-29 09:23:15 +03:00
Mark Paronyan 1772c7380e fix(typing): resolve mypy errors in utils.websocket_to_websocket 2026-09-29 09:23:15 +03:00
Mark Paronyan 5bf3c8d203 fix(typing): resolve mypy errors in utils.http_client 2026-09-29 09:23:15 +03:00
Mark Paronyan e6053dd0a8 fix(typing): resolve mypy errors in services.computes 2026-09-29 09:23:14 +03:00
Mark Paronyan 9bad1d92f8 fix(typing): resolve mypy errors in schemas.qemu_disk_image 2026-09-29 09:23:14 +03:00
Mark Paronyan 79862d900a fix(typing): resolve mypy errors in schemas.controller.templates.vmware_templates 2026-09-29 09:23:14 +03:00
Mark Paronyan 3abed40707 fix(typing): resolve mypy errors in schemas.controller.templates.docker_templates 2026-09-29 09:23:13 +03:00
Mark Paronyan edaf9a4377 fix(typing): resolve mypy errors in schemas.controller.templates.virtualbox_templates 2026-09-29 09:23:13 +03:00
Mark Paronyan 94a0f462bf fix(typing): resolve mypy errors in schemas.controller.templates.iou_templates 2026-09-29 09:23:13 +03:00
Mark Paronyan 07dc9b4d7d fix(typing): resolve mypy errors in schemas.controller.settings 2026-09-29 09:23:12 +03:00
Mark Paronyan 01dd09495c fix(typing): resolve mypy errors in schemas.controller.projects 2026-09-29 09:23:12 +03:00
Mark Paronyan a68e57dd2e fix(typing): resolve mypy errors in schemas.controller.nodes 2026-09-29 09:23:12 +03:00
Mark Paronyan 7439e91f5a fix(typing): resolve mypy errors in schemas.controller.appliances 2026-09-29 09:23:12 +03:00
Mark Paronyan 515ae8dcfb fix(typing): resolve mypy errors in schemas.compute.virtualbox_nodes 2026-09-29 09:23:11 +03:00
Mark Paronyan d027146fb9 fix(typing): resolve mypy errors in schemas.compute.vpcs_nodes 2026-09-29 09:23:11 +03:00
Mark Paronyan 87f209f548 fix(typing): resolve mypy errors in schemas.compute.qemu_nodes 2026-09-29 09:23:11 +03:00
Mark Paronyan 898205a33b fix(typing): resolve mypy errors in schemas.compute.vmware_nodes 2026-09-29 09:23:11 +03:00
Mark Paronyan aa7941411f fix(typing): resolve mypy errors in schemas.compute.iou_nodes 2026-09-29 09:23:10 +03:00
Mark Paronyan abb564a2fa fix(typing): resolve mypy errors in schemas.compute.frame_relay_switch_nodes 2026-09-29 09:23:10 +03:00
Mark Paronyan 2b704025e3 fix(typing): resolve mypy errors in schemas.compute.docker_nodes 2026-09-29 09:23:10 +03:00
Mark Paronyan 908a1eb3e6 fix(typing): resolve mypy errors in schemas.compute.cloud_nodes 2026-09-29 09:23:10 +03:00
Mark Paronyan ebe6dee916 fix(typing): resolve mypy errors in api.routes.controller.snapshots 2026-09-29 09:23:08 +03:00
Mark Paronyan 68d96193ec fix(typing): resolve mypy errors in api.routes.controller.groups 2026-09-29 09:23:07 +03:00
Mark Paronyan c340b18ba2 fix(typing): resolve mypy errors in api.routes.controller.roles 2026-09-29 09:23:07 +03:00
Mark Paronyan 2cf90dfce6 fix(typing): resolve mypy errors in api.routes.controller.privileges 2026-09-29 09:23:07 +03:00
Mark Paronyan 93419fc33a fix(typing): resolve mypy errors in api.routes.controller.nodes 2026-09-29 09:23:07 +03:00
Mark Paronyan 0872576b46 fix(typing): resolve mypy errors in api.routes.controller.acl 2026-09-29 09:23:06 +03:00
Mark Paronyan a648bf3780 fix(typing): resolve mypy errors in api.routes.controller.dependencies.database 2026-09-29 09:23:06 +03:00
Mark Paronyan 58609bae7b fix(typing): resolve mypy errors in api.routes.controller.controller 2026-09-29 09:23:06 +03:00
Mark Paronyan d826285748 fix(typing): resolve mypy errors in api.routes.controller.computes 2026-09-29 09:23:06 +03:00
Mark Paronyan 83b80b8c52 fix(typing): resolve mypy errors in api.routes.compute.virtualbox_nodes 2026-09-29 09:23:05 +03:00
Mark Paronyan a86cae541e fix(typing): resolve mypy errors in api.routes.compute.vpcs_nodes 2026-09-29 09:23:05 +03:00
Mark Paronyan e0c4cb8122 fix(typing): resolve mypy errors in api.routes.compute.vmware_nodes 2026-09-29 09:23:05 +03:00
Mark Paronyan 0ff63bfd90 fix(typing): resolve mypy errors in api.routes.compute.nat_nodes 2026-09-29 09:23:04 +03:00
Mark Paronyan 04ca7ffd9b fix(typing): resolve mypy errors in api.routes.compute.frame_relay_switch_nodes 2026-09-29 09:23:04 +03:00
Mark Paronyan fed8aab86c fix(typing): resolve mypy errors in api.routes.compute.projects 2026-09-29 09:23:04 +03:00
Mark Paronyan 9218f3fc72 fix(typing): resolve mypy errors in api.routes.compute.iou_nodes 2026-09-29 09:23:04 +03:00
Mark Paronyan cacbc18ad1 fix(typing): resolve mypy errors in api.routes.compute.ethernet_hub_nodes 2026-09-29 09:23:03 +03:00
Mark Paronyan 5ed85340af fix(typing): resolve mypy errors in api.routes.compute.ethernet_switch_nodes 2026-09-29 09:23:03 +03:00
Mark Paronyan 904672559e fix(typing): resolve mypy errors in api.routes.compute.dynamips_nodes 2026-09-29 09:23:03 +03:00
Mark Paronyan 50a749af36 fix(typing): resolve mypy errors in api.routes.compute.cloud_nodes 2026-09-29 09:23:02 +03:00
Mark Paronyan bb0f29b8e6 fix(typing): resolve mypy errors in api.routes.compute.docker_nodes 2026-09-29 09:23:02 +03:00
Mark Paronyan 8aa07a8c25 fix(typing): resolve mypy errors in api.routes.compute.atm_switch_nodes 2026-09-29 09:23:02 +03:00
Mark Paronyan 10edb109df fix(typing): resolve mypy errors in api.routes.compute.dependencies.authentication 2026-09-29 09:23:02 +03:00
Mark Paronyan c154d1c41e fix(typing): resolve mypy errors in agent.web_wireshark.docker_client 2026-09-29 09:23:01 +03:00
Mark Paronyan d25cb5cdca fix(typing): resolve mypy errors in agent.mcp.appliances 2026-09-29 09:23:01 +03:00
Mark Paronyan 2d712e0a90 fix(typing): resolve mypy errors in agent.gns3_copilot.utils.custom_netmiko.scripts.list_netmiko_telnet_devices 2026-09-29 09:23:01 +03:00
Mark Paronyan a3c4c95431 fix(typing): resolve mypy errors in schemas.compute.nat_nodes 2026-09-29 08:52:44 +03:00
Mark Paronyan 672ef2e3ce fix(typing): resolve mypy errors in schemas.compute.dynamips_nodes 2026-09-29 08:52:43 +03:00
Mark Paronyan 094fcf2747 fix(typing): resolve mypy errors in schemas.compute.atm_switch_nodes 2026-09-29 08:52:43 +03:00
Mark Paronyan 4ae6b5338d fix(typing): resolve mypy errors in agent.gns3_copilot.utils.parse_tool_content 2026-09-29 08:52:38 +03:00
Mark Paronyan 5cb1b8e3d2 fix(typing): resolve mypy errors in agent.gns3_copilot.utils.message_converters 2026-09-29 08:52:37 +03:00
Mark Paronyan cd7f5ab8e9 fix(typing): resolve mypy errors in agent.gns3_copilot.agent.model_factory 2026-09-29 08:52:33 +03:00
Mark Paronyan a251ca73ac fix(typing): resolve mypy errors in agent.gns3_copilot.agent.context_manager 2026-09-29 08:52:33 +03:00
Mark Paronyan 94bf56040b fix(typing): resolve mypy errors in utils.packet_filter_validation 2026-09-29 08:48:06 +03:00
Mark Paronyan ab5572a0c1 fix(typing): resolve mypy errors in utils.images 2026-09-29 08:48:06 +03:00
Mark Paronyan 943bd6732c fix(typing): resolve mypy errors in utils.encryption 2026-09-29 08:48:06 +03:00
Mark Paronyan bbdd9bf861 fix(typing): resolve mypy errors in api.routes.controller.drawings 2026-09-29 08:48:04 +03:00
Mark Paronyan 5fb2c277a9 fix(typing): resolve mypy errors in api.routes.compute.notifications 2026-09-29 08:48:04 +03:00
Mark Paronyan 6526beeb3d fix(typing): resolve mypy errors in api.routes.controller.chat 2026-09-29 08:48:04 +03:00
Mark Paronyan 777258ff68 fix(typing): resolve mypy errors in api.routes.controller.api_keys 2026-09-29 08:48:04 +03:00
Mark Paronyan f94a0cae0d fix(typing): resolve mypy errors in api.routes.compute.compute 2026-09-29 08:48:03 +03:00
Mark Paronyan 5bb7896242 fix(typing): resolve mypy errors in api.routes.compute.capabilities 2026-09-29 08:48:03 +03:00
Mark Paronyan f8144494f6 fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2.vpcs_tools_netmiko 2026-09-29 08:48:02 +03:00
Mark Paronyan d2fd238383 fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2.gns3_packet_filter 2026-09-29 08:48:02 +03:00
Mark Paronyan 67f68c9676 fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2.packet_analysis_tool 2026-09-29 08:48:02 +03:00
Mark Paronyan d6ae597f36 fix(typing): resolve mypy errors in agent.gns3_copilot.skills.manager 2026-09-29 08:48:01 +03:00
Mark Paronyan 35b360ca75 fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2.display_tools_nornir 2026-09-29 08:48:01 +03:00
Mark Paronyan c7c7e3b583 fix(typing): resolve mypy errors in agent.gns3_copilot.skills.loader 2026-09-29 08:48:01 +03:00
Mark Paronyan e8bff79370 fix(typing): resolve mypy errors in agent.gns3_copilot.tools_v2.config_tools_nornir 2026-09-29 08:48:01 +03:00
Mark Paronyan 97f71269d3 fix(typing): resolve mypy errors in agent.gns3_copilot.gns3_client.project_inventory 2026-09-29 08:48:00 +03:00
Mark Paronyan 890093de01 fix(typing): resolve mypy errors in agent.gns3_copilot.gns3_client.connector_factory 2026-09-29 08:48:00 +03:00
Mark Paronyan 7f2d1bc789 fix(typing): resolve mypy errors in agent.web_wireshark.manager 2026-09-29 08:41:57 +03:00
Mark Paronyan 81d77bb689 fix(typing): resolve mypy errors in agent.web_wireshark.stats 2026-09-29 08:41:57 +03:00
Mark Paronyan 755556c146 fix(typing): resolve mypy errors in agent.web_wireshark.manage_wireshark 2026-09-29 08:41:57 +03:00
Jeremy Grossmann b9192438c9 Merge pull request #2902 from markparonyan/mypy-services-authentication
fix(typing): resolve mypy errors in services.authentication
2026-09-28 23:34:47 +02:00
Jeremy Grossmann 884526c3be Merge pull request #2900 from markparonyan/mypy-compute-iou-vm
fix(typing): resolve mypy errors in compute.iou.iou_vm
2026-09-28 23:33:41 +02:00
Jeremy Grossmann f19274891c Merge pull request #2898 from markparonyan/mypy-schemas-dynamips-templates
fix(typing): resolve mypy errors in schemas.controller.templates.dynamips_templates
2026-09-28 23:33:22 +02:00
Jeremy Grossmann 7864a4e567 Merge pull request #2897 from markparonyan/mypy-api-controller-links
fix(typing): resolve mypy errors in api.routes.controller.links
2026-09-28 23:26:48 +02:00
Jeremy Grossmann f6ee1ee01a Merge pull request #2896 from markparonyan/mypy-api-compute-qemu-nodes
fix(typing): resolve mypy errors in api.routes.compute.qemu_nodes
2026-09-28 23:25:55 +02:00
Cristi 42d30651da Merge origin/3.1 into image-manager-out-of-sync
Preserve image reconciliation, locking, and regression coverage while integrating upstream release, dependency, typing, and formatting updates. Align feature code with the new Ruff checks.
2026-09-28 23:16:24 +03:00
Jeremy Grossmann 35e1abcaf2 Merge pull request #2895 from markparonyan/mypy-agent-agent-service
fix(typing): resolve mypy errors in agent.gns3_copilot.agent_service
2026-09-28 20:56:12 +02:00
Jeremy Grossmann 02d02cceca Merge pull request #2899 from markparonyan/mypy-db-models-base
fix(typing): resolve mypy errors in db models
2026-09-28 20:52:55 +02:00
Jeremy Grossmann 71965e0e81 Merge pull request #2894 from markparonyan/mypy-utils-zipfile-zstd
fix(typing): resolve mypy errors in utils.zipfile_zstd
2026-09-28 20:50:20 +02:00
Jeremy Grossmann 4ea31f98b7 Merge pull request #2893 from markparonyan/mypy-agent-mcp
fix(typing): resolve mypy errors in agent.mcp
2026-09-28 20:49:10 +02:00
Mark Paronyan 9f36fb4500 fix(typing): resolve mypy errors in services.authentication 2026-09-28 21:48:40 +03:00
Mark Paronyan 4802c865fc fix(typing): resolve mypy errors in compute.iou.iou_vm 2026-09-28 21:48:18 +03:00
Mark Paronyan db265f9524 fix(typing): resolve mypy errors in db models 2026-09-28 21:48:06 +03:00
Mark Paronyan 6f3e5cfc2b fix(typing): resolve mypy errors in schemas.controller.templates.dynamips_templates 2026-09-28 21:47:56 +03:00
Mark Paronyan ecff4beb65 fix(typing): resolve mypy errors in api.routes.controller.links 2026-09-28 21:47:46 +03:00
Mark Paronyan b8a51fdefc fix(typing): resolve mypy errors in api.routes.compute.qemu_nodes 2026-09-28 21:47:36 +03:00
Mark Paronyan 644ed63334 fix(typing): resolve mypy errors in agent.gns3_copilot.agent_service 2026-09-28 21:47:26 +03:00
Mark Paronyan 3fc1d27937 fix(typing): resolve mypy errors in utils.zipfile_zstd 2026-09-28 21:47:05 +03:00
Mark Paronyan 6ffa39642f fix(typing): resolve mypy errors in agent.mcp 2026-09-28 21:41:58 +03:00
Cristi 046dff4d08 fix(images): reconcile the image inventory with filesystem changes 2026-09-28 16:01:36 +03:00
Jeremy Grossmann 0c9f6aa9e3 Merge pull request #2892 from markparonyan/mypy-compute-qemu-vm
fix(typing): resolve mypy errors in compute.qemu.qemu_vm
2026-09-28 12:00:10 +02:00
Mark Paronyan 6bff55d3c7 Remove gns3server.compute.project from pyproject.toml
Removed 'gns3server.compute.project' from the list.
2026-09-28 12:41:51 +03:00
Mark Paronyan 798edca81d Remove qemu_vm typing ignore from pyproject.toml 2026-09-28 12:40:51 +03:00
Mark Paronyan 8c0a5404ac Merge branch '3.1' into mypy-compute-qemu-vm 2026-09-28 12:39:38 +03:00
Mark Paronyan 525ef8ca57 fix(typing): resolve mypy errors in compute.qemu.qemu_vm 2026-09-28 12:37:28 +03:00
Jeremy Grossmann 79ecb15164 Merge pull request #2888 from markparonyan/mypy-compute-vmware-vm
fix(typing): resolve mypy errors in compute.vmware.vmware_vm
2026-09-28 11:06:12 +02:00
Jeremy Grossmann 310bb193a5 Merge pull request #2887 from markparonyan/mypy-compute-docker-vm
fix(typing): resolve mypy errors in compute.docker vm modules
2026-09-28 11:03:44 +02:00
Jeremy Grossmann ccee503b74 Merge pull request #2891 from markparonyan/mypy-controller-compute
fix(typing): resolve mypy errors in controller.compute
2026-09-28 11:01:30 +02:00
Jeremy Grossmann 378751070c Merge pull request #2885 from markparonyan/mypy-compute-project
fix(typing): resolve mypy errors in compute.project
2026-09-28 10:55:33 +02:00
Jeremy Grossmann 10b5c1bb6b Merge branch '3.1' into mypy-compute-project 2026-09-28 10:55:25 +02:00
Jeremy Grossmann 0bd1204d15 Merge pull request #2884 from markparonyan/mypy-config
fix(typing): resolve mypy errors in config
2026-09-28 10:54:17 +02:00
Jeremy Grossmann 0718e038f7 Merge pull request #2883 from markparonyan/mypy-utils-embed-shell
fix(typing): resolve mypy errors in utils.asyncio.embed_shell
2026-09-28 10:47:23 +02:00
Jeremy Grossmann f2b8b32d59 Merge pull request #2882 from markparonyan/mypy-api-index
Fix mypy errors in api.routes.index
2026-09-28 10:39:46 +02:00
Mark Paronyan 21643fe89d fix(typing): resolve mypy errors in controller.compute 2026-09-28 04:56:59 +00:00
Mark Paronyan d1df96e0a6 fix(typing): resolve mypy errors in utils.asyncio.embed_shell 2026-09-28 04:56:18 +00:00
Mark Paronyan fdfb2d5591 fix(typing): resolve mypy errors in compute.vmware.vmware_vm 2026-09-28 04:55:44 +00:00
Mark Paronyan 667b0531f6 fix(typing): resolve mypy errors in compute.project 2026-09-28 04:55:38 +00:00
Mark Paronyan b8ae84031e fix(typing): resolve mypy errors in compute.docker vm modules 2026-09-28 04:55:32 +00:00
Mark Paronyan f858ae23a6 fix(typing): resolve mypy errors in api.routes.index 2026-09-28 04:55:30 +00:00
Mark Paronyan 2512556770 fix(typing): resolve mypy errors in config 2026-09-28 04:55:20 +00:00
grossmj 8df25dec32 Development on 3.1.0.dev7 2026-09-27 20:21:12 +02:00
grossmj 4fa4ef7c2f Release v3.1.0a6 2026-09-27 19:18:25 +02:00
grossmj 3f2afb0e4a Bundle web-ui v3.1.0a6 2026-09-27 19:10:11 +02:00
Jeremy Grossmann 902b1f8ea1 Merge pull request #2881 from GNS3/update-dependencies
Update dependencies
2026-09-27 19:07:55 +02:00
grossmj 1f3d00dd1a Merge remote-tracking branch 'origin/update-dependencies' into update-dependencies 2026-09-27 19:01:56 +02:00
Jeremy Grossmann 539d9f94f9 Merge branch '3.1' into update-dependencies 2026-09-27 19:01:34 +02:00
grossmj b96774d1f7 Sync appliances 2026-09-27 18:59:42 +02:00
grossmj 52f2774c05 sqlalchemy v2.0.54 is the last version that supports Python 3.10 2026-09-27 18:55:33 +02:00
Jeremy Grossmann d99b89f1e9 Merge pull request #2880 from markparonyan/harden-ci
ci: mypy, ruff, pytest
2026-09-27 18:52:08 +02:00
grossmj 76e85b552a chore(deps): update dependencies 2026-09-27 18:51:14 +02:00
Mark Paronyan 544890c6b4 chore: delete mac and win reqs 2026-09-27 19:09:25 +03:00
grossmj 45a0f596c8 Ignore Markdown files 2026-09-27 17:52:40 +02:00
grossmj 5c686b0c20 Revert changes to rbac-user-isolation-roadmap.md 2026-09-27 17:13:34 +02:00
Mark Paronyan ef579dfa8f ci: no flake8 checks for now, ruff covers them 2026-09-27 16:07:44 +03:00
Mark Paronyan a0450b6bce refactor: ruff autofixes 2026-09-27 15:55:10 +03:00
Mark Paronyan 2ac637c662 ci: run just test 2026-09-27 15:43:49 +03:00
Mark Paronyan 8dfe05df3d chore: justfile with mypy, ruff, pytest checks 2026-09-27 15:43:18 +03:00
Jeremy Grossmann efd6bb77fe Merge pull request #2878 from cristian-ciobanu/project-missing-images
Allow projects containing unavailable images to open in a degraded state instead of failing to load
2026-09-22 15:34:36 +02:00
grossmj 34923e46e0 chore(docs): update gns3_server.conf sample about the default NAT interface 2026-09-22 14:56:58 +02:00
Cristi da16dc9874 fix(qemu): Fixed missing image replacement for linked-clone nodes 2026-09-18 23:58:49 +03:00
Cristi 59a367b88d Allow projects containing missing images to open in a degraded state instead of failing to load 2026-09-18 15:06:17 +03:00
Jeremy Grossmann de8e1039a9 Merge pull request #2876 from yueguobin/fix/node-delete-rmtree-race
Make node working directory deletion robust against races and mode mangling
2026-09-15 17:49:19 +02:00
YueGuobin 84e7ead465 fix: make node working directory deletion robust
The rmtree error handler in BaseNode.delete() was chmod'ing the failed
path to S_IWRITE (0o200). On POSIX this strips the search permission
from directories, turning a transient deletion failure into a directory
that can no longer be traversed or deleted. The node deletion itself
silently "succeeds" (rmtree gives up once its error handler returns)
and a later project deletion then fails with EACCES. The handler also
never retried the failed operation, so it did not help on Windows
either (the platform it was written for).

The transient failure exists in practice: a concurrent MD5 checksum
computation caching its result in the node directory (e.g. a properties
request racing the deletion) can recreate a file after rmtree has
listed the directory, making the final rmdir fail with ENOTEMPTY.

- add the missing user permissions instead of replacing the whole mode,
  and retry the failed unlink/rmdir
- retry the whole deletion a few times to absorb files recreated while
  the directory is being deleted
- raise a ComputeError when the directory cannot be fully deleted
  instead of failing silently
2026-09-15 01:23:31 +08:00
Jeremy Grossmann 1c57bd7dca Merge pull request #2875 from yueguobin/feat/docker-image-sync
Sync Docker images from the controller to remote computes
2026-09-13 20:11:03 +02:00
YueGuobin be62e8c022 feat: keep Docker images on computes consistent with the controller host
Only relying on the image name lets a moved tag (e.g. a newer :latest)
silently serve stale content from a compute that already has an image
under the same name. When creating a Docker node, the controller now
pins the image id (Id from the Docker daemon on the controller host)
into the create payload. A compute holding a different image under the
same tag reports the image as missing, which routes it through the
image sync added by the previous commit and re-aligns the tag.

No new template fields or database changes: the controller host daemon
remains the source of truth and the pin is resolved per creation. When
the image is not available on the controller host the pin is omitted
and behavior is unchanged (the compute pulls from the repository).
2026-09-14 00:55:18 +08:00
YueGuobin c477812332 feat: sync Docker images from the controller to remote computes
When a Docker node is created on a remote compute whose Docker daemon
does not have the image, the compute now raises ImageMissingError
instead of blindly pulling from the Docker repository. The controller
exports the image from the Docker daemon on its host (docker save
stream) and streams it to the compute which loads it, so locally built
or docker-loaded images work across computes. When the image is not
available on the controller host either, the compute is asked to pull
it from the Docker repository as a fallback.

- add a POST /docker/images/load compute endpoint that streams a
  docker save tar into the Docker daemon
- let Docker.http_query pass raw (non-dict) request bodies through so
  the tar can be streamed to the daemon
- drop the inline pull from DockerVM.create() and the now unused
  DockerVM.pull_image wrapper
2026-09-14 00:36:54 +08:00
Jeremy Grossmann 2a3626824f Merge pull request #2874 from yueguobin/fix/docker-root-owned-file-reclaim
fix: reclaim root-owned container files so docker nodes and projects can be deleted
2026-09-13 17:19:09 +02:00
YueGuobin 4b239cc11a fix: run the reclaim helper as root regardless of the image's default USER
The one-shot reclaim container inherited the image's baked-in USER:
ghcr.io/nokia/srlinux runs as "user:user", so the "privileged" helper
was exactly as unprivileged as the server itself — chmod/chown on files
written by other uids (srlinux writes as a large internal uid) failed
with EPERM and node/project deletion still broke, just with a different
error. Pass --user 0:0 explicitly so the helper is root no matter what
the image declares, and fix the manual reclaim hint the same way.

Validated live on two stuck srlinux node directories (257/258
foreign-owned entries reclaimed to 0 in ~0.5 s each).
2026-09-12 23:15:52 +08:00
YueGuobin 54d9d7c08f fix: reclaim root-owned container files so docker nodes and projects can be deleted
The stop-time permission pass necessarily runs before the container's
processes exit, so files written during the shutdown window (syslog
archives, trace flushes) and after any SIGKILL path stay owned by root
on the host. An unprivileged server can neither chown nor delete them,
which broke node deletion and project deletion.

Reclaim them through the only privilege door a non-root server has:
a one-shot throwaway container of the node's own image, entrypoint
overridden to the GNS3 busybox (nothing of the guest boots), chowning
the node directory back to the server user. It runs at the end of
close() — project deletion rmtrees the directory right after the nodes
close, so close must leave a clean tree — and as a retry fallback in
delete(). The helper resolves the image by its create-time ID with
--pull=never, so a stale or retagged image name cannot turn into a
registry pull attempt.
2026-09-12 23:04:28 +08:00
Jeremy Grossmann 100cb327bd Merge pull request #2873 from yueguobin/fix/marker-replay-hardening
Marker tag aggregate replay driven by resident sharkd sessions
2026-09-11 19:33:32 +02:00
YueGuobin 673253d848 ci: install sharkd in the test workflow and make manager tests hermetic
The replay tests marked sharkd_present skip gracefully without the
binary, but four manager-level tests (cap eviction, in-use protection,
single spawn under concurrency, filter-error mapping) run entirely
against fakes and died on the acquire-time PATH check instead - install
wireshark-common (which ships /usr/bin/sharkd on the Ubuntu runner) so
the real-engine tests actually run in CI, and patch the which() check in
the fake-session tests so the suite stays green on machines without
sharkd.
2026-09-11 23:49:51 +08:00
YueGuobin 5d91ca0efc fix: harden sharkd replay sessions and serve the uncapped frame list
Review-driven session/transport fixes (each reproduced live against
sharkd 4.6.7 before fixing):

- raise the RPC stream limit to 16 MB: a full 1000-row frames page
  measures ~190 KB against the 64 KB StreamReader default, which failed
  the request with a 500 and desynchronized the resident session; a
  line-over-limit ValueError is now treated as a transport failure
- verify JSON-RPC reply ids: a timed-out request's late reply was
  served as the next request's answer; timeouts, dead pipes, malformed
  and stale replies now kill the session for good instead
- make check-spawn atomic under one manager lock: concurrent requests
  for the same pcap double-spawned sharkd and leaked the loser (process
  plus /tmp scratch copy) forever
- refcount sessions and evict idle only (LRU, cap raised 8 -> 16): a
  tag with more sources than the cap respawned every source on every
  request, and concurrent requests could get their session killed
  mid-RPC (spurious 502)
- map FilterError to sharkd's filter rejection (-13002) only; other
  engine failures with a filter set are 502, not a client 400
- detail: accept an optional frame_number to disambiguate
  same-microsecond frames (ts is not unique within a pcap); drop the
  -8003 -> 404 mapping (the range is validated locally, engine errors
  are real faults); a failed hex read is a 404 instead of "hex": null
- a pcap deleted mid-request is a 404, not a 500; the pcap-sized
  scratch copy runs off the event loop; server shutdown kills every
  resident session and drops its scratch directory
- pin the packet-list layout through scratch-HOME Wireshark
  preferences: the column indexes are a contract the server owns
  (protocol-level column negotiation is rejected by sharkd 4.6.x)

Range contract change (WebUI moved to an always-flat list): the merged
frame list is returned in full, deliberately uncapped - truncated and
per-second buckets are removed, frame_count always equals
len(frames), and rendering cost is the client's concern (the window
endpoint remains the incremental path).
2026-09-11 00:55:18 +08:00
YueGuobin ef5d81498a feat: accept link=<link_id> on the replay range and frames endpoints
Narrows the merged frame stream to one capture source BEFORE counting,
slicing and bucketing (frame_count / frames | buckets all recomputed on
the narrowed set), AND-composing with the display filter. A pure
identity filter applied before any engine work — only the selected
link's pcap gets a sharkd pass, so link+filter is cheaper than filter
alone.

Two boundaries by contract with the Web UI:
- sources[] stays the tag's stable inventory: every capture source
  listed with engine-free TOTAL counts, unaffected by link/filter — a
  source dropdown must not shrink when the view narrows (this also
  settles sources[].count on total counts rather than post-filter
  matches, which no spec ever required)
- an unknown link_id matches nothing: frame_count 0, start null, empty
  frames/buckets — the same shape as a zero-match display filter,
  deliberately not a 404; an empty link param is treated as absent
2026-09-09 00:53:06 +08:00
YueGuobin 31ba82b8d3 docs: record live validation of the sharkd replay endpoints
Real-data examples from a 9-link OSPF project (29 frames): range with
full columns and Wireshark coloring, filter verified in all four regimes
(match / zero-match / invalid 400 with sharkd's text / oversized), window
hit and miss, and a frame detail whose filter_expr carries OSPF's
multicast TTL (ip.ttl == 1) with byte ranges for hex highlighting.

Three precision fixes found by auditing the doc against the code: the
501 applies when the engine is consulted (an empty-capture tag answers
200 without sharkd), sources[].count is post-filter like every other
figure, and the unified {"message": …} error body is now stated.
2026-09-08 22:00:00 +08:00
YueGuobin 790c423c26 feat: drive marker replay with resident sharkd sessions
sharkd (the Wireshark daemon) is now the single decode engine — the
tshark/PDML path is gone, and without sharkd every replay endpoint
returns 501 (no degraded mode: one engine, one rendering shape for the
Web UI).

- Frame entries gain packet-list columns from sharkd's frames RPC:
  src/dst/proto/info plus the Wireshark coloring hints bg/fg
- range and frames accept ?filter=<display filter>, applied before
  counting and slicing; invalid expressions are 400 carrying sharkd's
  original text; filters travel as single argv-style elements, capped
  at 2000 chars; filtered frames keep their original pcap frame numbers
- frame detail returns sharkd's protocol tree with keys renamed into
  the REST contract (element/label/name/filter_expr/pos+size/expert/
  generated/children): a census-verified closed key set, values
  untouched, unknown keys passed through verbatim, Wireshark-internal
  hf ids dropped. filter_expr gives the UI click-to-filter; pos/size
  drives hex highlighting (hex still read straight from the pcap)
- one resident 'sharkd -' session per source pcap: lazy spawn, /tmp
  scratch copy + scratch HOME (hardened profiles), per-request
  (mtime,size) validation with respawn, LRU bound, per-session lock,
  per-RPC timeout, bounded close

Timeline backbone (gate, record-header scan, merge ordering, canonical
ts strings, hex reads) stays plain Python — identity and ordering never
depend on the engine.
2026-09-08 00:04:04 +08:00
YueGuobin 0c540abbf2 fix: stop leaking a global os.kill mock from the shutdown route test
The bare 'os.kill = MagicMock()' was never restored, so every later test
in the same process ran with a no-op kill. Any test that kills a child
process and waits for it then hangs forever (resident sharkd sessions
waiting on an immortal process). Use monkeypatch so the patch is undone.
2026-09-08 00:04:04 +08:00
Jeremy Grossmann fa282e0f82 Merge pull request #2872 from yueguobin/pr/3.1-20260906
feat: iol-runner Docker nodes, marker tag replay and copilot start-node rework
2026-09-05 20:45:03 +02:00
YueGuobin a8c96dd3f7 fix: keep port_number in Docker NIO dispatch of the batch endpoints
The project-open bulk path (_add_nio_binding / _get_existing_nio /
_update_nio_binding in routes/compute/projects.py) dropped port_number
for Docker nodes, unlike the per-node routes and the IOU branch. With
multi-port docker adapters (iol-runner nodes model 4 ports per adapter,
0ca9ccc63) every batched NIO landed on port 0 where Adapter.add_nio()
silently overwrites — the last entry per node won — so reopening a
project clobbered the port-0 links with the port-1 NIOs: links ended up
cross-wired between the wrong node pairs and the real links died
(IOL direct-link ping failures after close/reopen, EXCESSCOLL storms
from the phantom loops).
2026-09-06 00:15:43 +08:00
YueGuobin a8bec35ef0 Merge branch 'feat/copilot-start-quick-wait' into local-test 2026-09-05 22:52:05 +08:00
YueGuobin a841175fbf feat(copilot): make start_gns3_node immediate-return, add wait_seconds tool
The waiting variant blocked on a fixed progress bar (up to 120s) even
when every start command had already failed (e.g. the uBridge >= 1.2.3
409), burying the error behind two minutes of silence. Drop it: the
single start_gns3_node now sends the commands and returns per-node
results immediately (GNS3StartNodeQuickTool kept as an alias). Boot
waiting moves to a dedicated wait_seconds tool the agent calls
explicitly between start and status checks, with a 600s ceiling and
liveness logging every 5s.
2026-09-05 22:52:02 +08:00
YueGuobin 27b55b72f9 fix: keep upstream link-carrier commands off unix-socket NIO bridges
Upstream #2870 added TAP carrier control (set_nio_tap_carrier) and a
busybox interface-status monitor to the Docker base class. Both assume
TAP wiring: unix-socket NIO bridges carry no TAP NIO, so uBridge rejects
the carrier command ('bridge has no TAP NIO') and every link create,
update or delete on a running iol-runner node would fail; the monitor
polls eth{adapter} interfaces that do not exist in the container's
network namespace (or misreports the Docker default eth0 as adapter 0).

VendorDockerVM now short-circuits _set_adapter_carrier and the interface
monitor under GNS3_UNIX_SOCKET_NIO; TAP-wired vendor nodes keep the base
behavior.
2026-09-05 22:21:18 +08:00
YueGuobin e12ef7f272 tests: expect port_number in adapter carrier calls
Upstream #2870's carrier tests assert the two-argument
_set_adapter_carrier call; the 4-port-unit commit threads port_number
through every carrier call site, so single-port adapters now pass 0.
2026-09-05 21:58:45 +08:00
YueGuobin 1adc1b47b7 Merge branch 'feat/iol-docker-startup-config' into local-test 2026-09-05 21:55:51 +08:00
YueGuobin efed973107 Merge branch 'feat/marker-tag-replay' into local-test 2026-09-05 21:55:51 +08:00
YueGuobin 51cb85090d Merge branch 'fix/test-order-freeze-pollution' into local-test 2026-09-05 21:55:51 +08:00
YueGuobin 8892f9dc91 docs: record IOL console typing latency characteristics 2026-09-05 21:54:52 +08:00
YueGuobin e365427d1b docs: spell out IOL startup-config knob consumption in the node environment 2026-09-05 21:54:52 +08:00
YueGuobin 1ccea916c3 docs: roadmap for docker image types (vendor profiles)
Design proposal for an image_type discriminator on Docker templates plus
a compute-side profile registry: vendor parameters graduate from
environment markers into schema-gated fields, generic-feature
applicability becomes declared capability data, existing markers stay as
a compatibility fallback. Explicitly not a new node type.

Four profiles already exist to shape it (iol-runner, XRd, SR Linux
prototype, FRR appliance); implementation follows the current PR series.
2026-09-05 21:54:52 +08:00
YueGuobin e318afef86 feat: ship an iol-xe-base.txt base config for IOL Docker nodes
Follows the IOU pattern: the file lives in gns3server/configs/ and the
controller installs it into the user's configs directory on startup
(never overwriting a customized copy). Referenced by the documented
GNS3_IOL_STARTUP_CONFIG=iol-xe-base.txt template knob — without it a
fresh install had no file for the knob to resolve and nodes booted to
the initial configuration dialog.

Also fixes the configs directory named in the docs (~/GNS3/configs,
the configs_path server setting default — not ~/.config/GNS3/...).
2026-09-05 21:54:52 +08:00
YueGuobin 5685f40dd6 fix: keep payload-delivered state across container (re)creation
create() re-runs _parse_vendor_environment on every (re)create — and a
stop removes the container, so every start recreates it. Resetting the
controller-allocated application id there silently flipped nodes to the
hash fallback after their first stop/start (MAC change, plus collision
risk with the allocation pool), and dropped any pending startup-config
delivered by a PUT.

The application id and startup-config state now default via class
attributes instead of being re-initialized by the parser, and the hash
fallback is removed outright: starting an IOL node without a coordinated
allocation raises an actionable error — an uncoordinated id could
collide with the pool and blackhole traffic as a MAC loop.

Found in the E2E run: node booted app id 512, came back as 566 (hash
fallback) after one stop/start; the PUT-ed config edit vanished the same
way.
2026-09-05 21:54:52 +08:00
YueGuobin 8b3aafbbdc feat: IOU-style startup-config for IOL Docker nodes
Templates reference a config file with the GNS3_IOL_STARTUP_CONFIG
environment knob; the controller materializes the file content into
startup_config_content on node creation (sent once, knob consumed —
the same pattern as the IOU startup_config mapping). The compute builds
the content into the node's nvram_<app id> at the next start using the
IOU nvram_import utility (IOL and IOU share the nvram container format,
verified against iol-xe 17.18.02): valid config at boot, no setup
dialog, %h hostname substitution, hostname rewrite on rename.

Semantics verified against the runner: IOL boots from NVRAM whenever it
holds a config, so a plain stop/start never re-applies the startup
config and 'write memory' survives restarts; an explicit content edit
(PUT) is re-applied on the next start and wins over the saved config,
like IOU.
2026-09-05 21:54:52 +08:00
YueGuobin 9147deccaa docs: document that restarting capture nodes truncates marker pcaps
A marker pcap's lifetime equals its uBridge's lifetime: a fresh uBridge
reinstalls every desired marker (paused ones too — install first, then
turn the filter off) and pcap_dump_open truncates. Server restart +
project reopen without starting nodes is safe until a uBridge comes up
(verified live); Docker nodes restart effectively on server restart via
stale-container cleanup. Recorded in the tag-gate table, a lifecycle
note, and a pcap_dump_open_append follow-up.
2026-09-05 21:54:52 +08:00
YueGuobin a8fa529252 feat: add tag-keyed aggregate replay over paused markers' pcaps
Markers on different links sharing a tag form one distributed capture
session. Once every marker under the tag is paused (409 otherwise), three
read-only endpoints replay it:

- GET .../markers/tags/{tag}/replay/range merges the per-marker pcaps by
  scanning 16-byte record headers only (no tshark) into a timestamp-
  ordered frame list (per-second buckets above a 5000-frame cap)
- GET .../replay/frames?ts=&window_ms= returns frames in [T, T+window];
  an empty window is a normal empty array
- GET .../replay/frame/detail lazily decodes one frame the user opened:
  raw bytes for the hex view read straight from the pcap, protocol tree
  from 'tshark -T pdml' mapped isomorphically to JSON (every attribute
  survives, values stay strings). tshark reads a /tmp scratch copy with a
  scratch HOME — hardened profiles deny it the project directory.

Sort key is (ts, source file, frame number): ts is not unique across a
merge. The ts parameter round-trips as the exact string from the frame
list. Round-trip tests pin the PDML→JSON fidelity (element count and
attribute coverage).
2026-09-05 21:54:52 +08:00
YueGuobin 5c285f631b fix: normalize marker.match event tag to int to match the REST schema
The WS event carried the tag as str (verbatim from the MARK signal) when
present and as int when falling back to the registry, so one tag reached
consumers as two different values. Parse the signal's decimal (the exact
value we installed via 'mark <bpf> tag <id>') and keep the registered int
on malformed input; None only when neither side carries one.
2026-09-05 21:54:52 +08:00
YueGuobin 51b3c81859 fix: make the patched get_default_project_directory order-safe in tests
A product module first-imported while run_around_tests' autouse
monkeypatch of gns3server.utils.path.get_default_project_directory is
active (e.g. 'from gns3server.api.server import app' inside a test body)
binds the patched lambda into its own namespace forever: module-level
from-imports capture the object by value. Once the patch is reverted,
that module keeps calling the stale lambda, which closed over the very
test's tmppath — a directory deleted at that test's teardown. Every
later test hitting psutil.disk_usage(get_default_project_directory())
then fails with FileNotFoundError, but only when the importing test runs
before the API test files (full-suite collection order hides it).

The replacement now resolves Config.instance().settings at call time
instead of closing over the tmppath, so a frozen reference stays
correct; the test that triggered this imports gns3_app at module top
so no product import ever happens inside a patched window.

Also pins pytest-random-order (inert without --random-order) and
documents the order-independence rules for new tests in the
gns3-api-test-writing skill, including the known-red legacy files
whose tests share rows sequentially.
2026-09-05 21:54:52 +08:00
YueGuobin 0119373690 feat: allocate IOL Docker application IDs from a pool disjoint from IOU
IOL interface MACs derive from the application ID (aabb.cc{app}{iface}),
so ids must be unique across opened projects sharing computes — the same
reason IOU has its allocator. IOL Docker nodes draw from the upper half
(512-1022, netiomux's fixed peer is 1023) so the two node types can
neither collide nor starve each other; IOU behavior is unchanged.

The controller sniffs the same GNS3_IOL_RUNNER environment marker the
compute uses to select IOLDockerVM (both the nested-properties and
template/top-level-kwarg shapes), stores the id in node properties like
IOU does, and passes it through the Docker create payload. Without an
allocation the compute falls back to a stable node-derived id in the
same upper range.
2026-09-05 21:54:52 +08:00
YueGuobin b17d021bf6 fix: derive per-node IOL app id so linked routers get distinct MACs
IOL derives interface MACs from its application ID. With a constant
local-app every node shared the same MACs, and linked routers dropped
each other's frames as MAC loops — ARP never resolved and pings were
100% lost even though the whole uBridge datapath was forwarding.

Derive local-app from the node UUID (stable across restarts, kept in
1..1022) and align remote-app with the netiomux convention CML uses
(1023). Verified end to end: two iol-xe nodes, Ethernet0/0 link,
ARP resolves both ways, ping 4/5 (first loss = ARP), graceful
stop/start keeps the NVRAM config.
2026-09-05 21:54:51 +08:00
YueGuobin 0ca9ccc637 feat: model IOL adapters as 4-port units like the IOU node type
IOL interfaces come in 4-port units (Ethernet0/0-3, Ethernet1/0-3, ...),
addressed like IOU as (adapter_number, port_number 0-3):

- IOLDockerVM builds EthernetAdapter(interfaces=4) per adapter and asks
  the runner for adapters x 4 interfaces (num-eth).
- DockerVM threads port_number through the NIO/capture API (the compute
  routes parsed it from the URL but dropped it); single-port adapters
  keep the historical bridge{N} names and command sequence, multi-port
  adapters get one bridge per port (bridge{a}_{p}).
- The unix-socket NIO wiring addresses sockets flat across adapters:
  adapter x ports-per-adapter + port, so single-port images keep their
  exact socket layout.
- The controller port list for GNS3_IOL_RUNNER docker nodes is generated
  by StandardPortFactory with the IOU naming (Ethernet{segment0}/{port0},
  segment size 4); plain docker nodes keep eth{N}.
2026-09-05 21:54:51 +08:00
YueGuobin 9b55164064 revert IOL port-name override; document custom_adapters instead
_get_container_ifname only names the kernel interface inside the
container's network namespace (single call site: docker move_to_ns) -
IOL never uses that path, and the controller port list never reads it.
Name the ports through the template's custom_adapters instead (the
mechanism SR Linux appliances use for mgmt0/e1-1): adapter N shows as
Ethernet{N/4}/{N%4}, matching the IOS CLI, with no server-side changes.
2026-09-05 21:54:12 +08:00
YueGuobin 4c818c6b37 feat: show IOL-style interface names on iol-runner ports
Name ports after the IOL interface they map to (Ethernet0/0, one 4-port
unit per adapter range) via the _get_container_ifname override point, so
the GNS3 UI matches the IOS CLI. Display only — the flat adapter number
remains the socket index.
2026-09-05 21:54:12 +08:00
YueGuobin cd17306372 docs: docker memory is optional for iol-runner nodes
0 (the default) passes through as Docker's no-limit; the IOL-memory+512
guidance only applies when a cap is set.
2026-09-05 21:54:12 +08:00
YueGuobin 28f8f665f7 docs: template creation how-to for iol-runner nodes
API/Web-UI creation steps, a field table with the extra_volumes=/tmp
footgun, and a 3-step verification checklist.
2026-09-05 21:54:12 +08:00
YueGuobin d04a99f934 refactor: wire unix-socket NIOs through a per-node runtime directory
uBridge cannot reach sockets bind-mounted from the node's projects
directory: the path exceeds AF_UNIX's 107-byte sun_path cap. The /proc
detour from the previous commit is a dead end too - the runner drops
from root to the server uid, which makes the process non-dumpable and
its /proc/<pid>/root unreadable for the unprivileged server.

Instead, mirror how CML itself runs the image (source=<scratch>/tmp,
target=/tmp in its node definition): bind a per-node directory from the
runtime directory (<XDG_RUNTIME_DIR>/gns3/unixio/<node-id>, next to the
uBridge control sockets) at the image's socket directory. The path is
short, the directory is owned by the server user (whom the agent drops
its privileges to), and it is removed with the node. A socket directory
covered by a persisted volume keeps working as before.

IOLDockerVM persists only /tmp/run (nested bind at /tmp/run) and cleans
stale sockets/netio dirs from the socket directory on start, skipping
the cleanup when the container is already running. A failed wiring now
stops uBridge so the next start does not hit 'bridge already exist'.
2026-09-05 21:54:12 +08:00
YueGuobin 165f271bb8 refactor: reach unix-socket NIOs through the container root in /proc
The unix-socket NIO no longer requires the socket directory to be a
persisted volume: uBridge references the sockets through
/proc/<container-pid>/root<dir>/..., which is always well under the
107-byte sun_path cap (a project directory path alone exceeds it) and
leaves the sockets ephemeral in the container's own filesystem.

This replaces the runtime-dir symlink alias and its cleanup, and the
mount-time volume enforcement. IOLDockerVM now persists only /tmp/run
(the IOL working directory: startup-config + NVRAM) as a nested bind
instead of the whole /tmp; stale socket cleanup is gone with it, as
containers are recreated on every start.
2026-09-05 21:54:12 +08:00
YueGuobin 42e26717e6 fix: alias long unix-socket NIO paths through the runtime dir
AF_UNIX sun_path caps at 107 bytes and node volume directories
(projects/<uuid>/project-files/docker/<uuid>/tmp) exceed it — uBridge
rejects the NIO with 'invalid file path size'. When the wiring path is
too long, create <XDG_RUNTIME_DIR>/gns3/unixio-<node-id> as a symlink
to the real volume directory (same trick as the uBridge control
socket) and reference the alias in the uBridge commands; the symlink is
removed when uBridge stops. Found during E2E with iol-xe:17-18-02.
2026-09-05 21:54:12 +08:00
YueGuobin e272ad915b feat: add IOL (iol-runner) Docker node support
Run Cisco CML containerized IOL images (e.g. iol-xe/iol-xe:17-18-02,
driven by virl.lab/cmd/iol-runner) as GNS3 Docker router nodes:

- VendorDockerVM: generic GNS3_UNIX_SOCKET_NIO/GNS3_UNIX_SOCKET_DIR knobs
  wiring adapters through AF_UNIX datagram socket pairs
  (add_nio_unix cNN.sock sNN.sock) instead of TAP + move_to_ns; node
  creation fails if the socket dir is not a persisted volume.
- IOLDockerVM (GNS3_IOL_RUNNER=1): forces skip-init + unix-socket NIO +
  /config,/tmp volumes, writes iol-config.json on every start (num-eth
  tracks adapters, runner drops to the server uid/gid so the sockets are
  reachable), pre-creates tmp/run, cleans stale sockets after unclean
  kills, and makes reload a graceful stop + full start (NVRAM flush +
  rewiring). Console stays telnet on PID 1 stdio.
- Manager selects the node class from console_type or GNS3_* environment
  markers (create-time, like console_type).
- Image-free tests (25) and feature documentation.
2026-09-05 21:54:12 +08:00
YueGuobin d4f2a429f4 docs: document that restarting capture nodes truncates marker pcaps
A marker pcap's lifetime equals its uBridge's lifetime: a fresh uBridge
reinstalls every desired marker (paused ones too — install first, then
turn the filter off) and pcap_dump_open truncates. Server restart +
project reopen without starting nodes is safe until a uBridge comes up
(verified live); Docker nodes restart effectively on server restart via
stale-container cleanup. Recorded in the tag-gate table, a lifecycle
note, and a pcap_dump_open_append follow-up.
2026-09-05 21:49:24 +08:00
YueGuobin 49c8a72103 fix: make the patched get_default_project_directory order-safe in tests
A product module first-imported while run_around_tests' autouse
monkeypatch of gns3server.utils.path.get_default_project_directory is
active (e.g. 'from gns3server.api.server import app' inside a test body)
binds the patched lambda into its own namespace forever: module-level
from-imports capture the object by value. Once the patch is reverted,
that module keeps calling the stale lambda, which closed over the very
test's tmppath — a directory deleted at that test's teardown. Every
later test hitting psutil.disk_usage(get_default_project_directory())
then fails with FileNotFoundError, but only when the importing test runs
before the API test files (full-suite collection order hides it).

The replacement now resolves Config.instance().settings at call time
instead of closing over the tmppath, so a frozen reference stays
correct; the test that triggered this imports gns3_app at module top
so no product import ever happens inside a patched window.

Also pins pytest-random-order (inert without --random-order) and
documents the order-independence rules for new tests in the
gns3-api-test-writing skill, including the known-red legacy files
whose tests share rows sequentially.
2026-09-05 21:49:24 +08:00
YueGuobin c646d6df5a feat: add tag-keyed aggregate replay over paused markers' pcaps
Markers on different links sharing a tag form one distributed capture
session. Once every marker under the tag is paused (409 otherwise), three
read-only endpoints replay it:

- GET .../markers/tags/{tag}/replay/range merges the per-marker pcaps by
  scanning 16-byte record headers only (no tshark) into a timestamp-
  ordered frame list (per-second buckets above a 5000-frame cap)
- GET .../replay/frames?ts=&window_ms= returns frames in [T, T+window];
  an empty window is a normal empty array
- GET .../replay/frame/detail lazily decodes one frame the user opened:
  raw bytes for the hex view read straight from the pcap, protocol tree
  from 'tshark -T pdml' mapped isomorphically to JSON (every attribute
  survives, values stay strings). tshark reads a /tmp scratch copy with a
  scratch HOME — hardened profiles deny it the project directory.

Sort key is (ts, source file, frame number): ts is not unique across a
merge. The ts parameter round-trips as the exact string from the frame
list. Round-trip tests pin the PDML→JSON fidelity (element count and
attribute coverage).
2026-09-05 21:49:24 +08:00
YueGuobin 9262dcfaef fix: normalize marker.match event tag to int to match the REST schema
The WS event carried the tag as str (verbatim from the MARK signal) when
present and as int when falling back to the registry, so one tag reached
consumers as two different values. Parse the signal's decimal (the exact
value we installed via 'mark <bpf> tag <id>') and keep the registered int
on malformed input; None only when neither side carries one.
2026-09-05 21:49:24 +08:00
Jeremy Grossmann b72b8b44b4 Merge pull request #2870 from cristian-ciobanu/docker-link-status
feat: Add Docker link carrier and interface status support
2026-09-04 20:52:13 +02:00
Cristi 5d08cc92a4 fix: Fix failing tests and adress the MCP 2.x incompatibility failures 2026-09-04 17:37:36 +03:00
Cristi 28f0d9c009 feat: Add Docker link carrier and interface status support 2026-09-04 09:45:41 +03:00
Jeremy Grossmann d1b4de6b8f Merge pull request #2868 from yueguobin/feat/template-delete-usage-guard
feat: forbid deleting templates and images still used by projects
2026-08-31 19:03:28 +02:00
Jeremy Grossmann 20819f35ae Merge pull request #2867 from yueguobin/fix/controller-console-ws-disconnect-traceback
fix: tear down controller console WebSocket forwarding cleanly on client disconnect
2026-08-31 19:02:02 +02:00
YueGuobin 823cf37287 fix: list every project in template/image in-use refusal, not just the first
The usage scans broke out of the whole (project, node) iteration at the
first matching node, so deleting a template or image used by several
projects reported only one project name while the error message says
'one or more projects'. Keep scanning and list each project once.

Caught on a live server: an IOU L3 template used by two projects
(one of them closed) was refused citing only one of them.
2026-08-31 23:04:00 +08:00
YueGuobin eed981fee3 fix: tear down controller console WebSocket forwarding cleanly on client disconnect
Closing a web console while the node kept streaming output crashed the
ws_console/vnc_console handlers with an uncaught WebSocketDisconnect from
the compute-to-client send path (only the opposite direction was guarded),
producing a full ASGI traceback on every console close.

Restructure both endpoints as symmetric forwarding tasks managed with
asyncio.wait(FIRST_COMPLETED): exceptions from either direction are
collected as task exceptions, the peer task is cancelled, the compute
WebSocket is closed, and the client is notified. The receive loops now
close and log on every exit path instead of only in the exception branch.

Tests patch the in-memory ASGI transport to deliver a conformant
websocket.disconnect on client close (it sends a non-conformant
websocket.close that starlette receive() rejects).
2026-08-31 22:43:41 +08:00
YueGuobin 13548deae8 feat: forbid deleting templates and images still used by projects
Deleting a template with prune_images, deleting an image, or pruning
orphan images only checked template references — a project node still
pointing at the image (e.g. via hda_disk_image_backing_file) was left
with a dangling reference and the project could no longer be opened.

- Add controller helpers scanning every known project (opened projects
  via in-memory nodes, closed projects via their .gns3 file) for
  template and image usage; unreadable topologies are skipped
- Guard DELETE /templates/{id}, DELETE /templates/{id}?prune_images,
  DELETE /images/{path} and /images/prune with a 409 listing the
  project names
- Run all template-delete checks before any mutation so a refused
  deletion cannot leave the template gone while its images survive
2026-08-31 22:30:42 +08:00
grossmj 861b7e86ff fix: publish-api-documentation.yml 2026-08-31 12:28:03 +02:00
grossmj ed20118f86 Development on 3.1.0.dev6 2026-08-31 11:45:34 +02:00
Jeremy Grossmann 375fc8af81 Merge pull request #2864 from yueguobin/fix/console-ws-ticket
fix: issue short-lived access tickets instead of JWTs in MCP tools
2026-08-29 21:07:12 +02:00
YueGuobin 3cf9dbff5b fix: handle client disconnect in compute console WebSocket forwarding
The compute-side telnet_forward (and vnc_forward) let the
WebSocketDisconnect that starlette raises from send_bytes once the peer
is gone escape to the generic task-exception handler. Its str() is
empty, so every client disconnect during active node output logged a
message-less warning:

  WARNING gns3server.compute.base_node:658 Exception while forwarding
  WebSocket data to TELNET server:

Catch WebSocketDisconnect in both forwarders and log it at INFO as the
normal end of a session, and format the remaining task exceptions with
!r so their type stays visible. Mirrors the controller-side fix for
the same scenario (2324dcd74).
2026-08-29 10:09:05 +08:00
Jeremy Grossmann cf00a4e863 Merge pull request #2863 from yueguobin/docs/busybox-ifup-cidr-trap
docs: document the BusyBox ifup CIDR trap in the docker init path
2026-08-28 22:02:58 +02:00
Jeremy Grossmann c42ac6e559 Merge pull request #2862 from yueguobin/fix/console-ws-client-disconnect
fix: handle client disconnect in console WebSocket forwarding
2026-08-28 22:00:59 +02:00
YueGuobin f95d4c7a4e fix: update link_capture_download and symbol_get tool descriptions for tickets
The tool descriptions still advertised the removed "short-lived JWT"
and gave no guidance against URL reconstruction. Align them with
node_console's wording: run the returned curl_command verbatim, never
rebuild the URL or copy the ticket by hand, re-call the tool once the
10-minute ticket has expired.
2026-08-29 01:13:33 +08:00
YueGuobin d1edfbe5e8 fix: replace Bearer JWTs with path-bound access tickets in MCP download tools
link_capture_download and get_symbol embedded a 10-min JWT in the
Authorization header of the curl command they return; LLM clients
retyping that command corrupted the long token — the same failure
class as the console WebSocket URLs fixed in the previous commit.

Generalize the ticket store (console_tickets.py -> access_tickets.py,
ConsoleTicketService -> AccessTicketService): a ticket now binds to
either a node's console endpoints (WebSocket, matched against route
path params) or one exact REST resource path (capture file, symbol
image). The two binding modes are isolated — a node-bound ticket
cannot authenticate a REST resource and vice versa.

get_user_from_token redeems path-bound tickets through the existing
token parameter / Bearer header, matched exactly against
request.url.path, then reuses the shared user lookup and token_version
revocation checks. Download URLs embed ?token=<ticket> and the curl
commands no longer carry a Bearer header.
2026-08-29 01:10:19 +08:00
YueGuobin 6d6b5351fa fix: issue short-lived console tickets instead of JWTs in node_console MCP tool
LLM clients transcribing the console WebSocket URL into shell commands
reliably corrupted the ~200-char JWT embedded in it (dropped header
segment -> "MissingAlgorithmError: Missing 'alg' value in header" on
every connection attempt). The node_console tool now mints a short
random ticket ("gns3t_" + 16 urlsafe chars, 10 min TTL, multi-use)
stored server-side and bound to the node's console endpoints:

- new ConsoleTicketService (gns3server/services/console_tickets.py),
  in-memory store with lazy expiry sweeps
- get_current_active_user_from_websocket redeems tickets through the
  existing "token" query parameter, gated on websocket.path_params so a
  ticket only authenticates the console/ws and console/vnc routes of
  the node it was minted for; the JWT path is unchanged
- redemption reuses the existing user lookup, token_version revocation
  and is_active checks, so logging out invalidates outstanding tickets
- vnc_url no longer embeds the full session JWT
- the tool docstring now tells clients to run the returned command
  verbatim instead of reconstructing the URL
2026-08-29 01:00:12 +08:00
YueGuobin 2324dcd744 fix: handle client disconnect in console WebSocket forwarding
The compute-to-client forwarding loops in ws_console and vnc_console had
no WebSocketDisconnect handling: when a client (WebUI, or an MCP-driven
websocat session killed by timeout) disconnected while the compute was
still streaming console output, the next send raised WebSocketDisconnect
that leaked all the way up to uvicorn as an ERROR-level ASGI traceback.

Catch it and log at info level, symmetric with the receive-side handlers.
2026-08-28 23:35:33 +08:00
YueGuobin c3cc067eea docs: document the BusyBox ifup CIDR trap in the docker init path
BusyBox ifup — what runs in /gns3/init.sh unless the image ships its
own ifupdown — only brings up 'auto' stanzas and rejects CIDR notation
in the address line ("don't have all variables for <iface>/inet"),
leaving the interface unconfigured after a container restart.

Document the constraint next to the ifup call and in the generated
/etc/network/interfaces sample, where addressing gets written.
2026-08-28 23:26:24 +08:00
Jeremy Grossmann ae317608e8 Merge pull request #2861 from yueguobin/refactor/gns3-client-and-mcp-fixes
refactor: sink shared REST handlers into gns3_client + MCP regression fixes
2026-08-25 19:28:43 +02:00
YueGuobin df25e037ea fix: accept the 'local' compute id in compute tools
The compute_get/compute_images MCP tools typed compute_id as a UUID, so
passing 'local' (the actual id of the built-in compute, which the
compute_images description itself pointed to) was rejected by schema
validation. Both tools now take a string defaulting to 'local', and the
compute_get REST route resolves 'local' through the controller since the
local compute has no database entry.
2026-08-26 00:44:57 +08:00
YueGuobin 6703e50487 fix: unify the device tool error contract
The device tools reported failures in three shapes: topology-level
entries with only an error key, per-device entries with status 'error'
plus the reason under output (VPCS tool only), and raw exceptions
leaking out of template rendering. Every in-band error entry now
carries status 'failed' and an error message, and invalid Jinja2
templates are reported in-band instead of escaping the handler.
2026-08-26 00:39:38 +08:00
YueGuobin 2951af6eab fix: reject non-VPCS nodes in the VPCS config tool
VPCS syntax typed into another node's console is silently discarded
(IOS answers % Invalid input) while the tool still reports success.
get_device_ports_from_topology now carries the GNS3 node type through
to callers, and VPCSCommands fails device preparation with a per-device
error unless the node type is vpcs.
2026-08-26 00:36:47 +08:00
YueGuobin 8a8314ab29 fix: dedupe and report automatic template creation from images
install_appliances_from_image relied on the name+version pair check in
TemplatesService, so the same appliance reached through a second image
(the CSR1000v case) created a second template sharing the name. The auto
path now skips when any template with the same name exists, whatever the
version, and returns a manifest of created and skipped candidates;
POST /images/install replies 200 with that manifest instead of an empty
204, and the image_install MCP tool surfaces it.
2026-08-26 00:04:57 +08:00
YueGuobin 888afdccbd fix: return the created template from appliance install
POST /appliances/{id}/install replied 204 with an empty body, so the MCP
appliance_install tool crashed with 'Expecting value: line 1 column 1'
while the template had actually been created. The route now returns the
created template (201, response_model=schemas.Template), _create_template
propagates it, and the MCP handler parses the body defensively so an
empty reply degrades to a plain success message.
2026-08-25 23:39:38 +08:00
YueGuobin 73e5e27c7b fix: keep default node naming aligned with batch submission order
The controller assigns default names (R-1, R-2, ...) and console ports
in request arrival order. A parallel batch fan-out lets thread scheduling
decide that order, so the first submitted node could end up as R-2.
Batches that rely on default naming (any node without a name) are now
created sequentially; batches with explicit names stay parallel. The
node_create tool description documents the ordering semantics and tells
callers to correlate nodes by node_id.
2026-08-25 22:22:08 +08:00
YueGuobin 636abde16c fix: keep node file content byte-faithful in node_file_get
Splitting the file with keepends=False and rejoining with newlines
dropped the trailing newline of the last line (and every \r of CRLF
files), so returned content was shorter than the file on disk and did
not round-trip. Split with keepends=True and join the selected lines
verbatim; pagination semantics are unchanged.
2026-08-25 21:33:21 +08:00
YueGuobin 57b5baed7f fix: keep submission order and unify status in MCP batch handlers
Batch node/link creation collected results with as_completed, so the
response order followed completion rather than the submitted array and
callers could not correlate entries. Collect in submission order via
pool.map, and report batch deletes as status=success like every other
batch action (the message still says what was deleted).
2026-08-25 21:32:09 +08:00
YueGuobin c9bc635996 fix: propagate 405 when suspending a node without suspend support
Suspending a single VPCS/IOU node returned a fake 204: the controller
route swallowed the compute 405 that the node types honestly raise, so
callers saw success while the node stayed started. Surface the 405
instead. The best-effort swallow on suspend_all is kept (and now covered
by a test) since mixed projects legitimately contain always-running node
types.
2026-08-25 21:29:53 +08:00
YueGuobin 97e7a79117 fix: report empty projects as not locked
GET /projects/{id}/locked returned True for a project with no drawings
or nodes: both loops ran zero times and the fallback return won. Locking
and unlocking such a project always succeeded while the state stayed
"locked", so it could never be unlocked.

Report a project with nothing to lock as not locked, and re-check the
state after unlock in the route tests.
2026-08-25 13:45:36 +08:00
YueGuobin f31bfffefc feat: expose data_link_type on the link_marker MCP tool (create-only)
Per-link markers on serial links need the WAN encapsulation (e.g.
DLT_C_HDLC) so the BPF compiles against the right link layer — the
REST API already accepts it, but the MCP tool never forwarded it.
Create passes it through; update ignores it (changing it would
invalidate the capture file), matching the REST schema semantics.
2026-08-25 13:29:39 +08:00
YueGuobin 9e4edc8a8a chore: disable symbol MCP tools for now
Symbol tools (symbol_list/get/dimensions/defaults/upload/delete) require
a vision-capable model to be genuinely useful — they shuttle SVG
content, which a text-only LLM cannot inspect or produce. The tool
registrations and imports are commented out (handlers stay in
symbols.py); revisit when multimodal support is worked out.
2026-08-25 13:22:59 +08:00
YueGuobin 702fc1f6d9 fix: never allow the projects directory to become a project directory
Loading a .gns3 placed directly in the projects root registered the
shared projects directory as the project path (load_project derives
the path from the file's parent directory). Deleting such an entry ran
rmtree on the projects directory itself, wiping every project until a
root-owned file stopped it, and left a zombie entry in the controller.

Three layers of protection:

- Controller.load_project() refuses a .gns3 whose parent directory is
  the projects directory; the normal subdirectory layout is unaffected
- the Project.path setter rejects the projects directory itself and
  its ancestors, closing the same hole for POST/PUT with an explicit
  path
- Project.delete() uses realpath + commonpath instead of commonprefix:
  entries whose path is the projects root are refused, and sibling
  directories sharing a string prefix (/srv/projects-evil vs
  /srv/projects) are no longer treated as inside the projects dir

Also removes the project_load MCP tool: loading by raw server
filesystem path is a footgun for automated clients; projects can still
be opened by project_id via the remaining tools.
2026-08-25 13:17:37 +08:00
YueGuobin 629bb9194f refactor: sink shared REST handlers into gns3_client, drop gns3fy wrappers
- Slim custom_gns3fy.py to connector-only Gns3Connector and rename to
  connector.py; delete the unused Node/Link/Project dataclasses and
  endpoint wrapper methods (~3000 lines)
- Move the MCP node/link handler implementations into
  gns3_client/api_handlers.py as the shared REST client layer consumed
  by both the MCP service and copilot tools; add available_filters
  handler (exposed as link_available_filters MCP tool) and
  build_gns3_ctx() for copilot callers
- Rewrite the tools_v2 node/link tools on top of the handlers: batch
  lifecycle actions now run in parallel, node creation is a single
  POST, project-wide status reads replace per-node GETs
- Port Project.nodes_inventory/links_summary aggregation into
  project_inventory.py (output shape preserved) and rewrite the
  topology reader / project info tools on it, dropping the unused
  stats/snapshots/drawings calls
- Delete the dead mcp/nodes.py and mcp/links.py (NODE_TOOLS/LINK_TOOLS
  had no consumers; __init__ imports handlers from api_handlers)
- Retarget mcp handler tests to patch api_handlers._get_connector and
  replace test_custom_gns3fy.py with inventory contract tests
2026-08-25 09:15:32 +08:00
Jeremy Grossmann 006102c1af Merge pull request #2860 from yueguobin/feat/project-gns3file-endpoint
api: serve the project .gns3 topology file
2026-08-24 20:07:12 +02:00
YueGuobin 1649fb7b7a api: add endpoint serving the project .gns3 topology file
GET /v3/projects/{project_id}/gns3file returns the raw .gns3 file as
application/json so the WebUI can render topology thumbnails without
opening the project. Adds a public Project.topology_file property.
2026-08-24 22:19:09 +08:00
Jeremy Grossmann 9a0501936c Merge pull request #2859 from yueguobin/feat/config-study
feat: add server settings API (GET/PUT /v3/settings)
2026-08-24 14:53:58 +02:00
Jeremy Grossmann 87e23a6819 Merge branch '3.1' into feat/config-study 2026-08-24 14:36:06 +02:00
YueGuobin 317f4d2406 docs: clarify the default admin credentials only seed the database
The default_admin_username/password descriptions now state that the
values are applied when the controller database is created and only
take effect again after it is re-created (resetting the account).
2026-08-24 01:12:48 +08:00
YueGuobin 4dcde5df59 docs: document settings schema metadata in the settings API doc
Field descriptions, defaults and validation bounds are exposed
via the OpenAPI schema, letting clients render the settings form
without a hand-maintained field table; the annotated config
sample is the human-readable reference.
2026-08-24 00:45:29 +08:00
YueGuobin 27ffc1e7a6 fix: type optional configuration fields as Optional
secrets_dir, certfile and certkey were typed FilePath/DirectoryPath
with a None default, and several str fields (jwt_secret_key,
iourc_path, resources_path, default_nat_interface, vboxmanage_path,
vmrun_path) had the same mismatch. Serializing the unset values
emitted PydanticSerializationUnexpectedValue warnings on every
GET /v3/settings (two lines per request with SSL disabled).
2026-08-24 00:42:48 +08:00
YueGuobin b7dbf45a90 docs: add field descriptions to the settings schemas
Document all 70 configuration fields with pydantic Field
descriptions, ported from the config sample comments and verified
against the actual consumers (allow_remote_console and local had
no documentation anywhere). The descriptions flow into the
OpenAPI schema of GET /v3/settings, giving the Web UI tooltips,
defaults and validation bounds from a single source. Response
models re-declare six path fields as plain strings, which drops
the inherited description — restore them explicitly.

Sync the config sample: document local and allow_remote_console,
drop hardware_virtualization_check which no longer exists in the
schema.
2026-08-24 00:35:26 +08:00
Jeremy Grossmann d7a1bf9b7b Merge pull request #2858 from yueguobin/refactor/mcp-to-agent-dir
Move MCP service to agent package + fix auto_close forwarding
2026-08-23 18:00:11 +02:00
YueGuobin 05fa4ec376 docs: document server settings API and add API test writing skill
Move the server settings roadmap to implemented/ rewritten per
the documentation standard (architecture and PUT flow diagrams,
endpoint table, design notes). Add a skill covering the pytest
conftest fixture model and the shared-client order-dependency
trap hit while writing the settings tests.
2026-08-23 18:54:38 +08:00
YueGuobin e0962a59ed feat: add GET/PUT /v3/settings server settings API
GET returns all settings sections except the deprecated
VirtualBox/VMware ones (Server.Audit privilege); secrets are
masked and Controller.jwt_secret_key is excluded entirely.
PUT applies a partial update (Server.Modify privilege): masked
or empty secrets mean unchanged, null removes the option, the
response carries the new values plus restart_required, and a
settings.updated notification is emitted. New
Server.Audit/Server.Modify privileges are seeded into the
Administrator role at table creation.
2026-08-23 18:54:31 +08:00
YueGuobin 7d3cbf1023 feat: add config read-modify-write update and harden file watcher
Config.update_config() applies submitted options to the main
configuration file via configparser read-modify-write: unknown
options are preserved, null removes an option, the merged view
of all files is validated as ServerConfig before anything is
written (a bad file would kill the FileWatcher polling loop),
and the write is atomic (.tmp + os.replace, mode 0600). Options
whose effective value is owned by a later configuration file
raise ConfigConflictError instead of writing a no-op. The
reload logic is factored into reload_and_notify() and the file
watcher callback is exception-guarded so polling never dies.
2026-08-23 18:54:23 +08:00
YueGuobin d3ceb453a6 fix: forward auto_close in create_project_handler
The MCP project_create tool has passed auto_close=False since 8f8abe410
(2026-06-13), but create_project_handler only forwarded {"name": name}
to the REST API — auto_close was silently dropped and the controller's
Project.__init__ default (True, unchanged since 2016) won. Every project
created via MCP since June has auto_close=true on disk and closes when
the last client disconnects.

- projects.py: forward auto_close when present in params
- test_handlers.py: assert the forwarded json_data (with and without
  auto_close)
- test_tool_params.py: the tool/handler param consistency test never
  actually checked anything — three blind spots now fixed:
  1. dispatch is asyncio.to_thread(_run_handler_sync, ...) whose
     node.func is an Attribute, not a Name — no call ever matched
  2. tools that build 'params' as a variable before passing it were
     skipped; now the initial dict literal is resolved (extra-passed
     direction only)
  3. tool functions are async defs (ast.AsyncFunctionDef) but the
  enclosing-function lookup only matched ast.FunctionDef, so tool_name
  was always None
  Also: map the two marker handlers missing from HANDLER_FILES, skip
  handlers that forward params.items() generically (wildcard), union
  passed keys across multi-branch dispatches (node_create single/batch),
  and drop two dead helpers.

Verified: full suite 1568 passed; reverting the handler fix turns both
test_tool_handler_param_consistency and test_create red.
2026-08-23 08:57:39 +08:00
YueGuobin 641d10177a refactor: move MCP service from api/routes to agent package
MCP is an optional AI feature that already depends on
agent.gns3_copilot (Gns3Connector, nornir/netmiko tools) and whose
MCP_AVAILABLE feature flag lives in gns3server/agent. Moving it there
collocates all AI features under one tree and removes AI code from the
core REST routes.

- git mv gns3server/api/routes/mcp -> gns3server/agent/mcp (no content changes)
- api/server.py, core/tasks.py: update import paths
- tests: tests/api/routes/mcp -> tests/agent/mcp, rewrite patch BASE and
  handler imports; fix MCP_DIR depth in test_tool_params.py
- agent/__init__.py: probe the SDK via importlib.import_module so the
  top-level name "mcp" is not bound in the agent namespace (it would
  shadow the new gns3server.agent.mcp subpackage and break
  'from gns3server.agent import mcp')
- docs: update source file paths

Verified: full suite 1567 passed; 82 MCP tools registered, SSE mounted
at /v3/mcp/transport.
2026-08-22 19:32:13 +08:00
Jeremy Grossmann 770c898ec1 Merge pull request #2857 from yueguobin/feat/skills-device-topics
feat: appliance v8 install, copilot device integration, console terminal size and misc fixes
2026-08-21 20:53:28 +02:00
YueGuobin e98c51889e fix: notification ping starved under sustained event load
NotificationQueue.get only generated a synthetic ping when the queue
was idle for the full timeout. Under sustained event load (e.g. a
project with markers matching at 15-260 events/s) the queue never
idled, so compute notification streams never carried a ping and the
controller stopped emitting compute.updated: clients lost compute
statistics until the event flow paused or the server restarted.

A ping is now guaranteed at least every timeout seconds regardless of
event flow: when the ping deadline is reached the next get() returns a
ping ahead of queued events (pings only carry statistics, so skipping
ahead of real events is harmless). Both the compute stream (compute
CPU/memory/disk stats -> compute.updated) and the controller stream
(idle keepalive) benefit.
2026-08-22 00:50:49 +08:00
YueGuobin c709d74826 fix: compute notification stream silently died on uncaught exceptions
Two exception paths could permanently kill the compute notification
chain (no more compute.updated events, no reconnection until a server
restart):

- connect() only caught ComputeError, but _run_http_query translates
  HTTP status errors (401/403/404/...) into sibling ControllerError
  subclasses (and a raw fastapi HTTPException for unexpected statuses).
  Those escaped the fire-and-forget connect() task started at controller
  startup and died silently. Now they notify clients, schedule an
  exponential-backoff retry, and still re-raise for explicit callers.
  The dead web.HTTP* except branches (never reached since
  _run_http_query converts HTTP errors itself) are removed.

- _connect_notification() only caught aiohttp.ClientError. A malformed
  frame (e.g. missing 'action') or any error raised while dispatching a
  compute event (e.g. a pydantic ValidationError in
  node.parse_node_response) escaped the task, skipped the reconnect
  scheduling placed after the try block, and killed the stream forever.
  Now any exception is logged with its traceback (the gather() future
  holding it was never retrieved, so nothing was ever printed) and the
  reconnect scheduling + final compute.updated emit live in the finally
  block so every exit path recovers.

Also moves the usage-stats reset before the disconnect log line so the
emitted compute.updated snapshot is consistent.
2026-08-22 00:36:24 +08:00
YueGuobin 89d7f866cb docker: replace vendor SKIP_INIT exec volume bridge with create-time direct binds
The SKIP_INIT volume bridge replicated init.sh's seed + mount --bind script
via docker exec *after* the container started. That copied the mechanism but
not the invariant that makes init.sh safe — the entrypoint position, which
guarantees the volume is in place before the application runs. The exec runs
concurrently with the NOS boot, so whether the NOS loaded its persisted
config or the overlay's factory copy was a timing race:

- single node stop/start on an idle system won it (exec ~1s, SR Linux reads
  its startup config at ~2-4s) — the save/stop/start round-trip passed;
- a server restart + project reload lost it (concurrent node starts queue on
  the Docker API, delaying the exec by seconds) — SR Linux booted factory
  while the persisted config.json sat intact on the host;
- XRd was immune (systemd boots tens of seconds before XR touches
  /xr-storage), which is why the race was never observed on it.

Replace the bridge entirely:

- new DockerVM._prepare_volumes hook (no-op in the base class) runs in
  create() after the image is present, before the container is created;
  VendorDockerVM overrides it to seed each volume's host directory from the
  image (throwaway docker create container + docker cp -a, nothing
  executes). The .gns3_perms marker gates the seeding: a volume that ever
  started is never re-seeded, so saved configuration is never overwritten
  with factory content (also the upgrade path for existing nodes).
- VendorDockerVM._mount_binds now binds the volumes directly at their real
  in-container paths (/etc/opt/srlinux) instead of /gns3volumes aliases, so
  the persisted config is visible to the NOS from the very first process.
- _setup_skip_init_volumes and its start() call are gone; the container-side
  _fix_permissions targets the volume paths directly (the direct binds
  exist for the whole container lifetime, unlike the old bridge).

The volume-list computation (validation + overlap de-duplication) moves
into DockerVM._persistent_volume_list so create-time seeding and _mount_binds
cannot drift apart.
2026-08-22 00:09:13 +08:00
YueGuobin 6aeb5dbda5 feat(copilot): device skills per-topic split layout and topic retrieval
SkillsLoader.load_device_skills() now supports two device layouts: the
existing single file and a split directory (device/<device>/_base.yaml +
one YAML per protocol topic). Topic files are merged into the device
skill under 'topics', keyed by their 'topic' field; mismatched
device_type, missing _base.yaml and duplicate topics are handled with
explicit log-and-skip.

get_skill() and DeviceSkillsTool gain a 'topic' parameter following the
injection list -> index -> issue pattern. Topic bodies are never
returned without an explicit topic request - index/summary/full all
serve a topic index instead - so growing a device with new protocol
topics no longer grows the token cost of device-level lookups.

Also fix reload_skills() to actually drop injection skills that fail
validate_skill_format() instead of logging 'skipping' and merging them
anyway.
2026-08-21 21:41:51 +08:00
YueGuobin 8d8b2c9692 docs: terminal geometry, WS size forwarding, GNS3_CONSOLE_RESIZE
docker-exec-console.md gains a "Terminal geometry and size forwarding"
section: the WS binary control-frame protocol ({"cols","rows"} -> NAWS /
asyncssh resize), the tall 511x10000 default and when it is applied or
restored, the exec-creation race handling, the GNS3_CONSOLE_RESIZE=0
knob for paging CLIs, and the SR Linux flicker root cause with the
measured numbers (rows-driven ~2.4x output inflation on CPR-answering
clients; width-independent; sr_cli's scroll-append re-rendering is
inherent and identical outside GNS3).

vendor-nos-xrd.md: the appliance recipe now includes
GNS3_CONSOLE_RESIZE=0 with the rationale (shared exec + XR pager vs
browser resizes). New troubleshooting entry for the flicker symptom.
2026-08-21 21:41:51 +08:00
YueGuobin 65e8eb9e28 docker: don't lose a client size that races the exec creation
A browser's terminal-size control frame (NAWS through the console telnet
server) can arrive while client_connected_hook is still creating the
exec; the resize is a no-op then, and the tall default applied after
creation would overwrite it, leaving the session at 511x10000 until the
user resizes.

Record sizes received before the exec exists and prefer them over the
tall default once creation finishes. The recorded size is cleared when
the last client disconnects, together with the restore-to-default.
2026-08-21 21:41:51 +08:00
YueGuobin 5741e85b65 docker: add GNS3_CONSOLE_RESIZE knob for paging CLIs
The exec behind a docker_exec console is shared by every console client,
so a browser's terminal-size resize (WS control frames -> NAWS) also
changes the geometry concurrent netmiko sessions see. SR Linux doesn't
care (no pager, no hard wrapping), but CLIs that page on the PTY window
size (IOS-XR) would park at --More-- again the moment a browser is
connected.

Split the client-driven NAWS path (_on_naws) from the internal resize
(_resize_exec): GNS3_CONSOLE_RESIZE=0 makes the console ignore client
resizes entirely and keep the tall 511x10000 no-paging default, while
the creation-time default and the restore-on-last-disconnect still go
through the internal path. XRd appliance templates should set it.
2026-08-21 21:41:51 +08:00
YueGuobin abd0b8e274 console: forward client terminal size over the console WebSocket
The docker_exec console defaults its exec PTY to 511x10000 (the no-NAWS
default that keeps the IOS-XR pager quiet for netmiko). A CPR-answering
client (xterm.js) on top of that tall canvas makes prompt_toolkit-based
CLIs (SR Linux sr_cli) re-emit their accumulated output on every
incremental render: ~145 KB instead of ~60 KB per command, visible in
the WebUI as full-screen clear/redraw flicker.

Let WebSocket console clients propagate their real terminal geometry:
binary frames {"cols": N, "rows": M} alongside text frames carrying
terminal data. The controller forwards binary frames (previously only
text was forwarded), and the compute side turns them into a NAWS
subnegotiation for telnet-based consoles (docker_exec included) or an
asyncssh pty size change for SSH consoles.

The docker_exec console restores the tall 511x10000 default when its
last client disconnects, so a later non-NAWS client (netmiko, bare
telnet) connecting to the still-live exec doesn't inherit a browser
geometry and hit PTY-window paging again.
2026-08-21 21:41:51 +08:00
YueGuobin 5188ae625a tests: pick a free console port instead of hardcoding 5011
A dev machine running a real gns3server (or qemu) can already listen on
5011; reserve_tcp_port then silently replaces it with the next free port
and test_console fails on the exact-echo assertion. Pick a port that is
actually free on the host first, like test_change_console_port does.
2026-08-21 21:41:51 +08:00
YueGuobin 72dc10a669 controller: allow markers and packet filters on Ethernet switch links
The brctl Ethernet switch runs a per-port uBridge relay, so it can host
the mark filter and packet filters like any uBridge-backed node. Add
ethernet_switch to _MARKER_CAPABLE_TYPES and _get_filter_node, narrow the
UDPLink.update() NIO-PUT skip down to the Dynamips-hosted ethernet_hub,
and expose the matching compute endpoints: PUT nio (filter/marker
reapply) plus the per-marker toggle/pause/resume/delete/rebuild routes.

The ethernet_hub keeps its exclusion: its routes still wire into the
Dynamips hub, which has no uBridge of its own.
2026-08-21 21:41:51 +08:00
YueGuobin 210103058f docker: don't recreate containers on empty-string property PUTs
Web clients serialize empty form fields as "" while unset values are
stored as None on the node. The bare != diff in the update handler then
sees a phantom change on every full PUT and recreates the container for
nothing -- even when the user only changed a controller-only field such
as netmiko_device_type.

Normalize at the schema boundary ("" -> None for start_command,
environment and extra_hosts; "" -> "/" for console_http_path), make
the setters apply the same canonicalization, and create nodes through
the setters instead of bypassing them in __init__ so both paths store
identical values.
2026-08-21 21:41:47 +08:00
YueGuobin c3145a9f65 mcp: don't run API keys through JWT validation
_resolve_token tried the JWT path before checking for the gns3_ prefix,
so every API-key connection logged a spurious "JWT rejected" ERROR from
get_token_data. Check the prefix first, and downgrade the JWT-rejected
log to WARNING — a rejected token is a client problem, not a server one.
2026-08-21 21:41:47 +08:00
YueGuobin 200ccf0dfe mcp: fingerprint short-lived console tokens for copy-corruption checks
node_console_info now returns token_sha256_prefix (sha256, first 8 hex
chars) and token_ttl_seconds alongside the console WebSocket URL, and
controller WebSocket auth rejections include the sha256 prefix of the
token as received. Comparing the two immediately distinguishes a token
corrupted in transfer from server-side rejection causes (expired,
revoked, bad signature).
2026-08-21 21:41:47 +08:00
YueGuobin 704b5d80c2 auth: split JWT validation errors by failure cause
get_token_data used to raise the same "Could not validate credentials"
for every JWT-level failure (bad signature, expired, malformed), which
made console WebSocket auth failures impossible to tell apart. Return a
distinct detail per cause and log the underlying exception plus the
unverified header alg value on rejection.
2026-08-21 21:41:47 +08:00
YueGuobin fd7594f62e docker: give the docker_exec console a tall default PTY geometry
The docker_exec console resized its exec PTY to 80x24 until a client
sent NAWS. CLIs that page on the PTY window size instead of the
terminal length (the IOS-XR pager) therefore parked long output at
--More-- for clients that never negotiate NAWS — netmiko, bare telnet —
making copilot device commands time out on XRd.

Default the exec to 511x10000 instead (511 matches netmiko's own
'terminal width 511' convention): no paging and no hard wrapping for
non-NAWS clients, while real NAWS clients keep resizing to their actual
geometry as before.

Also updates the project memory record with the confirmed root cause
and the fix.
2026-08-21 21:41:46 +08:00
YueGuobin 2b81160570 docs: record the XRd console --More-- pager bug in project memory
Root cause (confirmed live): the XRd console reaches the container CLI
via docker exec, and the XR pager reads the exec PTY's 24-row window
(TIOCGWINSZ) instead of the CLI-level terminal length — so
'terminal length 0' shows in 'show terminal' yet long-output commands
page after exactly 24 lines and park at --More--, making netmiko time
out. '| no-more' does not exist on IOS-XR.

Also documents the agreed copilot-side fix design (tail-anchored
--More-- detection with quiet double-confirmation, reconnect before
retry, session_log), for the upcoming feat/copilot-xrd-more-handling
branch.
2026-08-21 21:41:42 +08:00
YueGuobin 19f20e8d75 copilot: log into devices using the node default credentials
The vendored gns3fy Node model dropped default_username/default_password
from the API response, and the nornir groups hardcoded empty
credentials, so drivers that require authentication (gns3_ruijie_telnet,
stock netmiko SSH/telnet) could not log in.

Carry the per-node credentials through nodes_inventory() into the
nornir hosts data at host level, where they override the group's empty
fallback. Missing or cleared ("") values keep inheriting from the
group, so no-auth drivers are unaffected.
2026-08-21 21:41:42 +08:00
YueGuobin 38742ad4b6 tests: sign class-scoped client tokens with the default JWT secret
Since aef337e86 the config loader generates a random JWT secret even
without a main config file, so the class-scoped client/authorized_client
fixtures signed their tokens with a key that the autouse
run_around_tests fixture would immediately replace with the default
one for every test function. Every controller API test using those
fixtures was failing with 401 (BadSignature).

Sign both fixtures explicitly with DEFAULT_JWT_SECRET_KEY to match
the secret enforced at request time.
2026-08-21 21:41:42 +08:00
YueGuobin 7e8c515a3c api: expose installed netmiko device types for the web UI
New GET /v3/netmiko/device_types endpoint returns the device types
supported by the netmiko library installed on the server, including
the gns3-copilot custom drivers, so the web UI can populate the
netmiko_device_type dropdown on templates and nodes.

The list is read at runtime from netmiko's ssh_dispatcher.CLASS_MAPPER
registry (the same table ConnectHandler dispatches on), filtered to
drop the '_ssh' aliases and the 'autodetect' pseudo type, and cached
for the process lifetime. Returns 501 when netmiko is not installed
(ai-features extra).
2026-08-21 21:41:42 +08:00
YueGuobin 92d4e3d378 nodes: per-node default credentials seeded from the template
Add default_username/default_password as controller-only node properties
(the netmiko_device_type pattern): they are not sent to the compute,
persist with the project topology and can be updated or cleared per
node. Creating a node from a template seeds them from the template
appliance metadata, and the metadata itself is dropped there so it
never leaks into the node properties.
2026-08-21 21:41:42 +08:00
YueGuobin 300c53e6fb templates: persist appliance metadata on install
Appliance fields that describe the appliance (vendor information, default
credentials, installation instructions...) were dropped when installing a
template. Keep them in a new appliance_metadata JSON column on the
templates table, filled by the appliance-to-template conversion for both
registry v1-6 and v8 (version level values override the appliance level
ones). The nested schema allows extra fields so future registry fields
persist without a migration.
2026-08-21 21:41:42 +08:00
YueGuobin 1c68a52856 fix: address appliance v8 install review findings
- install: resolve the image directory from the version's settings type and
  skip image handling for docker appliances; guard appliance.images
- appliance schema: validate template_properties against template_type,
  align cpu_throttling with the qemu template, add kvm and version idlepc
- conversion: map IOU image to path, kvm disable to accel=tcg, inherit only
  same-type default settings, symbol fallback from the effective category,
  template_properties cannot override structural fields
- allow clearing netmiko_device_type with an empty string
- download the template symbol regardless of the level it is defined at and
  give qemu guests a default symbol
2026-08-21 21:41:42 +08:00
YueGuobin 435aa4c257 copilot: prefer netmiko_device_type over the device_type:<type> tag
The vendored gns3fy Node model and its nodes_inventory() now carry the
node's netmiko_device_type field, and get_device_ports_from_topology()
resolves the Netmiko device type from it first, falling back to the
device_type:<type> tag. Nodes created from a template inherit the value
from the template automatically, so automation tooling gets the correct
Netmiko driver without tags.
2026-08-21 21:41:35 +08:00
YueGuobin f524e9a713 appliance: seed netmiko_device_type from the appliance file
Both the v1-6 and v8 appliance models accept an optional top-level
netmiko_device_type, and ApplianceToTemplate copies it into the created
template so installed appliances carry the automation hint end to end.
2026-08-21 21:41:35 +08:00
YueGuobin d64f47afa4 nodes: per-node netmiko_device_type (controller-only)
netmiko_device_type follows the CONTROLLER_ONLY_PROPERTIES pattern
(like console_auto_start): a node created from a template inherits the
template value, PUT /nodes can override it inside a topology, updates
never round-trip to the compute, and the value persists in the project
topology file.
2026-08-21 21:41:35 +08:00
YueGuobin 9260108f53 templates: add netmiko_device_type for automation tools
Common template field (schema + templates table column + Alembic
migration) holding the Netmiko device type (e.g. 'cisco_xr', 'nokia_srl')
so Netmiko/Nornir based tooling can look up how to reach a node's CLI
without hard-coded vendor mappings. Free-form lowercase string on
purpose: Netmiko's platform list evolves independently of GNS3.
2026-08-21 21:41:35 +08:00
YueGuobin 254721dbda appliance: close the v8 gaps for Docker vendor appliances
DockerPropertiesV8 now accepts custom_adapters (already available to
v1-6 top-level appliances and to Qemu v8 properties), so port-named
Docker appliances (XRd, SR Linux) can move to the v8 format without
losing their interface naming.

Appliance.type resolves the node type from the v8 settings template_type
(default set first) instead of misclassifying every v8 appliance as
qemu, and _get_default_symbol applies the docker guest symbol to v8
Docker guest appliances.
2026-08-21 21:41:35 +08:00
YueGuobin 57fe549773 appliance: implement install support for registry version 8
new_template() now converts the v8 settings[] format per the spec in
gns3-registry#734: settings selection (version name reference, then the
default set, then a single set), inherit_default_properties merging, and
template_properties expansion with category/usage/symbol resolved from
template_properties > version > appliance levels. Undefined properties
are left out so controller template defaults apply.

Registry versions 1-6 keep the existing top-level emulator block path.
2026-08-21 21:41:35 +08:00
grossmj 582412bac3 Release v3.1.0a5 2026-08-19 18:06:12 +02:00
grossmj 51c6440403 Bundle web-ui v3.1.0a5 2026-08-19 17:57:42 +02:00
grossmj 08d7ba6bd0 chore: upgrade dependencies 2026-08-19 17:44:38 +02:00
grossmj 52de01523f Merge branch '2.2' into 3.1
# Conflicts:
#	gns3server/compute/builtin/nodes/cloud.py
#	gns3server/utils/interfaces.py
2026-08-18 18:05:56 +02:00
grossmj 9db55cafec Merge branch 'master' into 2.2 2026-08-18 18:03:56 +02:00
grossmj c85551ec09 Sync appliances 2026-08-18 18:02:53 +02:00
Jeremy Grossmann a3e85b7041 Merge pull request #2853 from hjicks/master
add support basic support for OpenBSD.
2026-08-18 18:01:15 +02:00
Jeremy Grossmann 80a69814b3 Merge pull request #2854 from yueguobin/code-review-fixes
docker: vendor NOS containers (XRd, SR Linux) as first-class nodes; UDP port race fix
2026-08-15 18:24:13 +02:00
YueGuobin f43a717b20 copilot: sync CONSOLE_TYPES with the server ConsoleType enum
The vendored gns3fy copy keeps its type lists as literals (the module is
shared with the standalone MCP service and cannot import server enums),
and CONSOLE_TYPES had drifted: 'ssh' and 'docker_exec' were missing while
both are valid server-side. Impact: the copilot topology reader validates
the whole node list in one pydantic pass, so a single vendor NOS node
(console_type 'docker_exec') made it drop the entire project and return
zero devices to every copilot device tool.

Add the missing values plus drift tests asserting the vendored lists
cover the server enums (skipped when ai-features extras are absent).
2026-08-15 23:32:24 +08:00
Guobin Yue 74a51a1f9f Merge branch '3.1' into code-review-fixes 2026-08-15 22:39:42 +08:00
Jeremy Grossmann 74191e7a8c Merge pull request #2855 from cristian-ciobanu/3.1
feat: Enhance information displayed on the system status dashboard
2026-08-14 23:33:47 +02:00
Cristi a35df76384 feat: Enhance information displayed on the system status dashboard 2026-08-14 23:36:03 +03:00
YueGuobin 110e041e56 docker: cap GNS3_STOP_TIMEOUT at 210 s (controller stop budget)
The 600 s clamp was unreachable in practice: the controller's stop
request times out at 240 s (controller/node.py) and the Docker stop
query gets the value +30 s as its HTTP timeout, so anything above 210
would abort upstream first and surface an error while the stop keeps
running server-side. Cap at the derived ceiling and document the chain
in the clamp and the docstring.
2026-08-15 01:25:50 +08:00
YueGuobin 9604c85fda docker: harden the shm/devices/extra_configs/masking work (code review)
Nine fixes from a review of the docker-shm-devices diff:

* GNS3_STOP_TIMEOUT >300 s aborted at the manager's default HTTP timeout
  before Docker finished the stop — the stop query now gets a timeout
  with a margin over the grace period.
* Overlapping bind targets (GNS3_MASK_UDEV + GNS3_MASK_SYSTEMD on the
  same unit, a unit named twice, an extra_configs target equal to a
  masked unit) made Docker reject the create with 'Duplicate mount
  point' — Mounts are deduplicated by target.
* ExtraConfig.target now carries a pydantic validator (absolute file
  path, no '..'), so bad targets 422 at template-save time instead of
  failing at node-create time after a multi-GB image pull; directory
  forms ('/', '/etc/') are also rejected by the runtime guard instead
  of raising IsADirectoryError (raw 500).
* _check_host_readiness skipped every remaining check when one
  /proc/sys key was unreadable (mid-loop return) — now continues.
* The base-class GNS3_* env parser strips trailing commas like the
  vendor parser, so 'GNS3_MASK_UDEV=1,' composed from a list still
  activates.
* Vendor env knobs are re-parsed on every create(), so a PUT to the
  node's environment takes effect on the next (re)create.
* The graceful SIGTERM stop is now limited to the explicit user stop
  route; delete/update/close/crash-cleanup keep the immediate kill
  (those paths force-delete or recreate the container right after).
* An extra_configs target beneath a persisted volume is shadowed by the
  volume bind — warn at create time.
2026-08-15 00:52:55 +08:00
YueGuobin 1124d7a539 docs: XRd appliance tunes GNS3_STOP_TIMEOUT to 40 s; note version-agnostic template image 2026-08-15 00:09:53 +08:00
YueGuobin 62076c1727 docker: make the vendor graceful-stop grace period configurable (GNS3_STOP_TIMEOUT)
The 60 s SIGTERM grace was hardcoded, unlike every other vendor knob
(GNS3_SHM_SIZE, GNS3_DEVICES, GNS3_MASK_UDEV, ...) which rides the
environment line. Parse GNS3_STOP_TIMEOUT=<seconds> (default 60,
clamped to 1-600, invalid values keep the default) and use it in
VendorDockerVM._terminate_container().
2026-08-14 22:11:34 +08:00
YueGuobin e9339faaa7 docker: graceful stop for vendor NOS containers (SIGTERM + 60s grace)
DockerVM.stop() terminated containers with an immediate SIGKILL — fine
for init.sh-based containers whose state is persisted beforehand, but a
systemd NOS (Cisco XRd, SR Linux) needs a graceful shutdown and treats
the abrupt kill as an unclean shutdown (exit 137 on every stop).

Extract the final termination into _terminate_container() and override
it in VendorDockerVM: POST /containers/{id}/stop?t=60 sends SIGTERM and
waits for systemd to stop services; Docker itself SIGKILLs the
container once the grace period expires, so no fallback is needed.
Docker's 304 (already stopped) is swallowed.
2026-08-14 22:02:58 +08:00
YueGuobin 350f2b24e7 fix: UDP port allocation race causing link self-loop (one-way links)
PortManager.get_free_udp_port had an unguarded find-then-add sequence.
A link allocates both ends concurrently (asyncio.gather in
UDPLink._prepare -> two POST /ports/udp) and FastAPI runs the sync
route handler in a threadpool, so both threads could probe the same
'free' port before either recorded it — handing lport == rport to both
ends. uBridge sets SO_REUSEADDR on UDP NIO sockets, so the double bind
succeeds silently and the kernel delivers everything to the last-bound
socket: one node starves, the other echoes to itself.

Make every TCP/UDP allocate/reserve/release path atomic with an RLock,
and rebuild _link_data in UDPLink._prepare so reset() commits the fresh
port pair instead of re-sending the stale, already-released one.

Regression tests: threaded barrier allocation never returns duplicates
(red on the old code, UDP and TCP); reset() leaves exactly one mirrored
NIO pair per side with lport != rport (red on the old code).
2026-08-14 21:31:58 +08:00
YueGuobin 1cddeb8c3f docs: record the link UDP self-loop bug; mark XRd datapath validated
Add bugs/link-udp-self-loop.md: the intermittent one-way docker link
observed during XRd validation (one end's nio_udp rport pointing at its
own lport after a uBridge restart), with the evidence table, the uBridge
console capture diagnostics, the delete/recreate workaround, and the
narrowed suspects (batch port preallocation / link re-creation race).
Also note that a docker node's in-container ethN is a TAP device held by
uBridge (no veth host end exists).

Update the XRd feature doc: datapath validated end-to-end (XRd brings
its own interfaces up, ARP/ICMP bidirectional), add a troubleshooting
row pointing at the bug doc. Index the bug in docs/README.md.
2026-08-14 19:50:58 +08:00
YueGuobin 0f12786885 docs: document the XRd control-plane adaptation
New feature doc covering why XRd takes the vendor docker_exec/SKIP_INIT
path (init.sh wrapper crashes its glibc loader), the four generic
mechanisms added for it (GNS3_SHM_SIZE/GNS3_DEVICES HostConfig injection,
extra_configs file injection, GNS3_MASK_UDEV + udevadm null-binding,
host-readiness check), the three host-disturbance root causes isolated by
plain docker-run A/B/C testing, the appliance recipe with XRd-specific
gotchas (Mg0/RP0/CPU0/0, /xr-storage-shadow persistence, first-boot
semantics), and troubleshooting. Indexed in docs/README.md alongside the
docker-exec-console base doc.
2026-08-14 19:14:59 +08:00
YueGuobin e8b51aa12c docker: also null-bind udevadm in GNS3_MASK_UDEV
Masking the udev systemd units stopped the daemon's coldplug (host audio
resets), but host USB devices still reconnected on every XRd start. A/B
testing with plain `docker run` isolated the trigger: XRd's own
xr_startup.sh calls udevadm directly (USB license-dongle probing, e.g.
`udevadm trigger --action=add --parent-match=<usb device>`), which
synthesizes uevents into the host kernel from the privileged container --
no udevd required.

GNS3_MASK_UDEV=1 now also binds /dev/null over the udevadm binary
(/bin, /sbin, /usr/bin). Verified with a plain-run experiment: with the
bind, host udev monitor shows zero usb/input/hid/sound events during XRd
boot (only normal docker veth traffic), and XRd itself boots to running
state -- it does not need udevadm under GNS3 (interfaces are pre-created
veths).
2026-08-14 19:09:48 +08:00
chara 80da7da515 add support basic support for OpenBSD.
there remains some work on ubridge, but this seems to work so far.
2026-08-13 22:24:58 +03:30
YueGuobin b928a2f48a docker: use the container's chown (not busybox) in vendor volume/perms path
The vendor skip-init path (_setup_skip_init_volumes, _fix_permissions) runs
`/gns3/bin/busybox chown` inside the container via docker exec. busybox is
statically linked, and its chown dlopens NSS modules (libnss_*) from the
container; on NOS images whose glibc differs from the host's (e.g. Cisco
XRd) that mismatches and aborts with the glibc assertion
`_dl_call_libc_early_init: sym != NULL` (SIGABRT). The per-file chown loop
then crash-loops, and the resulting core-dump storm -- processed by the
host's systemd-coredump -- cascades into host device rescans, reconnecting
USB / resetting audio / corrupting the journal on every XRd start.

cp/chmod/find/stat don't touch NSS and work fine on busybox, so only chown
is affected. Prefer the container's own coreutils chown
(`command -v chown && chown ...`), falling back to busybox chown only when
the container ships no chown (minimal images, where the glibc matches and
busybox is safe).
2026-08-14 01:27:18 +08:00
YueGuobin 347537f1b3 docker: mask systemd-udevd in privileged containers (GNS3_MASK_UDEV)
A privileged systemd-based NOS container (Cisco XRd boots /usr/sbin/init)
runs systemd-udevd, which on startup coldplugs every device it can reach.
In privileged mode that includes the HOST's USB/input/audio/disk devices,
so every XRd start reconnects USB, mutes audio, and disrupts the host
journal -- highly disruptive on Linux desktops (caught in the act: the
container's udevd was even rescanning the host BTRFS root device).

XRd doesn't need udev (its interfaces are pre-created by GNS3 veth and
mapped via XR_INTERFACES). Add two opt-in env vars, consumed host-side at
container create time in the inherited DockerVM.create (so VendorDockerVM
nodes get it too):

  GNS3_MASK_UDEV=1        -> bind /dev/null over the udevd unit, its two
                             activation sockets, and the coldplug/settle
                             trigger services
  GNS3_MASK_SYSTEMD=u1,u2 -> bind /dev/null over arbitrary units in
                             /etc/systemd/system/ (comma/semicolon list)

Only injected when set, so ordinary nodes are unaffected.
2026-08-14 01:12:21 +08:00
YueGuobin 088f1da77a docker: persist extra_configs in the template DB table
The extra_configs schema field needs a column on the docker_templates table
to actually round-trip through the controller DB (the schema alone is
accepted but dropped by the SQLAlchemy model mapping). Add the JSON column
and an Alembic migration so existing databases get it on upgrade.
2026-08-14 00:20:08 +08:00
YueGuobin 08e37a4509 docker: inject config files into containers via extra_configs
Add an `extra_configs` field (list of {target, content}) to the docker
node/template/appliance schemas. For each entry GNS3 writes `content` to a
file in the node working directory and bind-mounts it read-only at `target`
inside the container.

This lets a NOS appliance seed its startup config without rebuilding the
image: XRd points XR_FIRST_BOOT_CONFIG at an injected /firstboot.cfg, FRR at
/etc/frr/frr.conf, etc. The bind is a single-file mount applied at create
time, so it works for both the generic init.sh path and vendor nodes that
skip init.sh (console_type=docker_exec). Entries are only injected when
present, so ordinary nodes are unaffected.

The content can't go through `environment` (it is line-delimited, one var per
line), hence a dedicated field -- the same plumbing shape as extra_volumes.
2026-08-13 23:33:34 +08:00
YueGuobin 2bee34031c docker: warn about low inotify/file-max and missing FUSE at connect
Add a read-only _check_host_readiness() that runs once after the Docker
daemon connection is established. It reads /proc/sys inotify/file-max
limits and /proc/filesystems (for FUSE), and logs a warning with the exact
commands to fix when they are too low for heavy containers -- XRd wants
~4000 inotify instances per node against a stock default of 128.

The server runs unprivileged (only the setuid ubridge helper has root), so
it can only check, not set; the warning tells the admin exactly what to
raise once. Stays silent when the limits are already sufficient.
2026-08-13 22:39:48 +08:00
YueGuobin 86d30f34b4 docker: inject /dev/shm size and host devices via HostConfig from env
Heavy NOS containers (e.g. Cisco XRd) need /dev/shm larger than Docker's
64 MB default and host device nodes such as /dev/fuse. Add two opt-in
environment variables, consumed host-side and applied as native Docker
HostConfig keys at create time:

  GNS3_SHM_SIZE (MB)  -> HostConfig.ShmSize (bytes)
  GNS3_DEVICES        -> HostConfig.Devices in `docker run --device` syntax
                         (host[:container[:perm]]; Docker resolves major/minor
                         from the host node itself)

Native HostConfig (rather than remount/mknod inside init.sh) is used so this
works for vendor NOS nodes that skip init.sh (console_type=docker_exec) --
the path XRd must take, since GNS3's init.sh wrapper crashes XRd's glibc
loader. It applies whether or not init.sh runs, needs no schema/API/UI
change (reuses the `environment` field), and only takes effect when the vars
are set, so ordinary nodes keep default Docker behaviour.

GNS3_-prefixed user env vars stay dropped from the container environment
(only consumed here host-side), keeping GNS3-injected vars safe.
2026-08-13 22:39:48 +08:00
Jeremy Grossmann f65d9b17c6 Merge pull request #2851 from yueguobin/fix/docker-node-create-setattr-noise
fix: suppress redundant console port setter log during Docker node create
2026-08-12 23:02:49 +02:00
Jeremy Grossmann c588652768 Merge pull request #2852 from yueguobin/docker-srlinux-support
Support vendor NOS Docker containers: docker_exec console + SR Linux integration
2026-08-12 22:49:05 +02:00
YueGuobin 64657918b5 docs: appliance packaging section + symbol theme caveat
Document the SR Linux gns3a (35-adapter full chassis, matching
GNS3_INTERFACE_NAMES + custom_adapters), the three server-side schema fixes
needed for it to load (DockerConsoleType.docker_exec,
ApplianceV1_6.custom_adapters, extra_volumes docker-block passthrough), and
the symbol-theme behaviour that rewrites any :/symbols/-prefixed symbol to
the category default at load time (so router_cloud.svg cannot be used from
an appliance; use a custom symbol under symbols_path instead).
2026-08-13 02:05:17 +08:00
YueGuobin 9e830f7883 appliance: expose custom_adapters on the v1-6 appliance model
The top-level ApplianceV1_6 model declared first_port_name /
port_name_format / port_segment_size but not custom_adapters, so the
GET /appliances endpoint (response_model=schemas.Appliance) stripped
custom_adapters from the response — the frontend never saw per-adapter
port names even though the appliance file and the server-side template
conversion (appliance_to_template reads it from the raw dict) handled it.

Add custom_adapters: Optional[List[CustomAdapterItem]] to ApplianceV1_6
so the field round-trips through the API. (ApplianceV8 already models it
inside its TemplateSetting.)
2026-08-13 02:05:17 +08:00
YueGuobin 141b3d8701 appliance: accept docker_exec console type in Docker appliances
The Docker appliance Pydantic model (DockerConsoleType) rejected
console_type='docker_exec', so an appliance file using the vendor NOS
docker_exec console could not be loaded (validation error at import).
Add docker_exec to the enum — it is already a valid ConsoleType
(schemas/common.py) and is handled by VendorDockerVM.
2026-08-13 02:05:17 +08:00
YueGuobin 8889cea38b fix: recreate docker_exec console on reconnect after CLI exit
The reconnect-blank-screen bug: when sr_cli exited (quit / idle timeout /
crash) the while-true wrapper restarted it mid-session with no client
attached, so its startup CPR probe (\e[6n) went unanswered and the TUI
degraded/blocked. On reconnect lazy_started=True skipped recreation, so the
client saw a blank screen.

Fix: drop the while-true wrapper. Now when the CLI exits, the exec pty
closes (EOF), the broadcast task ends, and the next client connection
detects the dead upstream via _upstream_alive() and recreates the exec —
with a terminal attached, so CPR is answered. A live exec is reused
(just a Ctrl-L redraw).

_LazyExecTelnetServer is extracted from a closure to module level so the
reconnect/recreate logic is unit-testable. Add 9 tests covering
_upstream_alive states and the recreate-on-death / reuse-if-live /
close-half-dead-writer / no-while-true behaviors.

Full Docker suite (120) passes.
2026-08-13 02:05:17 +08:00
YueGuobin 1e154ac85f test: add tests for VendorDockerVM and the docker_exec factory
25 tests covering:
- Docker.create_node factory: selects VendorDockerVM iff console_type ==
  docker_exec, DockerVM otherwise (including telnet/ssh/vnc/http/none/spice)
- GNS3_* env parsing: SKIP_INIT, INTERFACE_NAMES, CONSOLE_CMD (single and
  multiline), defaults
- create(): init.sh skipped under GNS3_SKIP_INIT, prepended otherwise;
  GNS3_MAX_ETHERNET follows the interface rename; /etc/network mount dropped
  under SKIP_INIT (and host skeleton dir removed) but kept without it
- _add_ubridge_connection: move_to_ns targets the renamed interface
  (mgmt0) or falls back to eth{N}
- start(): docker_exec console dispatch + SKIP_INIT volume bridge + permission
  fix; without SKIP_INIT the vendor passes are skipped
- _fix_permissions: skips dead/missing containers (no restart), targets
  /gns3volumes bind-mount paths
- _setup_skip_init_volumes: runs the docker exec bridge script
- _cleanup_console_resources: closes the exec pty writer

Full Docker suite (111) and compute suite (395) pass — the four hook
extractions in DockerVM introduce no regressions.
2026-08-13 02:05:17 +08:00
YueGuobin f5554d816a vendor: drop the hardcoded /etc/network mount for SKIP_INIT containers
Override _mount_binds in VendorDockerVM: for GNS3_SKIP_INIT containers the
/etc/network volume (GNS3's own network config consumed by init.sh's ifup)
is dead weight — init.sh never runs and the NOS manages its own
interfaces. The override removes the bind, filters /etc/network out of
self._volumes (keeping GNS3_VOLUMES and the bridge/fix passes consistent)
and deletes the host-side skeleton directory created by the base class.
Without GNS3_SKIP_INIT the mount is kept, matching base behaviour.
_persistent_volumes() is removed — the mount override is now the single
filter point.
2026-08-13 02:05:17 +08:00
YueGuobin 46e863b975 vendor: skip /etc/network in volume bridge and permission passes
GNS3_SKIP_INIT containers never run init.sh, so /etc/network (GNS3's own
network config consumed by init.sh's ifup) has no consumer — the NOS
manages its own interfaces. VendorDockerVM._persistent_volumes() filters it
out for both _setup_skip_init_volumes and _fix_permissions, saving one
docker exec per pass. The shared _mount_binds is untouched, and without
GNS3_SKIP_INIT the full volume list is returned so behaviour matches the
base class.
2026-08-13 02:05:17 +08:00
YueGuobin 486c5cc1cb docs: runtime ownership safety and boot-ordering caveat
Document why host-user ownership of volume files during runtime is
harmless for SR Linux (root processes, self-healing daemons like aaamgr
rewriting its managed files, ACL-based access) and the deviation from the
standard init.sh model, with the escape hatch of dropping the start-time
fix pass for strict-ownership NOS images.

Also document the boot-ordering caveat: the volume bridge comes up after
the NOS boots, so early boot reads overlay defaults — verify the
save/stop/start closed loop, and add troubleshooting entry #10 for config
present on the host but not applied after restart.
2026-08-13 02:05:17 +08:00
YueGuobin 6f852c83fd docs: explain mid-run Permission denied warning for boot-written NOS files
Document the aaamgr_local_user.json case: SR Linux's aaamgr daemon rewrites
the file during boot as the image's srlinux user (uid 1002) after the
start-time permission pass, leaving it unreadable until the stop-time pass.
Trace the warning to the file-browser API chain (Show in file manager ->
list_node_files -> magic.from_file) and note the impact is limited to the
file_type field.
2026-08-13 02:05:17 +08:00
YueGuobin 3455da7da3 fix: run _fix_permissions container-side on /gns3volumes mount targets
The host-side pass could not work for unprivileged GNS3 processes: the
.gns3_perms marker is created root-owned by the container-side touch, and
chowning root-owned files from the host requires root.

Rewrite VendorDockerVM._fix_permissions to run the busybox
record/chmod/chown script inside the container (as root) on the
/gns3volumes bind-mount targets — they exist for the container's whole
lifetime and do not depend on the mount --bind bridge, so a container
restart can no longer make the fix hit the overlay copy. A
stopped/exited container is skipped (logged) instead of restarted; the
next start's pass fixes ownership.
2026-08-13 02:05:17 +08:00
YueGuobin 2f36471a55 fix: host-side permission fix + SKIP_INIT volume persistence docs
Replace the container-side _fix_permissions for vendor NOS containers with a
host-side pass that walks the node's project directories directly (they are
the Docker bind-mount sources): records mode:uid:gid into .gns3_perms and
chowns to the GNS3 user. No docker exec, no container restart — the base
implementation restarts an exited container just to chown, and after the
restart the mount --bind bridge is gone so it would fix the overlay copy
instead of the host files.

The pass runs at start (after _setup_skip_init_volumes seeds and bridges the
volumes) so the controller can read project files while the node runs, and
again at stop for files written during runtime.

Update docker-exec-console.md: VendorDockerVM architecture, hook points,
class-selection factory, volume-persistence lifecycle, and new
troubleshooting entries.
2026-08-13 02:05:17 +08:00
YueGuobin 5388fd3796 refactor: move vendor NOS Docker support into VendorDockerVM subclass
Extract the docker_exec console and GNS3_* prototype knobs (SKIP_INIT,
INTERFACE_NAMES, CONSOLE_CMD) from DockerVM into a VendorDockerVM subclass.
DockerVM is restored to its 3.1 baseline plus four small extension hooks
(_prepare_init_and_interface_env, _start_console_server,
_get_container_ifname, _cleanup_console_resources) that are pure
refactorings with zero behaviour change for existing nodes.

VendorDockerVM additionally replicates init.sh's volume persistence
(bind-mount /gns3volumes over the in-container path) via docker exec for
containers that skip init.sh, so vendor NOS config (e.g. /etc/opt/srlinux)
survives node stop/start.

The Docker manager selects VendorDockerVM when console_type == docker_exec;
all other nodes keep using DockerVM unchanged.
2026-08-13 02:05:17 +08:00
YueGuobin 511c52330b docker_exec console: wrap exec command in while-true loop so sr_cli restarts on quit 2026-08-13 02:05:17 +08:00
YueGuobin 486178d05c docs: document the docker_exec console and vendor NOS Docker knobs 2026-08-13 02:05:17 +08:00
YueGuobin 474dc1db64 Prototype: vendor NOS Docker node support (SR Linux etc.) — docker_exec console via Docker exec API (pty + hijacked HTTP + NAWS resize) 2026-08-13 02:05:17 +08:00
Guobin Yue abaddec6df Merge branch '3.1' into fix/docker-node-create-setattr-noise 2026-08-12 12:44:39 +08:00
grossmj 1988768d32 fix: update CI configuration to use a single OS and remove Windows-specific dependencies 2026-08-11 19:23:18 +02:00
Jeremy Grossmann 0763ec3bd4 Merge pull request #2804 from GNS3/update-dependencies
Update dependencies
2026-08-11 19:03:41 +02:00
grossmj 78f175d827 Merge remote-tracking branch 'origin/update-dependencies' into update-dependencies 2026-08-11 18:52:20 +02:00
grossmj 386c88f230 Downgrade websockets version 2026-08-11 18:52:09 +02:00
Jeremy Grossmann 913ff3823a Merge branch '3.1' into update-dependencies 2026-08-11 18:48:54 +02:00
grossmj 9e1c533847 Finish to upgrade other dependencies 2026-08-11 18:47:35 +02:00
grossmj 0219914103 fix: breaking change with dependency FastAPI v0.137.0
https://fastapi.tiangolo.com/release-notes/#specific-breaking-changes
2026-08-11 18:47:02 +02:00
YueGuobin 72917596ab fix: suppress redundant console port setter log during Docker node create
create_docker_node() passes console, aux etc. to create_node() via
.get() so those keys remain in node_data.  The setattr fallback loop
then re-applies them — if reserve_tcp_port returned a different port
in __init__, the setter fires an INFO log and performs a wasted
release→reserve round-trip.

Pop the 15 keys already consumed by create_node() before the loop so
it only handles truly extra keys.
2026-08-12 00:10:01 +08:00
Jeremy Grossmann f69098f441 Merge pull request #2850 from yueguobin/fix/marker-batch-reconcile
fix: marker reconcile scope, batch NIO parallelism, aiohttp WS upgrade
2026-08-11 18:04:45 +02:00
YueGuobin fdcc7058cb revert: restore force_close=True in compute._session()
The per-commit force_close=not _local optimisation reused TCP connections
for the loopback compute, but _session() is also used for the controller's
WebSocket heartbeat connection (_connect_notification -> ws_connect).
The different connector behaviour prevented the compute from receiving
pings, so no compute.updated events reached the WebUI and the compute
cache stayed empty.
2026-08-11 23:27:30 +08:00
YueGuobin 1dd334caff perf: parallelize batch NIO creation across nodes
create_batch_nios bound NIOs in a serial for-loop, so during project open
every builtin L2 node (ethernet_switch/hub/cloud/nat) started its uBridge
one at a time (~0.5s each for fork + AF_UNIX connect). Group entries by
node and bind in parallel with asyncio.gather — mirroring update_batch_nios
— so independent uBridge processes start concurrently. Within a node,
entries stay serial to respect the per-node uBridge command lock.
2026-08-11 22:11:44 +08:00
YueGuobin 958aa59d7e fix: scope marker reconcile to the current bridge/NIO
The reconcile pass in _ubridge_apply_markers walked the node-wide
_marker_filter_bridges map but compared against `desired`, which only
carries the markers of the NIO being updated. Updating any one link
therefore deleted every other link's markers (and their pcaps) on that
node — a regression from the add-only→reconcile switch. IOU's override
had the same flaw across its ports.

Guard the delete pass with the current bridge (base_node) / IOL location
(IOU) so only markers on the NIO being reconciled can be removed. Added
a regression test that fails without the guard.
2026-08-11 22:11:44 +08:00
YueGuobin 5de902c8b1 cleanup: remove stray debug print in Dynamips node creation
The print(node_data.chassis, platform in DEFAULT_CHASSIS) at
dynamips_nodes.py:67 (added in 8ad7b3f6, 2022) emitted "None False"
to stdout on every Dynamips router creation. Pure debug leftover;
the very next line tests the same condition.
2026-08-11 21:46:38 +08:00
YueGuobin 958c45b6fc fix: reconcile marker filters in _ubridge_apply_markers (delete/update)
The batch marker-def fan-out (PR #2848) routed create/update/delete
marker_definition through memory_only + a batch PUT /nios/batch that
re-applies markers via _ubridge_apply_markers. But _ubridge_apply_markers
was strictly add-only: it skipped any (name, link_id) already in
_marker_filter_bridges, and reset_packet_filters preserves mark filters
(contract). So:

  * delete_marker_definition left the deleted marker's filter alive in
    uBridge (still matching / signalling / writing pcap) until node restart.
  * update_marker_definition (bpf/tag/direction change) never reached
    uBridge — the live filter kept the old expression until node restart.

Make _ubridge_apply_markers a real reconcile against the desired
nio.markers:
  - installed but no longer desired  → delete_packet_filter + unlink pcap
                                       + unregister
  - desired with changed filter field → rebuild (delete + re-add)
  - desired with only enabled changed  → instant toggle (pcap preserved)
  - desired and unchanged              → skip
  - desired and new                    → add

Track installed specs in a parallel _marker_specs dict so changes can be
detected. Both base_node and the IOU iol_bridge override are updated.
Added tests for the delete-removed and rebuild-changed-bpf paths.
2026-08-11 21:00:03 +08:00
Jeremy Grossmann f045cde0da Merge pull request #2848 from yueguobin/perf/link-create-parallel
perf: link creation & marker fan-out batch optimization
2026-08-11 09:35:08 +02:00
YueGuobin 04592a1107 log: suppress marker sink stats when no matches received 2026-08-11 11:43:43 +08:00
YueGuobin 11461982b6 log: add periodic marker.match throughput statistics
MarkerManager now logs every 10s how many marker datagrams the UDP sink
processed and the current throughput rate (match/s), so operators can
tell at a glance whether the single sink keeps up with the aggregated
uBridge traffic. Error count is also logged.
2026-08-11 11:40:22 +08:00
YueGuobin 2ac0bb7d25 marker: route marker.match to a dedicated project WS channel
High-frequency marker.matches shared the single project notification queue with topology events (node.*/link.*), causing head-of-line blocking. Add a separate marker channel: Notification.project_marker_queue/marker_emit, dispatch routes marker.* off the main project queue, plus a new WS /{project_id}/notifications/markers/ws endpoint. Fully migrated (the main project WS no longer carries marker.match); marker listeners are independent of project auto_close. Compute side unchanged.
2026-08-11 11:19:56 +08:00
YueGuobin a699383933 perf: raise marker UDP receive buffer from ~208KB to 8MB
1000+ uBridge processes share a single UDP marker.sink endpoint. The
default kernel receive buffer (~208 KB) holds ~1000 datagrams — a
traffic burst can overflow it before the event loop drains them. Grow
it to 8 MB via setsockopt(SO_RCVBUF) so the kernel absorbs bursts
without silent packet loss.  UDP is unordered — buffer size does not
affect per-datagram latency, only burst-loss resilience.
2026-08-11 10:44:16 +08:00
YueGuobin 6c0ec30d5d perf: move project-open marker inheritance to prepare phase
Previously apply_defs_to_new_link ran during finalize (after
link._created=True), issuing one PUT /nio round-trip per link end for
each inherited marker — 5000+ HTTP round-trips even for a single def.
Move it into _prepare_link_from_topology (memory_only) so the inherited
markers are already in _link_data when _prepare() constructs the NIO
specs, and create_batch_nios carries them in the single batch dispatch.

Finalize no longer calls apply_defs_to_new_link.  Interactive link
creation (dragging a cable in the UI) still goes through the per-link
create() → apply_defs_to_new_link path — a single link is fast.
2026-08-11 09:13:14 +08:00
YueGuobin e4d4282026 perf: parallelise compute-side batch NIO update per node
The update_batch_nios handler looped serially across all entries (5010
for a 2505-link topology). On started nodes each entry does uBridge I/O,
so the serial loop added orders of magnitude to the fan-out wall time.

Group entries by node_id before dispatching.  Different nodes talk to
their own uBridge process (AF_UNIX socket) and are fully independent, so
their updates run in parallel via asyncio.gather.  Per-node entries are
still serial (respecting the per-node uBridge command lock).
2026-08-11 09:02:46 +08:00
YueGuobin 57558508bf perf: batch update/delete marker-def fan-out too (full project-level)
per-def operations are project-level — create, update AND delete all
modify the marker policy on every link — so all three must batch, not
just create.

Extend memory_only to update_marker and stop_marker (merge/delete into
_markers + refresh _link_data, no per-link HTTP), and route
update_marker_definition and delete_marker_definition through the same
two-phase path as create: memory-only per link, then one
PUT /projects/{id}/nios/batch per compute.

Trade-off: a full reapply resets every marker's pcap on the link (the
old precise update_marker/stop_marker preserved sibling pcaps). For
project-level policy changes this is acceptable — real-time insight
matters more than pcap continuity, and batching turns 5000+ round-trips
into one per compute.
2026-08-11 08:54:16 +08:00
YueGuobin 48991f2d29 perf: batch marker-def fan-out to one PUT /nios/batch per compute
When a marker definition is created (or re-applied on data_link_type
change), the fan-out used to call inherit_marker -> update() on every
link, issuing one PUT /nio per link end (5000+ round-trips on a 2500-link
project). On started nodes each round-trip also reconfigured uBridge.

Two-phase fan-out:
- inherit_marker/start_marker gain memory_only: writes the marker into
  link._markers and refreshes _link_data without any HTTP/emit/dump.
- _apply_def_to_all_links applies memory-only to every link, then
  _batch_update_link_nios groups the updated NIO specs by compute and
  sends a single PUT /projects/{id}/nios/batch per compute.

compute: new PUT /projects/{id}/nios/batch endpoint with _get_existing_nio
+ _update_nio_binding dispatch (mirrors create_batch_nios), re-applies
filters+markers to uBridge on started nodes.

Precise per-marker operations (update_marker bpf change, stop_marker on
def delete) are untouched — they deliberately avoid a full reapply to
preserve sibling marker pcaps.
2026-08-11 08:44:57 +08:00
YueGuobin c877ed87a6 log: add marker fan-out timing for project-open and interactive def-change
Distinguish the two marker-policy fan-out paths in the log so we can tell
which is slow:
- apply_defs_to_new_link (project-open finalize): logs def count + link
  count + elapsed, only when marker_definitions is non-empty.
- _marker_apply_concurrently (interactive create/update/delete def): logs
  link count + elapsed per fan-out.
2026-08-11 08:29:39 +08:00
YueGuobin d84e756228 tune: raise start_all concurrency from 3 to 10
3 is too conservative for modern hardware; 10 provides a moderate boost
without the risk of overwhelming the host (start is the heaviest
operation: ubridge process + docker start + network config for each
node).
2026-08-11 01:20:14 +08:00
YueGuobin 2f70bd6daa revert: drop _connect_nio thread-pool executor, restore async _ubridge_send
The _connect_nio thread-pool optimisation (send_batch_sync) targeted
node-start performance, but start_all already runs at concurrency=3
(by design, to avoid overwhelming the host).  It also introduced a
Python 3.13 incompatibility (trsock.setblocking forbidden) that
prevented docker nodes from starting.  Since node-start is not the
target of this branch (project-open link creation is), revert to the
simple per-command async _ubridge_send.

The project-open batch NIO dispatch (create_batch_nios) is unaffected —
it never called _connect_nio (nodes aren't started during open).
2026-08-11 01:16:13 +08:00
YueGuobin 46bad0b639 fix: use socket.fromfd in send_batch_sync for Python 3.13 compat
Python 3.13's asyncio TransportSocket wrapper rejects setblocking(). Dup
the underlying fd via socket.fromfd() into a plain socket that the
executor thread can drive in blocking mode, then detach() after the
batch to avoid closing the transport's fd.
2026-08-11 01:10:18 +08:00
YueGuobin f9f1a4d4d8 log: demote all per-node lifecycle INFO logs to DEBUG
Extend the docker_vm / base_node demotion to the remaining node types
and supporting layers:

  qemu_vm: MAC, adapters, disk image, RAM, priority, NIO added, created
  iou_vm:  application ID, adapters, serial, image, RAM, NIO added
  dynamips router: created, adapter, RAM, NVRAM, IOS, idle-PC, disk,
    MAC, NIO bound; hypervisor create/start/connect; nio_udp created
  builtin: ethernet_switch/hub, cloud, nat — created, NIO bound
  ubridge: hypervisor start/connect

At multi-node scale these per-node lines flood the log. Only the
project-open progress summary (loaded N nodes / creating N links)
now remains at INFO alongside genuinely exceptional events.
2026-08-11 01:05:53 +08:00
YueGuobin 4e30b6905a fix: await Dynamips.create_nio (it is async, unlike sync base)
Dynamips.create_nio is async def while BaseManager.create_nio is a sync
def.  The previous fix only added the extra 'node' argument but did not
await the resulting coroutine, causing 'was never awaited' warnings and
passing a coroutine object instead of an NIO instance to the binding
dispatch.  Add 'await' on the Dynamips branch.  Test updated to verify
both the async nature and the parameter count.
2026-08-11 01:00:01 +08:00
YueGuobin 09a9555d02 fix: use bound-method param count for Dynamips create_nio detection
The inspect check tested unbound function signatures (3 params unbound vs
2 unbound) but node.manager.create_nio is a bound method — inspect
excludes 'self'.  Dynamips bound = 2 (node + nio_settings), standard
bound = 1 (nio_settings).  The old '== 3' never matched, so the extra
'node' arg was never passed.  Switch to '>= 2' and rewrite the test to
exercise the actual bound-method scenario.
2026-08-11 00:58:08 +08:00
YueGuobin e56488c2f7 test: add _add_nio_binding dispatch tests for Qemu, IOU, VPCS, Builtin
Cover every dispatch branch in the batch NIO endpoint so that future
additions of node types with unusual NIO-binding signatures are caught
at test time.
2026-08-11 00:55:54 +08:00
YueGuobin ed0f1bb4de fix: Dynamips create_nio(node, nio_settings) takes extra arg + add tests
Dynamips.create_nio requires the node as first positional argument
(unlike every other manager which takes only nio_settings). The batch
handler now detects this via parameter-count inspection (3 vs 2) and
passes node when needed.

Also add Dynamips to _add_nio_binding dispatch: routers use
slot_add_nio_binding(slot, port, nio), switches/hubs fall back to
add_nio(nio, port_number).

Add tests covering Dynamips router dispatch, switch dispatch, and the
create_nio signature detection to prevent regression.
2026-08-11 00:54:53 +08:00
YueGuobin c366f20340 log: add start/stop/close progress lines; revert start concurrency to 3
- start_all, stop_all: emit 'starting/stopping N nodes...' and complete
  lines with project name+id, matching the open-node/link log style.
- close: emit 'project closing.../closed' bracketing the whole teardown.
- Revert start_all concurrency 20->3 and reset_console 20->3: start
  (ubridge process + docker start + network) is heavy enough that high
  concurrency risks overwhelming the server. stop remains 100 (kill is
  light) and suspend remains 50 (pause is light).
2026-08-11 00:48:13 +08:00
YueGuobin ec2a0ffff3 log: lower per-node lifecycle logs in base_node to DEBUG
The per-node created / is-closing / Starting-uBridge / Stopping-uBridge
INFO lines flood the log at 1000+ node scale during project open, close,
start-all and stop-all. Demote them to DEBUG (consistent with the
docker_vm lifecycle-log demotion).
2026-08-11 00:39:49 +08:00
YueGuobin 3aa39a2da3 perf: raise start/stop/suspend/reset-console concurrency from 3
The historic concurrency=3 was far too conservative for 1000+ node
topologies. Raise them based on operation weight:

  stop_all:      3 -> 100  (docker kill + permissions cleanup, light)
  suspend_all:   3 ->  50  (docker pause/unpause, light)
  start_all:     3 ->  20  (ubridge startup + docker start + network, heavy)
  reset_console: 3 ->  20  (terminal reset, light)

Node creation (open) already uses concurrency=100 and approaches the
container-create daemon limit (~20/s); stop/kill is substantially faster
than create, so 100 is safe.
2026-08-11 00:33:49 +08:00
YueGuobin 7dc66d4836 fix: race in concurrent node creation sending duplicate POST /projects
When opening a project, nodes are created with Pool(concurrency=100).
Each _create_node did an unlocked check-then-act: 'if compute not in
_project_created_on_compute' -> await POST /projects -> add(compute).
The await let dozens of concurrent node creations race past the check
before any registered, each firing a redundant POST /projects at the
same compute. The compute-side sync handler then ran in a thread pool
and instantiated the Project N times (the repeated 'Project ... created'
INFO logs, ~16x).

Guard the check+POST+register with a project-level asyncio.Lock. The
first creation holds it for one POST; the rest acquire, see the compute
already registered, and return immediately — negligible serialization.

Also annotate the node/link progress logs with project name+id and add
completion lines, so the log clearly shows which project is loading and
when each phase finishes.
2026-08-11 00:30:33 +08:00
YueGuobin df3ca6e26b log: lower per-node docker lifecycle logs to DEBUG
At 1000+ nodes the per-node INFO lines flood the log during open /
start-all / stop-all: MAC changed, adapters changed, created, started,
console listen, fix ownership, stopped, paused, removed, adapter created,
NIO removed, capture start/stop, CPU/memory limits, mount resources.

Demote all of these routine per-node/per-adapter lines to DEBUG. Keep
INFO only for genuinely rare/important events: image pull (missing image)
and stale-container cleanup. Warnings unchanged.
2026-08-11 00:22:26 +08:00
YueGuobin 4c6ef7752a log: emit progress lines for node and link loading on project open
A large topology takes ~50s to open (dominated by docker daemon node
creation). Without any start marker the user sees no feedback that work
is in progress. Add two INFO lines: 'Loading N nodes...' before the node
pool and 'Creating N links...' before the bulk link prepare/dispatch.
2026-08-11 00:16:32 +08:00
YueGuobin e2fd922922 cleanup: remove project-open stage timing logs, lower NIO-added log to debug
- Drop the diagnostic stage-timing logs added during link-create perf
  work (nodes / preallocate / prepare / dispatch) now that bottlenecks
  are resolved and verified.
- Lower the per-NIO 'added to adapter' log in docker_vm from INFO to
  DEBUG — at 5000+ NIOs per project open it floods the log at INFO.
2026-08-11 00:14:58 +08:00
YueGuobin c9a93c0aeb perf: skip per-link topology dump during project-open prepare
Stage timing showed prepare taking 96s for 1275 links (vs 0.31s for the
batch dispatch itself). Root cause: _prepare_link_from_topology called
add_link (dump=True default) and update_link_style/update_show_filters_icon
(each unconditionally dump the full topology). 1275 links x serialize-
and-write-the-whole-topology = the entire 96s.

- add_link(..., dump=False): the project is dumped once at the end of open
- set link._link_style / _show_filters_icon directly instead of the
  update_* helpers, which also avoids spurious 'link.updated' notifications
  before the link is finalised

The final self.dump() at the end of project.open already persists everything.
2026-08-10 23:54:26 +08:00
YueGuobin 38c49a655c perf: batch NIO dispatch on project open (one HTTP per compute)
Project open used to create each link by issuing two NIO POSTs from the
controller to the compute — ~5000 HTTP round-trips for a 2500-link
topology, all funnelling through the single shared controller/compute
event loop and capping throughput near 12 links/s.

Replace it with a bulk path:
- UDPLink split into _prepare() (local: ports, peer addrs, link_data)
  and _commit_nios() (dispatch). create() = prepare + commit (interactive).
- Link.add_node gains batch=True: attach both nodes without triggering
  per-link NIO HTTP.
- compute: new POST /projects/{id}/nios/batch endpoint with a unified
  _add_nio_binding dispatch across node types (docker/qemu/iou/vpcs/
  builtin differ in signature).
- project.open: prepare all links locally, group NIO entries by compute,
  send each compute a single /nios/batch, then finalise (wire node/port
  refs, mark created, notify, apply marker defs) in parallel.

Cuts controller->compute HTTP from O(links) to O(computes). Test added
for the batch endpoint.
2026-08-10 23:42:50 +08:00
YueGuobin 96d4d82716 perf: cache compute.host_ip + add UDPLink.create timing log
host_ip resolved socket.gethostbyname on every access with no cache.
get_ip_on_same_subnet touches host_ip 2-4 times per link, so opening a
2500-link project issued thousands of blocking DNS calls inline on the
event loop — freezing all concurrent link coroutines each time. This is
the most likely cause of the 12-link/s throughput (1000x below what
Pool(concurrency=100) should deliver) and the burst+pause pattern.

- compute.host_ip: cache the resolution in _host_ip_cache, invalidate
  on host setter change
- UDPLink.create: timing log splitting get_ip / ports / nio so the next
  project-open confirms where time actually goes
2026-08-10 23:20:40 +08:00
YueGuobin b155980402 perf: dedicated 500-worker thread pool for ubridge batch I/O
Replace the default asyncio executor (capped at ~32 threads) with a
dedicated ThreadPoolExecutor sized for large-topology parallelism.
When 500 nodes each call _connect_nio, up to 500 OS threads can now
send blocking ubridge commands in parallel — no longer serialised by
either the event loop or a small thread pool.

- ubridge_hypervisor: module-level _ubridge_sync_pool (max_workers=500)
- docker_vm._connect_nio: dispatches to the dedicated pool instead of
  the default executor
2026-08-10 23:11:23 +08:00
YueGuobin 05934fa8e8 perf: offload per-NIO ubridge commands to thread-pool executor
Replace the 3-5 sequential await _ubridge_send calls in _connect_nio
with a single run_in_executor batch.  The batch holds the node-level
asyncio Lock to prevent interleaving with async sends, then uses the
hypervisor's new send_batch_sync method which does blocking socket
sendall/recv inside the thread pool.  Different nodes' batches now
run in true OS-thread parallelism rather than serialising through
the asyncio event loop between every command.

- ubridge_hypervisor.send_batch_sync: blocking batch send using
  the underlying socket from the asyncio transport, protected by
  threading.Lock.
- _connect_nio: builds command list (add_nio_udp, start_capture,
  bridge start, reset_packet_filters, add_packet_filter) and
  dispatches to the default executor.
2026-08-10 23:06:54 +08:00
YueGuobin 506b0b9f4a perf: enable TCP keep-alive for local compute HTTP requests
When controller and compute share the same process, every HTTP request
to localhost was paying a full TCP handshake (force_close=True forced
connection teardown after each request).  With 2500+ links each sending
two NIO POSTs, that's 5000 SYN->SYN-ACK->ACK cycles even for sub-ms
in-memory handlers.  Switch to keep-alive for loopback compute
(127.0.0.1 / ::1 / localhost) while keeping force_close for remote
computes that may sit behind NAT/firewalls that drop idle connections.
2026-08-10 23:00:59 +08:00
YueGuobin 82fc7f2bd1 debug: add per-command timing to _connect_nio ubridge calls
Temporary diagnostic instrumentation to measure the wall-clock time of
each ubridge command during NIO addition (add_nio_udp, bridge start,
filters, markers).  The logs will reveal whether the 12-NIO/s
throughput stems from ubridge command latency itself or from lock
contention / HTTP overhead outside _connect_nio.
2026-08-10 22:45:32 +08:00
YueGuobin acc9e670af perf: parallelize UDP port allocation and NIO creation in UDPLink.create
Previously the two sides' UDP port reservations and NIO tunnel
POSTs were issued sequentially, even though they are independent
once the peer addresses are known — each node talks to its own
compute/uBridge with no shared lock, so the HTTP round-trips can
overlap.

- Port allocation: gather _allocate_port for both computes
- NIO creation: gather both node.post calls together
- Error handling: if either side fails, roll back whichever side
  succeeded (previously only node2-fails→cleanup-node1) before
  re-raising the first error

Batch loading (open/import project) benefits most because links
are created at high concurrency and the per-link wall-clock
time is dominated by the sum of its two sequential NIO POSTs.
2026-08-10 22:36:41 +08:00
Jeremy Grossmann 372874c7d5 Merge pull request #2847 from yueguobin/fix/docker-pid1-signal-chain
fix: SIGKILL docker container on stop instead of 5s grace period
2026-08-10 16:03:22 +02:00
YueGuobin e7dfe9c7c4 fix: SIGKILL docker container on stop instead of 5s grace period
Docker node stop took ~5s every time. The stop API grace period
(params t=5, unchanged since 2015) was always exhausted: the business
process (often an interactive shell) ignores SIGTERM, and GNS3 doesn't
depend on graceful shutdown — _fix_permissions and /gns3volumes already
persist container state before stop() is called.

Use POST /containers/{id}/kill (SIGKILL, zero delay) instead of stop.
The 409 (container already stopped) replaces the previous 304 handling
for the race where the container exits between the state check and the call.

t=5 traced to commit 33edbefa3 (2015-10-14) "Docker cleanup and
improvements" — introduced with no recorded rationale.
2026-08-10 21:48:26 +08:00
Jeremy Grossmann 3689e2bb87 Merge branch '3.1' into update-dependencies 2026-08-08 22:18:17 +02:00
Jeremy Grossmann cf072c7922 Merge pull request #2752 from Volo6uev/base-configs-3.0
Api endpoints to manage base configuration files for templates
2026-08-08 22:16:36 +02:00
Jeremy Grossmann 909ccf8fcd Merge branch '3.1' into base-configs-3.0 2026-08-08 22:11:39 +02:00
Jeremy Grossmann 1d6218a3f1 Merge pull request #2846 from GNS3/bugfix/2773
Handle manual project deletion
2026-08-08 22:10:46 +02:00
grossmj bc8e43dfca fix: add event handling for deleted projects 2026-08-08 17:27:52 +02:00
grossmj 544d15c87e fix: tests after merging 2026-08-08 16:50:19 +02:00
grossmj dff79f65d3 Merge branch '2.2' into 3.1
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/import_project.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/version.py
#	tests/compute/docker/test_docker_vm.py
#	tests/controller/test_import_project.py
#	tests/controller/test_project.py
2026-08-08 16:27:14 +02:00
Jeremy Grossmann 955d545cf2 Merge pull request #2844 from yueguobin/marker-enabled-pause-resume
marker: direction, real-time control, serial-link (WAN) support; uBridge AF_UNIX control channel
2026-08-07 22:00:13 +02:00
Guobin Yue 183739e630 Merge branch '3.1' into marker-enabled-pause-resume 2026-08-08 01:18:39 +08:00
YueGuobin 82945cd81e server: raise the open-files (RLIMIT_NOFILE) limit at startup
Every started node holds ~3 file descriptors in the server's table (pidfd + stdout/stderr pipes per child process), so a few hundred started nodes exhaust the default 1024 soft limit and the uBridge version-check subprocess fails with EMFILE ('Too many open files: /dev/null').

At startup, best-effort raise RLIMIT_NOFILE to 65535 (capped by the hard limit); failures are logged, never fatal. Runs before daemonize() so the daemon inherits the raised limit. Linux-only, matching the platform target.
2026-08-08 00:26:00 +08:00
YueGuobin ad8bac8328 marker: batch topology dumps in bulk fan-out (per-def on 500+ links was ~1 minute)
Every per-link marker operation (start_marker / stop_marker / update_marker) called Project.dump() -- a full topology serialization + file write. A definition fan-out over 500 links therefore wrote the whole topology 500+ times (each blocking the event loop), which dominated the observed ~1 minute; the NIO round-trips themselves were negligible.

Add a dump: bool = True parameter to the three per-link operations and inherit_marker (matching the existing dump param on Link.add_node). The bulk paths -- definition create fan-out, definition-update sync and re-fan-out, definition-delete cleanup, pause/resume, new-link inheritance -- pass dump=False and their caller dumps once after. apply_defs_to_new_link suppresses per-def dumps too: link create / project open dump once after, so opening a 500-link project with N definitions no longer does 500xN topology writes.
2026-08-08 00:03:30 +08:00
YueGuobin 078cf92aef marker: concurrent (bounded) definition fan-out
The per-definition fan-out applied markers to links in a serial loop -- one compute round-trip per link. On a 1000-link project that serializes N HTTP round-trips (minutes on remote computes). Fan out with asyncio.gather + Semaphore(32): links are independent (own _markers/_link_data), per-link ControllerError stays isolated, and Project.dump is synchronous + atomic (tmp + rename) so concurrent dumps cannot corrupt the topology file.

Converts the definition-create fan-out, the definition-update sync and re-fan-out loops, and the definition-delete cleanup to the shared _marker_apply_concurrently helper. apply_defs_to_new_link stays serial deliberately: all definitions share one link and each push carries the link's full marker set, so concurrent pushes would race and lose markers.
2026-08-07 23:50:41 +08:00
YueGuobin 0f86dabfa3 marker: forward data_link_type on per-link marker create
The per-link create_marker route (links.py) called start_marker without the data_link_type from the body, so it always defaulted to DLT_EN10MB and a serial encapsulation chosen by the caller was silently dropped. Same oversight the IOU capture and definition routes had; one-arg fix.
2026-08-07 13:38:33 +08:00
YueGuobin ba318150fa iou: skip already-installed markers in _ubridge_apply_markers (NIO update idempotency)
The IOU override of _ubridge_apply_markers lacked the incremental guard the generic path has, so on an NIO update it re-added every marker the port already carried. uBridge's add_packet_filter rejects a duplicate filter name (packet_filter.c find_packet_filter), so adding a private marker to an IOU link that already hosted an inherited global-* copy failed with 'Failed to add filter global-...' -- the NIO update re-sends ALL markers on the port (inherited + new private), and the pre-existing one collided.

Add the same (name, link_id) in self._marker_filter_bridges skip as the generic base_node path, so an update only installs markers not already on the port. Mirrors how Dynamips/vpcs/etc. stay idempotent across add + update.
2026-08-07 13:30:12 +08:00
YueGuobin 3322233658 marker: serial-link (WAN) support via data_link_type -> uBridge linktype
Markers now work on serial links (Cisco HDLC / PPP / Frame Relay / ATM), not just Ethernet. A marker carries a data_link_type (default DLT_EN10MB); at the uBridge boundary it becomes the 'mark ... linktype <dlt>' keyword so the BPF compiles and the pcap is written with the matching link-layer.

- MarkerCreate / MarkerDefinitionCreate gain data_link_type (default DLT_EN10MB). Per-link it is create-only; definitions are updatable (a change re-fans-out).
- base_node._marker_linktype() normalizes the GNS3 DLT name (strip DLT_, uppercase, None for EN10MB). Single source is SerialPort.data_link_types, so Cisco PPP -> PPP_SERIAL (50), matching the capture path -- no second mapping table.
- _ubridge_add_marker_filter (generic) and the IOU marker loop append 'linktype <dlt>'.
- Definition fan-out branches on link_type in inherit_marker: Ethernet is always EN10MB; a serial link uses the definition's WAN encapsulation, or is SKIPPED when none was chosen (an EN10MB pcap on serial is undecodable). One definition covers a mixed topology.
- MCP marker_definition exposes data_link_type (None = not forwarded).
- No uBridge rebuild on a data_link_type change -- only that one marker's filter is swapped (delete + re-add), mirroring a BPF change; reset_packet_filters preserves sibling mark filters.

Requires the uBridge build with 'mark ... linktype' support.
2026-08-07 01:53:33 +08:00
Jeremy Grossmann 555c3ecab5 Merge pull request #2845 from yueguobin/fix/iou-serial-capture-linktype
Fix IOU serial-link captures always written as Ethernet (DLT_EN10MB)
2026-08-06 19:07:22 +02:00
YueGuobin 117f580cfd Merge fix/iou-serial-capture-linktype: IOU serial capture data_link_type 2026-08-07 00:36:25 +08:00
YueGuobin 17020b7f7b iou: forward data_link_type on capture start so serial pcaps use the correct linktype
The IOU compute capture/start route received data_link_type in the NodeCapture body but dropped it when calling node.start_capture(), so iou_vm.start_capture always defaulted to DLT_EN10MB -- every IOU serial capture (Cisco HDLC / PPP / Frame Relay) was written as an Ethernet pcap. Dynamips, cloud and the L2 switches already forward this value; IOU was the only serial-capable node that omitted it. One-argument fix: the node method already accepts and forwards data_link_type to 'iol_bridge start_capture', so only the route was missing it.

Verified: IOU serial captures now produce the expected linktype (C_HDLC / PPP_SERIAL / FRELAY) instead of Ethernet.
2026-08-07 00:35:39 +08:00
YueGuobin 5f4ac38434 ubridge: default the control transport to unix
Switch ubridge_control_transport from tcp (-H) to unix (-U), the
AF_UNIX + SO_PEERCRED channel recommended on Linux for kernel-level
peer authentication. tcp is retained as an opt-in for backward
compatibility. Existing deployments that set the key explicitly are
unaffected; only fresh installs / unset keys pick up the new default.
2026-08-06 21:35:09 +08:00
YueGuobin b8ac76f047 ubridge: require version >= 1.2.0
Drop the platform-specific floor (0.9.12 darwin / 0.9.14 others) in
favour of a single 1.2.0 minimum. This server now relies on features
only present in recent uBridge builds: the AF_UNIX control channel
(-U / SO_PEERCRED), the marker (mark) filter, and the brctl-backed
builtin Ethernet Switch. Removes the now-unused sys import left behind
by the dropped darwin branch (target is Linux-only).
2026-08-06 21:35:09 +08:00
grossmj 29c1b04078 fix: add missing HTTPException import 2026-08-05 21:55:23 +02:00
YueGuobin 7ed4eeab29 mcp: drop direction from marker_definition tool
A marker definition fans out to every link and auto-selects its capture node
on each, so tx/rx is relative to a node that varies per link — the controller
already rejects it (409). Exposing direction on the MCP definition tool let an
agent ask for something that could only fail. Remove the parameter and the
handler's direction handling; the docstring now points to encoding direction in
the BPF (e.g. 'icmp and icmp[icmptype]==8'). Per-link link_marker keeps
direction, where the capture node is fixed.
2026-08-05 01:40:22 +08:00
YueGuobin f7b19dae99 marker: tighten marker name max length from 128 to 32
128 characters was far beyond any realistic marker label (icmp, arp, tcp-syn)
and would have collided with the pcap filename budget once a tag prefix is
added later. Cap the user-facing name at 32 in both MarkerCreate and
MarkerDefinitionCreate; the compute-side name guard now also rejects names
longer than 48, which covers the `global-{def_name}` inherited form (≤ 39).
2026-08-05 00:49:37 +08:00
YueGuobin 75f278228b marker: drop deleted marker from port NIO cache to stop empty pcap on restart
Deleting a marker while its node was stopped, then starting the node, recreated
an empty pcap. Root cause: delete_marker_capture removed the uBridge filter and
the pcap file but not the marker spec cached on the port NIO (nio.markers) —
the data source _ubridge_apply_markers reads on node start. The stale spec
reinstalled the marker when uBridge came up.

This was a regression from switching stop_marker off update() (which re-sent
the NIO and implicitly refreshed nio.markers) to the fine-grained
node.delete(/markers/{name}) path.

Fix: make the delete port-aware so the compute can locate the NIO. The DELETE
marker route becomes /adapters/{a}/ports/{p}/markers/{name} across all six
node types; the handler resolves the NIO via get_nio and passes it to
delete_marker_capture, which now pops the marker from nio.markers. get_nio
works regardless of uBridge state, so the stopped-node case is covered. The
controller's stop_marker targets the capture side's adapter/port.
2026-08-05 00:08:12 +08:00
YueGuobin 1a0ce51f38 marker: validate def BPF once, skip re-validation on inherited fan-out
A marker definition validated its BPF N times — once per link in the fan-out
(start_marker runs validate_bpf_syntax on every copy), spawning one tcpdump -d
subprocess per link for the same expression. Definitions did not validate BPF
at all; only direction was checked.

Move the single validation point to the definition layer (create/update), and
validate each definition's BPF on project load (dropping any that have gone
invalid, like private markers). The inherited fan-out (start_marker) and def
sync (update_marker) now skip validate_bpf_syntax for inherited copies, since
the BPF comes from an already-validated definition. Private per-link markers
still validate inline as before. uBridge still runs pcap_compile at install, so
an invalid expression can never slip through.

Creating a definition over N links now runs one tcpdump instead of N.
2026-08-04 23:20:58 +08:00
YueGuobin 60e2bbbbbb marker: point directional defs at BPF, refresh implementation doc
The 409 on a tx/rx definition now recommends encoding direction in the BPF
(e.g. icmp[icmptype]==8) as the primary fix, with per-link markers as the
single-link fallback. Doc updated: per-def rejects tx/rx (why + BPF), the
pause section no longer claims bpf changes reset+reapply (they rebuild one
filter), and a new Capture files section covers pcap cleanup + reset-preserves-mark.
2026-08-04 22:59:12 +08:00
YueGuobin 95824b1861 marker: incremental apply, clear bridge map on uBridge stop
_ubridge_apply_markers now installs only markers not already on the bridge
(uBridge's reset_packet_filters preserves mark filters), so an NIO update no
longer re-adds — and reopens — sibling markers' pcaps. _stop_ubridge clears
_marker_filter_bridges so a node restart re-installs everything (the map would
otherwise keep stale entries pointing at a fresh, empty uBridge).
2026-08-04 22:19:43 +08:00
YueGuobin caec71aa71 marker: fine-grained filter ops, clean pcap on remove
Deleting or updating a marker no longer triggers a full NIO reapply
(reset_packet_filters + re-add), which closed/reopened every sibling
marker's pcap via uBridge. Instead operate on single filters:

- stop_marker: bridge delete_packet_filter + unlink the pcap (works with
  the node stopped; filter removal is skipped, the file is still deleted).
- update_marker: bpf/tag/direction → rebuild just that filter (delete + add);
  enabled → instant toggle; color/highlight_duration → stored only.
- compute delete_marker_capture / rebuild_marker_filter + per-node routes
  (DELETE /markers/{name}, PUT /markers/{name}/rebuild) + MarkerRebuild schema.

IOU overrides _ubridge_delete_marker_filter for iol_bridge; rebuild reuses
the already-overridden add/delete/set, so IOU needs no rebuild override.
2026-08-04 21:35:31 +08:00
YueGuobin 19815f7a37 marker: restore direction on project load, reject tx/rx on definitions
Restore a private marker's direction (and highlight_duration) when a
project is reopened — _create_link_from_topology_data previously dropped
them, silently reverting rx/tx markers to "both".

Reject tx/rx direction on marker definitions with HTTP 409: a definition
auto-selects its capture node per link and direction is relative to that
node, so a fixed tx/rx has no stable project-wide meaning. Per-link
markers still support tx/rx; only the project-wide definition is restricted
to "both" (the default).
2026-08-04 10:14:02 +08:00
YueGuobin 9323ea4cec schema: accept direction='both' in marker schemas, normalize to None 2026-08-03 00:31:45 +08:00
YueGuobin b6959f8214 qemu: demote QEMU monitor connect and set_link logs to DEBUG 2026-08-03 00:17:34 +08:00
YueGuobin e3ce234a09 docs: add log-interpretation note across node types for marker operations 2026-08-03 00:05:08 +08:00
YueGuobin ff907da5f6 marker: key _marker_filter_bridges by (name, link_id) so multi-link nodes toggle every copy
The _marker_filter_bridges dict was keyed by marker name alone, so when one
node hosted the same filter name on several links (IUOL-BRIDGE per node with
many bays/units, or a multi-interface router), successive apply calls
overwrote earlier entries. pause_marker_definition then toggled only the last
recorded bridge/location — other copies stayed active and kept emitting.

Key by (name, link_id) so each copy is independent, and iterate all matching
entries in _ubridge_set_marker_filter_state (both generic bridge and IOU
iol_bridge override). Toggle route existence checks also iterate matching
names. Tests updated.
2026-08-02 23:48:24 +08:00
YueGuobin 34b644a548 marker: make per-filter toggle fall back to NIO rebuild when the marker isn't installed
Toggle routes silently no-opped when _marker_filter_bridges lacked the filter
name, so update_marker's enabled-only short-circuit succeeded without toggling
uBridge — the controller-layer enabled was set but the uBridge filter stayed on
and kept emitting signals. Now the toggle routes raise HTTPException 404
(FastAPI handles it directly, no ERROR log); the controller's except catches it
and falls back to self.update() (NIO rebuild, which applies the marker + off).
2026-08-02 23:41:43 +08:00
YueGuobin 0afbb897a5 marker: make per-filter toggle a no-op when the marker isn't installed
_ubridge_set_marker_filter_state raised "Marker X is not installed on this
node" when the capture node wasn't running — the name->bridge map is only
populated during _ubridge_apply_markers, which runs when the node is up. The
error was noise: the controller's enabled-only short-circuit catches it and
falls back, and the controller-layer enabled is authoritative (honoured when
the node starts and applies the marker). Treat a missing entry as a no-op
instead of raising.
2026-08-02 23:23:53 +08:00
YueGuobin 1eeee024bd marker: rework pause/resume from project-wide to per-definition
The project-wide mute (POST /markers/pause|resume + _markers_paused) paused
every marker with one button. The actual need is per-rule control: pause one
definition and toggle only its inherited global-{name} copies across all links.

- Drop project-level: _markers_paused (init/asdict/load/start_all), the
  pause_all/resume_all_markers methods, and the /markers/pause|resume routes.
- Add per-definition: a persisted `paused` flag on each definition;
  pause/resume_marker_definition fan out update_marker(enabled) to every
  global-{name} copy — instant, via the existing enable_packet_filter toggle
  (no NIO rebuild, pcap/emitted preserved). New links inherit a paused
  definition already off (inherit_marker passes enabled=not paused).
- start_marker takes an enabled kwarg; update_marker's enabled-only short-circuit
  now also covers inherited copies so def pause/resume is instant.
- Routes: POST /marker-definitions/{name}/pause|resume.
- Docs + tests updated.
2026-08-02 22:46:33 +08:00
YueGuobin e97df86d96 marker: fix PUT marker with an enabled-only body (bpf no longer required)
update_marker reused MarkerCreate, whose bpf is required, so a partial PUT like
{"enabled": false} was rejected with 422 "bpf field required". Add a MarkerUpdate
schema with every field optional (bpf included; capture_node_id and name are
create-only/path-driven and omitted) and use it for the PUT route — partial
updates now validate cleanly.
2026-08-02 22:32:04 +08:00
YueGuobin f7d7ba165a marker: persist project-wide markers_paused to the .gns3 file
pause/resume was fire-and-forget: the controller sent marker pause/resume but
stored nothing, so the Web UI could only keep a local optimistic flag that was
lost on panel reopen. Treat the mute as a project-level config (like per-marker
enabled): record _markers_paused, persist it in the topology (asdict + load),
and echo it on the project object so the UI renders from server truth.

Because marker pause is a uBridge runtime flag that resets on node restart,
start_all re-applies the mute to freshly started uBridges after a project
reopen — a paused project stays paused across close/reopen.
2026-08-02 22:21:05 +08:00
YueGuobin 8ba950fa29 marker: document pause/resume and instant enabled toggle 2026-08-02 16:22:31 +08:00
YueGuobin 84179c239c marker: test enabled/pause/resume and instant toggle
- compute (test_base_node.py): set_marker_filter_state on/off command,
  marker pause/resume command, and apply issues enable_packet_filter off
  for a disabled marker (+ records the name->bridge map).
- controller (test_marker.py): _markers_for_node keeps disabled markers
  and carries enabled; update_marker enabled-only hits the toggle route
  (not NIO rebuild) while a bpf change still rebuilds; pause/resume fan
  out to capture nodes.
2026-08-02 16:19:20 +08:00
YueGuobin 3d06c4e22f marker: drive uBridge enabled/pause/resume in real time
Wire gns3-server to uBridge's real-time marker controls (contract
../ubridge/doc/gns3server-integration.md §3.2), in three layers:

A. enabled reaches uBridge — _markers_for_node no longer drops disabled
   markers controller-side; it carries `enabled` in the NIO spec. apply
   installs every marker then issues `enable_packet_filter … off` for the
   disabled ones (base_node bridge / iou iol_bridge; old-ubridge errors
   downgrade to a warning so a toggle can't break link create).

B. instant per-filter toggle — apply records name→bridge so a new
   `_ubridge_set_marker_filter_state` can flip a running filter with
   `enable_packet_filter on|off` (iou overrides for iol_bridge + bay/unit).
   Each marker-capable node type gains PUT /markers/{name}; update_marker
   short-circuits to it when only `enabled` changes (no NIO rebuild, no pcap
   flush), falling back to reset+reapply if the route is unavailable.

C. global pause/resume — `_ubridge_marker_pause/resume` send `marker pause`
   / `marker resume` direct to the hypervisor (pause stops signal+pcap,
   resume instant, sink retained). Six node-type routes add POST
   /markers/pause|resume; project.pause_all/resume_all_markers fan out to
   each capture node (deduped, best-effort); REST exposes
   POST /projects/{id}/markers/pause|resume.

Toggling enabled and pause/resume are now both instant — only marker create
or a bpf change still go through reset+reapply.
2026-08-02 16:19:20 +08:00
YueGuobin 7368e4a65b marker: add direction-clear, routing, and ubridge transport tests
Close the test gaps surfaced in review:

- controller (test_marker.py): direction clear vs preserve, definition-sync
  clear propagation, pinned-marker NIO routing, _markers_for_node carrying
  direction, and non-capable capture-node rejection.
- ubridge (new tests/compute/ubridge/test_hypervisor.py): unix/tcp __init__
  branches + socket-dir perms, _build_command -U/-H/debug, endpoint, stop
  socket unlink, and start() immediate-exit fail-fast.
- mcp (test_handlers.py): TestLinkMarker / TestMarkerDefinition covering
  direction tri-state (both/tx/omitted) for create and update.
2026-08-02 11:37:49 +08:00
YueGuobin 37cb9f0a9c marker: support clearing direction via explicit null / "both"
direction was settable but not clearable: once a marker or project-level
definition had direction=tx/rx, no update path could return it to "both
directions", and the definition-sync fan-out silently kept stale values on
every inherited copy.

Introduce a _UNSET sentinel (link.py) distinct from None so updaters can
tell "caller omitted direction" (preserve) from "caller passed None"
(clear). Thread it through UDPLink.update_marker and
Project.update_marker_definition; the two REST routes use Pydantic v2
model_fields_set to translate an explicit JSON null into the sentinel.

MCP follows with a "both" token: link_marker / marker_definition handlers
map direction="both" to a null in the REST body (tri-state: omit=preserve,
tx/rx=set, both=clear), and the tool descriptions/docstrings document it.

Backward compatible: omitting direction or passing tx/rx behaves exactly
as before; only an explicit null / "both" clears.
2026-08-02 11:37:49 +08:00
YueGuobin 71fa778d50 marker: let callers pin the capture node via capture_node_id
A marker is single-sided — only the chosen capture node's uBridge installs the
mark filter — and dir=tx|rx is interpreted from that node's perspective. Until
now the observer was always auto-picked (_choose_marker_side), so dir=tx meant
"the auto-chosen endpoint is sending", which is unpredictable and makes the
direction filter hard to render meaningfully in the Web UI.

Add an optional create-only capture_node_id to MarkerCreate: when set, the
marker is pinned to that endpoint's uBridge (validated as a link endpoint and a
marker-capable type); when omitted, behavior is unchanged (auto-pick). The
chosen id is already echoed back as capture_node_id and in MARK signals, so the
UI can always render the observer regardless of who picked it.

capture_node_id is create-only (changing it would silently flip the meaning of
stored direction; recreate instead) and is not accepted on project-level
definitions — they are link-agnostic and have no endpoints, so inherited
markers keep auto-picking per link.

Plumbed through REST create_marker, the MCP link_marker tool, and base
Link.start_marker. update_marker does not forward it.
2026-08-01 22:24:47 +08:00
YueGuobin 6749b872fa marker: forward dir= from ubridge and add per-marker direction filter
Direction field in marker.match events
=======================================

Read ubridge dir=<tx|rx> from MARK signal datagrams and forward it
as a "dir" key in the marker.match notification event.  The field is
additive -- older ubridge builds omit it and the parser leaves it null,
so consumers fall back to undirected rendering with no version coupling.
Semantics are relative to the capture node (the signal's node=<id>):
tx = capture node is sending (ingressed device-side NIO), rx = it is
receiving (ingressed link-side NIO).

Per-marker direction filter (opt-in, server-side pipeline)
==========================================================

Add a direction field to MarkerCreate and MarkerDefinitionCreate
schemas ("tx" | "rx" | null).  Plumb it through the full pipeline:

  Schema -> controller (start_marker/update_marker, marker_entry,
  _markers_for_node, update_marker_definition sync)
  -> REST/MCP handlers -> compute _ubridge_add_marker_filter +
  IOU _ubridge_apply_markers -> bridge add_packet_filter dir <tx|rx>

When set, ubridge only fires the mark handler (signal + pcap) for
packets matching the chosen direction.  null (default/legacy) = both
directions -- zero behavioural change for existing markers.

Docs and tests
==============

- docs/features/marker-traffic-insight.md: signal format updated,
  new Direction section with NIO mapping, arrow mapping, and additive
  compatibility note.
- tests/compute/marker/test_marker_manager.py: 3 new parser tests
  (dir tx/rx/absent) plus existing test extended to assert dir=None.

13 files, +123/-22, 72 tests pass (zero breakage)
2026-08-01 14:52:07 +08:00
YueGuobin d729f76856 Name AF_UNIX sockets by node id for self-describing debuggability
Use the node id (UUID) instead of an incrementing counter for the unix
control socket name, so each socket identifies its owning node at a glance
(one ubridge per node => node_id is unique). Falls back to the counter only
when no node id is supplied. A single UUID fits sun_path's 107-byte cap
(~69 bytes), so no project_id is needed.
2026-07-31 23:48:07 +08:00
YueGuobin 2488c42cd4 Detect unsupported -U flag and fail fast with a clear error
start() now checks whether ubridge exited immediately after launch. An
old ubridge build that does not understand -U exits with a non-zero code
right away; surface the reason from ubridge.log instead of waiting for
connect() to time out 10s later with a confusing "couldn't connect" error.
2026-07-31 22:40:38 +08:00
YueGuobin 3d3e20f69e Add configurable uBridge control channel transport (tcp/unix)
Add ubridge_control_transport to [Server] config (default "tcp", fully
backward compatible). Selecting "unix" switches the uBridge hypervisor
control channel from the unauthenticated TCP listener (-H) to an AF_UNIX
socket (-U) authenticated in-kernel via SO_PEERCRED.

- UBridgeHypervisor: supports both socket_path (AF_UNIX) and host/port
  (TCP); a new `endpoint` property unifies log/error strings for both
- Hypervisor: unix mode allocates a short socket path under a 0700
  private runtime dir and unlinks it on stop; tcp mode restores the
  original getaddrinfo ephemeral-port allocation
- base_node: reads the transport from config and passes host through
- schemas/config.py + config_samples/gns3_server.conf: new option

Default deployments are unchanged. "unix" requires a ubridge build that
understands -U.
2026-07-31 22:27:16 +08:00
Jeremy Grossmann d2f73cae28 Merge pull request #2842 from GNS3/release/v2.2.61
Release v2.2.61
2026-07-30 19:15:25 +02:00
grossmj 8c0150cd62 Development on 2.2.62.dev1 2026-07-30 19:11:11 +02:00
grossmj da2942c139 Release v2.2.61 2026-07-30 12:53:08 +02:00
grossmj 5485eef3ad Sync appliances 2026-07-29 18:52:23 +02:00
Jeremy Grossmann ccf4b3f9db Merge pull request #2840 from GNS3/fix-unvalidated-symlink
Fix unvalidated symlink creation in import_project
2026-07-29 18:51:21 +02:00
grossmj b797981a65 test: add tests for unvalidated symlink creation in import_project 2026-07-29 18:48:31 +02:00
grossmj a225622a6e fix(import): unvalidated symlink creation in import_project 2026-07-29 18:10:52 +02:00
Jeremy Grossmann 3f19ede8d2 Merge pull request #2839 from GNS3/bugfix/2838
Fix addition of QEMU RNG device in 2.2.60 causes interface names to change
2026-07-29 18:00:16 +02:00
Jeremy Grossmann 668169d1cc Merge branch '2.2' into bugfix/2838 2026-07-29 17:55:53 +02:00
grossmj 66b39f0616 Merge remote-tracking branch 'origin/master' into 2.2 2026-07-29 17:54:18 +02:00
Jeremy Grossmann 7efef28d4f Merge branch '2.2' into bugfix/2838 2026-07-29 17:50:01 +02:00
grossmj d9140d2f8c fix(qemu): move the bios options after the network ones 2026-07-29 17:47:03 +02:00
grossmj e2657febf0 fix(qemu): fix addition of QEMU RNG device causes interface names to change 2026-07-29 17:23:28 +02:00
Jeremy Grossmann d161f1997d Merge pull request #2837 from my-code-is-grey/ghcr_lowercase
fix: lowercase GHCR image name in docker-build workflow
2026-07-28 17:28:41 +02:00
my-code-is-grey 37490f2c74 bugfix: docker workflow needs lowercase name 2026-07-27 22:27:48 -04:00
Jeremy Grossmann 9b1d7d44bf Merge pull request #2836 from iskanred/bugfix/2835
fix(qemu): remove trailing space from RNG object argument
2026-07-27 20:42:29 +02:00
Iskander Nafikov 9562c9d828 fix(qemu): remove trailing space from RNG object argument 2026-07-28 00:27:55 +08:00
Jeremy Grossmann deba9f8409 Merge pull request #2834 from yueguobin/mcp-tool-descriptions-enhancement
Improve MCP tool descriptions and add traffic-insight marker tools
2026-07-26 19:09:05 +02:00
Jeremy Grossmann 6c2a980afc Merge pull request #2833 from Sanjays2402/fix/delete-project-does-not-start-nodes
Do not start nodes when deleting a project
2026-07-26 09:23:12 +02:00
YueGuobin 309d388b0b Add MCP tools for traffic-insight marker feature
Add 2 new MCP tools to expose the marker (traffic-insight) REST API:

- link_marker: per-link marker CRUD (create/update/delete)
  POST/PUT/DELETE /projects/{pid}/links/{lid}/markers
- marker_definition: project-level marker definition CRUD (create/update/delete/list)
  POST/PUT/DELETE/GET /projects/{pid}/marker-definitions
  Create auto-fans out global-{name} to every link

Read operations use existing link_get (returns markers dict).
2026-07-26 13:01:06 +08:00
YueGuobin a8c6546c44 Improve MCP tool descriptions for link_update, device_show_run, and link_reset
- link_update: add bidirectional filter effect note, packet loss formula
  (packet_loss [50] ≈ 75% observed), filter clearing syntax (filters: {}),
  and ARP-also-filtered warning with static ARP recommendation
- device_show_run: add prerequisite section — device_type:<type> tag
  required, Docker/Linux nodes unsupported (use node_console)
- link_reset: clarify that filter state machines (e.g. frequency_drop
  counters) restart while filter configuration is preserved
2026-07-26 12:50:14 +08:00
Sanjay Santhanam 00ac2c19bd Do not start nodes when deleting a project
Project.delete() calls open() to rebuild the internal data structures
needed for cleanup. open() schedules start_all() when the project has
auto_start enabled, so deleting an auto-start project actually launched
every node process, allocating ports and consuming resources, only for
close() to kill them moments later.

open() now takes an auto_start argument (default True, so normal opens
are unchanged) and delete() passes auto_start=False.

Fixes #2784
2026-07-25 20:00:43 -07:00
Jeremy Grossmann 6742d09a70 Merge pull request #2831 from Sanjays2402/fix/docker-stop-state-check
fix: correct always-true state check in DockerVM.stop()
2026-07-25 19:59:28 +02:00
Sanjay Santhanam 41e8777609 fix: correct always-true state check in DockerVM.stop()
The condition 'state != "stopped" or state != "exited"' is a tautology,
so the state check was a no-op and a stop request was sent even for a
container that had already exited.

_get_container_state() never returns "stopped" (only "running",
"paused" or "exited"), so the intended negation of the condition used in
_fix_permissions() requires 'and', not 'or' (De Morgan's law).

Added a regression test asserting no stop query is issued for an
already-exited container.
2026-07-25 10:30:16 -07:00
Jeremy Grossmann 20868aa233 Merge pull request #2830 from rafael-33/master
docs: add structured bug-report template
2026-07-24 22:55:36 +02:00
rafael-33 27c6535ad0 add bug report issue template 2026-07-24 22:51:44 +02:00
Jeremy Grossmann f1be5eae9b Merge pull request #2829 from cristian-ciobanu/docker-pull-image
Add controller and compute API support for explicitly pulling or updating Docker images
2026-07-24 20:14:55 +02:00
Cristi 2abc7e09a3 Adds controller and compute API support for explicitly pulling or updating Docker images. 2026-07-24 16:40:20 +03:00
Jeremy Grossmann 28f883b46a Merge pull request #2828 from GNS3/set-ulimit-pytest
feat(tests): increase maximum open file descriptors for test runs on Unix
2026-07-23 18:05:19 +02:00
grossmj c010be1a02 feat(tests): increase maximum open file descriptors for test runs on Unix 2026-07-23 18:00:11 +02:00
Jeremy Grossmann 2b949b1a77 Merge pull request #2826 from cristian-ciobanu/iol-l1-keepalive
(feat): Implement functional Layer 1 keepalive support for IOU/IOL nodes
2026-07-22 18:10:42 +02:00
Cristian Ciobanu ac003c0a71 Merge branch 'GNS3:master' into iol-l1-keepalive 2026-07-22 11:50:09 +03:00
Cristi dd497e4308 (feat): Implement functional Layer 1 keepalive support for IOU/IOL nodes 2026-07-22 10:47:09 +03:00
grossmj 7bc9ae4aa8 Fix typo with ovmf_firmware_dir 2026-07-21 17:34:05 +02:00
grossmj 1f6e00d29f Fix issues after merging 2026-07-21 17:20:46 +02:00
grossmj 0091f2c64a Merge remote-tracking branch 'origin/3.1' into 3.1 2026-07-21 17:04:35 +02:00
grossmj 7487ec14e0 Merge branch '2.2' into 3.1
# Conflicts:
#	CHANGELOG
#	conf/gns3_server.conf
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/import_project.py
#	gns3server/crash_report.py
#	gns3server/version.py
2026-07-21 17:03:00 +02:00
Jeremy Grossmann e90f250294 Merge pull request #2823 from yueguobin/feature/cloud-node-interface-refresh
fix(controller): refresh cloud/nat node interfaces from compute on GET, plus NAT interface info
2026-07-19 12:49:07 +02:00
YueGuobin 977d9628e5 fix(builtin): hide GNS3 internal bridge interfaces from Cloud node
Filter out host interfaces whose name starts with 'gns3' (e.g.
EthernetSwitch kernel bridges) from Cloud.asdict() interfaces list.
Other special interfaces (virbr0, docker0, etc.) remain visible.
2026-07-19 18:21:22 +08:00
YueGuobin 4943567962 feat(builtin): NAT node returns its interface IP info in asdict()
NAT now includes an 'interfaces' field in its response, filtered to
contain only the mapped NAT interface (virbr0 on Linux, vmnet8 on
macOS/Windows). This lets connected nodes discover the NAT subnet
and gateway address without needing to list all host interfaces.

The field format mirrors Cloud.asdict(): name, type, special, and
ip_addresses list (both IPv4 and IPv6).
2026-07-19 18:10:51 +08:00
YueGuobin ddf7d4ca60 fix(controller): refresh cloud/nat node interfaces from compute on GET
Cloud and NAT nodes need live host network interface data. Previously,
GET /projects/{project_id}/nodes/{node_id} returned cached properties
from creation time, so newly added host interfaces (e.g. kernel bridges
created by EthernetSwitch nodes) were invisible until the node was
deleted and recreated.

Now the controller fetches fresh data from the compute node before
returning the response, so host interface changes are reflected
immediately. Falls back to cached data if compute is unreachable.
2026-07-19 17:41:37 +08:00
Jeremy Grossmann e1b09e683e Merge pull request #2822 from yueguobin/feature/ethernet-switch-ubridge-brctl
POC: migrate builtin EthernetSwitch from Dynamips ethsw to ubridge brctl
2026-07-17 23:49:01 +02:00
YueGuobin 7c320d6100 docs: add builtin Ethernet Switch uBridge brctl implementation document 2026-07-18 01:27:53 +08:00
YueGuobin 18a123e0b9 refactor(builtin): use deterministic bridge name from switch UUID
Replace psutil.net_if_addrs() scan with a deterministic name derived from
the switch's node UUID: gns3 + first 6 hex chars (10 chars, fits kernel
IFNAMSIZ limit of 15). Taps: <bridge>-<port> (12-13 chars).

Crash recovery: brctl delete the bridge first (best-effort), then create
fresh. Stale bridges from abnormal gns3server shutdown are automatically
reclaimed on the next start — no EEXIST or leaked interfaces.

Remove _free_iface helper and psutil import (no longer needed).
2026-07-18 01:18:32 +08:00
YueGuobin aabbee3a04 fix(builtin): bring kernel bridge UP after creation
brctl create leaves the bridge administratively DOWN. Add link set up
so the bridge actually forwards frames between enslaved ports.

Also record Docker iptables FORWARD DROP pitfall in project memory.
2026-07-18 01:11:25 +08:00
YueGuobin fd4ac4460d feat: migrate builtin EthernetSwitch from Dynamips ethsw to ubridge brctl
Replace the builtin EthernetSwitch stub with a Linux kernel bridge backed
by uBridge's brctl module. Each switch node creates one kernel bridge
(gns3br{N}) with VLAN filtering; each port is a persistent TAP enslaved to
the bridge, relayed by a per-port uBridge bridge (nio_tap <-> nio_udp).

- Access/dot1q/qinq port modes translated to brctl vlan primitives
- Compute router repointed from Dynamips to Builtin manager
- Tests updated: 21 router-level tests + 215 surrounding tests pass
- Real-kernel e2e verified: access 100 PVID untagged, dot1q trunk
  VIDs 1-4094 + native 1, qinq 802.1ad proto + 200 PVID

Ethertype 0x9100/0x9200 handling and port-count guard relaxation are
deferred pending resolution.
2026-07-18 00:21:19 +08:00
Jeremy Grossmann 22a1026633 Merge pull request #2821 from yueguobin/fix/mcp-remove-node-reload
fix(mcp): remove unreliable node_reload / node_reload_all tools
2026-07-16 12:51:29 +02:00
YueGuobin 37867a1e44 fix(mcp): remove unreliable node_reload / node_reload_all tools
For Docker nodes, reload bottoms out as a raw POST /containers/{id}/restart
to the Docker daemon, bypassing GNS3's start/stop lifecycle (uBridge
re-attach, console servers, NIC setup). The container restarts at the
Docker level but GNS3's plumbing goes out of sync, and the daemon call can
block up to the controller's 240s timeout — manifesting as "reload hangs /
no response". stop+start runs the full lifecycle and is reliable.

Remove the node_reload and node_reload_all MCP tools (tool functions,
handlers, NODE_TOOLS entry, tests, docs). The underlying REST endpoints
(POST /nodes/{id}/reload, POST /nodes/reload) are kept for native API
users. MCP callers should use node_stop + node_start (partial) or
close/open project (full restart) instead.
2026-07-16 13:27:21 +08:00
Jeremy Grossmann 013ca442f4 Merge pull request #2816 from yueguobin/feature/traffic-insight-markers
feat: add traffic-insight markers (ubridge mark filter integration)
2026-07-15 22:12:11 +02:00
grossmj c75e1ba0be Development on 2.2.61.dev1 2026-07-15 20:45:33 +02:00
Jeremy Grossmann c1e845cb22 Merge pull request #2819 from GNS3/release/v2.2.60
Release v2.2.60
2026-07-15 20:44:04 +02:00
Jeremy Grossmann 3954d6477a Merge pull request #2817 from yueguobin/fix/mcp-rbac-token-hardening
fix: thread token_version through MCP token minting and guard websocket auth failure
2026-07-15 19:20:44 +02:00
Guobin Yue 64da926d2f Merge branch '3.1' into fix/mcp-rbac-token-hardening 2026-07-16 01:03:11 +08:00
Guobin Yue 2e9073be39 Merge branch '3.1' into feature/traffic-insight-markers 2026-07-16 01:03:06 +08:00
Jeremy Grossmann 3e12ddf321 Merge pull request #2818 from yueguobin/docs/api-testing-skill
docs: add a Claude Code skill with curl patterns for testing the REST API
2026-07-15 18:57:19 +02:00
YueGuobin dc7f5d76f4 docs(api-testing): add curl-based GNS3 API testing skill 2026-07-16 00:54:33 +08:00
YueGuobin 884c40038c docs(mcp): note --no-close for node_console websocat usage
A heredoc (<<<) closes stdin at once, so websocat dropped the WebSocket
before the device's reply arrived. Add --no-close to the node_console usage
examples and the returned command field so the connection stays open while
output is read.
2026-07-16 00:51:45 +08:00
YueGuobin d4389b7068 fix(rbac): guard None current_user on websocket auth failure
get_current_active_user_from_websocket returns None after closing the socket
on an auth failure (revoked token, bad credentials, inactive user).
has_privilege_on_websocket dereferenced current_user.is_superadmin without a
None check, so any websocket auth failure surfaced as an AttributeError
traceback instead of a clean close. Bail out early when current_user is None,
mirroring the guard already present in ws_console.
2026-07-16 00:51:45 +08:00
YueGuobin 3d6d9a3396 fix(mcp): thread token_version into console/download token minting
Token revocation is a strict version check (token_data.token_version !=
user.token_version). create_access_token defaults token_version to 0, so the
short-lived JWTs minted for the console WebSocket URL (nodes) and the download
URLs (symbols, links) carried ver=0. Any user who had logged out at least once
(token_version >= 1, e.g. the default admin) got tokens rejected as "revoked"
on first use.

e433991cf fixed this in _resolve_token's API-key branch but missed these three
independent minting sites. Now resolve token_version during _resolve_token (the
JWT branch decodes it, the API-key branch reads user.token_version), carry it
through gns3_ctx, and pass it at every minting call.
2026-07-16 00:51:45 +08:00
YueGuobin 89e11d265f fix(mcp): pass user.token_version when generating temp JWT from API key
_resolve_token generated a temp JWT with a hardcoded ver=0 after
validating the API key. Users who had logged out at least once
(token_version >= 1) would hit "Token has been revoked" 401 on
every MCP tool call, because the REST auth chain rejects ver=0
when the user's token_version no longer matches.

Fix: pass the user's actual token_version to create_access_token
so the temp JWT carries the correct ver claim.
2026-07-16 00:51:45 +08:00
YueGuobin 45d18de8af fix(marker): avoid reentrant-lock deadlock when uBridge starts lazily
_start_ubridge configures the marker sink via _ubridge_configure_marker_sink, which used _ubridge_send. But _start_ubridge itself is reached THROUGH _ubridge_send when uBridge is started lazily — e.g. linking a stopped node. _ubridge_send's @locking lock (___ubridge_send_lock) is non-reentrant, so the nested _ubridge_send('marker sink') deadlocked forever, making the NIO create POST time out after 120s. Started nodes never hit this (uBridge already running, no _start_ubridge), so only stopped-node links (notably dynamips) hung.

_ubridge_configure_marker_sink now talks to self._ubridge_hypervisor.send directly: it runs inside _start_ubridge right after connect(), so uBridge is already up and the raw send is safe, with no reentrant lock acquisition.
2026-07-16 00:39:52 +08:00
YueGuobin 08f4b5ae0d docs(marker): document per-link attribution and IOU multi-interface
Add a Per-link attribution section (link field semantics, pcap path keyed on link) with an IOU subsection explaining the shared IOL-BRIDGE and per-port filter lists. Note that the marker.match link_id comes from the signal link= field, and call out shared capture-side node behavior in Notes.
2026-07-16 00:39:52 +08:00
YueGuobin 794bfef450 fix(marker): per-link attribution via link field in MARK signals
A uBridge MARK signal carries only node= and filter= (no bridge/link field), so when one node is the capture side for several links that share a marker name (always the case for global-{name} definitions on a multi-interface node) the signals were indistinguishable and the (node, filter) registry collapsed them to a single link.

The mark filter is now stamped with its link id (mark <bpf> ... link <link_id>); uBridge echoes it verbatim (link=<link_id>) and the listener uses the signal's link= as the authoritative link_id of the marker.match event, falling back to the registry only for legacy signals without it. base_node and iou apply paths pass link_id; covered by two new listener tests.
2026-07-16 00:39:52 +08:00
YueGuobin 27356da62d fix(marker): set nio.markers on iou/dynamips/cloud nio update
The PUT /nio (update) endpoints for iou, dynamips and cloud copied nio.filters from the request body but never copied nio.markers. So adding a marker (e.g. a project-level global definition) to an already-created link of these node types left nio.markers empty: no mark filter was installed on uBridge and no marker.match signal was emitted. vpcs/qemu/docker already set it; mirror them (getattr for the Union NIO types).
2026-07-16 00:39:52 +08:00
YueGuobin a732d8d521 test(marker): include marker_definitions in project-asdict expectations
project.asdict() and project_to_topology() gained a marker_definitions key.
Two tests that assert exact dict equality needed the new field.
2026-07-16 00:39:52 +08:00
YueGuobin 213738f0a5 test(marker): add controller + API route tests for traffic-insight
19 controller-layer tests covering start/stop/update_marker (storage,
inheritance guards + bypasses, partial-update preservation of render
hints), project-def CRUD (fan-out, sync, delete-cleanup regression),
apply_defs_to_new_link, persist_markers/asdict, and aggregation.

15 API-route tests covering per-link create/update/delete (201/200/204),
global-prefix rejection on create (409 regression), bad-format rejection
(422), PUT/DELETE-on-inherited guard (409 regression), project-def CRUD
endpoints, and the aggregation view.

All 34 tests pass when run as part of the full suite.
2026-07-16 00:39:52 +08:00
YueGuobin cbb4854d3d docs(marker): add traffic-insight feature documentation
Document the marker feature following the gns3-documentation standard:
overview, Mermaid architecture and business-process diagrams, API endpoint
tables, request/response and field reference, error responses, and notes
covering the key design points — immutable name (rename = delete + create),
global-prefix reservation, read-only inherited markers, render hints
(color / highlight_duration), supported node types, and persistence.

Indexed under Features in docs/README.md.
2026-07-16 00:39:52 +08:00
YueGuobin b21780605e fix(marker): reject reserved global-prefix names only on create
The global-prefix reservation belongs on the create path, where it keeps
user-chosen names disjoint from inherited global-{name} markers. It was
implemented as a field_validator on MarkerCreate / MarkerDefinitionCreate,
which also back the PUT update bodies — so updating an inherited marker
while echoing its name in the body tripped the validator with a generic
422 before the controller could return the actionable 409 ("inherited,
use the marker-definitions API").

Drop the schema validators and enforce the prefix in the two create routes
(ControllerError -> 409). PUT no longer validates the body name (ignored
anyway — the target is the {name} path param), so editing an inherited
marker now reaches the controller's inheritance guard and returns the
clear 409. The name-format regex stays on the schema (still 422).
2026-07-16 00:39:52 +08:00
YueGuobin cdc27c37a7 fix(marker): clean inherited markers on def delete
delete_marker_definition removed the def but left the inherited global-*
copies on every link: it called stop_marker(), which rejects inherited
markers (409), and the ControllerError was swallowed as a warning. The
orphaned copies were in-memory only (_persist_markers filters inherited
markers) so a restart hid the symptom, but during a running session they
were undeletable via either the per-link or project API.

Add the same inherited=True bypass that update_marker already has, and
pass it from the def-delete fan-out so the copies are removed for real.
2026-07-16 00:39:52 +08:00
YueGuobin 98bcd5eddd feat(marker): add highlight_duration render hint
Per-marker UI hint (milliseconds, ge=1) for how long the Web UI keeps a
marker highlighted after a match. Mirrors color: stored on the link,
persisted in the topology, inherited via project-level definitions, and
never sent to uBridge. Omitted = null = frontend uses its own default.

The default is intentionally NOT set in the schema: MarkerCreate also
backs PUT updates, so a schema default would make every partial update
silently reset the value. None means "not provided" (keep existing on
update / frontend decides on create).
2026-07-16 00:39:52 +08:00
YueGuobin 179f072c33 fix(marker): fix inheritance hook, topology load, update sync, and asdict
Bugs found via end-to-end testing of project-level marker definitions:

1. New links didn't inherit — apply_defs_to_new_link is async but was
   called without await in UDPLink.create().

2. Project load crashed — load_project passed marker_definitions to
   Project.__init__. Now popped in load_project and restored separately
   in Project.open() (it backs a read-only property).

3. PUT on a definition didn't sync to links — update_marker's guard
   rejected even the project-layer sync call. Added an `inherited`
   bypass flag used by update_marker_definition.

4. _ubridge_add_marker_filter raised re.PatternError — the name regex
   used (?i)(?!global) look-around, invalid in Python's re module.
   Dropped the prefix check there: "global-*" names are legitimate at
   the uBridge boundary (inherited definitions); forbidden only at the
   user-facing schema.

5. GET /links hid inherited markers — asdict()'s runtime branch used
   _persist_markers() (which filters inherited markers). Restored
   self._markers for the runtime branch; only the topology_dump branch
   filters (inherited markers are rebuilt from definitions on load).

6. Duplicate "already exists" warnings on project open — open() fanned
   out definitions to all links, but UDPLink.create() had already done
   so via its inheritance hook. Removed the redundant fan-out in open().
2026-07-16 00:39:52 +08:00
YueGuobin 84845f8504 fix(marker): export MarkerDefinitionCreate from schemas package 2026-07-16 00:39:52 +08:00
YueGuobin 686f96b748 fix(marker): replace pydantic lookahead pattern with field_validator
pydantic_core (Rust engine) does not support regex look-around.
Keep the character-class pattern for basic safety and enforce the
"global" prefix reservation via a field_validator instead.
2026-07-16 00:39:52 +08:00
YueGuobin 31991fe359 feat(marker): add project-level marker definition inheritance
Project-level marker definitions fan out to every link (existing and new).
A definition is stored once on Project._marker_definitions; when applied to
a link the marker is named "global-{def_name}" — the "global" prefix was
pre-reserved in the schema, so inherited and per-link markers can never
collide, nor will their registry keys.

Key behavior:
- POST /projects/{pid}/marker-definitions → fan out to all existing links
- PUT  /projects/{pid}/marker-definitions/{name} → sync all inherited copies
- DELETE → remove every inherited copy from every link
- New links auto-inherit all active defs (hook in UDPLink.create)
- Per-link DELETE/PUT of a "global-*" marker is rejected (409)
- Inherited markers are NOT persisted in the topology; they are re-created
  from _marker_definitions on project load
- Compute side is untouched — the marker reaches uBridge via the existing
  start_marker→update→NIO→ubridge pipeline

Files:
- controller/project.py — _marker_definitions + CRUD + fanout + topology load
- controller/link.py — Link.inherit_marker() + asdict() filter
- controller/udp_link.py — guards on stop/update + create() inheritance hook
- controller/topology.py — persist marker_definitions in project topology
- schemas/controller/links.py — MarkerDefinitionCreate schema
- api/routes/controller/projects.py — REST endpoints (marker-definitions)
2026-07-16 00:39:52 +08:00
YueGuobin 369badc6c2 fix(marker): reserve "global" name prefix for future marker inheritance 2026-07-16 00:39:51 +08:00
YueGuobin d3527c00de fix(marker): extend marker support to dynamips and cloud nodes
Dynamips needed its own NIO base class extended with a `_markers`
attribute and `markers` property (mirroring the existing `filters`
pattern), plus marker propagation from the controller-supplied NIO
settings through NIOUDP.create/update to the common destination
NIO that base_node._ubridge_apply_markers reads.

Cloud simply needed the missing _ubridge_apply_markers calls after
_ubridge_apply_filters in its two ubridge connection methods, same
pattern as the earlier docker fix.

Both types are now added back to _MARKER_CAPABLE_TYPES.
2026-07-16 00:39:51 +08:00
YueGuobin e4be98984c fix(marker): enable marker support for docker nodes
Docker's _connect_nio and adapter_update_nio_binding applied packet
filters but never called _ubridge_apply_markers, so markers silently
did nothing on Docker links despite docker being in the allowlist.
Add the missing calls (same pattern as the IOU fix).

Also narrow _MARKER_CAPABLE_TYPES to the four types that actually
implement marker support — vpcs, qemu, docker, iou — removing
dynamips, virtualbox, vmware, and cloud which have no marker pathway
and would silently fail when selected as the capture side.
2026-07-16 00:39:51 +08:00
YueGuobin f7fb43a4b9 fix(marker): tolerate port conflict on marker listener startup
When the configured marker_listen_port (default 3070) is already in
use, fall back to an OS-assigned port instead of crashing the server.
If even port 0 fails, log the error and continue without marker
signals — traffic insight degrades rather than taking down startup.
2026-07-16 00:39:51 +08:00
YueGuobin 7e4600b5a1 fix(marker): validate marker name and expose enabled via REST
Add a name pattern constraint to MarkerCreate schema (alphanumeric +
_.-) to prevent injection into uBridge commands, with a matching
defense-in-depth check in _ubridge_add_marker_filter for hand-edited
topology files. Also add the missing "enabled" field to MarkerCreate
and pass it through the PUT route so the documented toggle actually
works.
2026-07-16 00:39:51 +08:00
YueGuobin a495b5ddf2 fix(marker): uniquify auto-generated marker names per link
Auto-generating `marker-{link.id[:8]}` collided on the second anonymous
marker on the same link (start_marker rejects duplicate names). Append a
short uuid hex suffix so multiple anonymous markers coexist.
2026-07-16 00:39:51 +08:00
YueGuobin f2360f85fc feat(marker): add project-level marker aggregation endpoint
Add a read-only `markers` property on Project that flattens every link's
markers into a single dict keyed by "{link_id}/{name}", each entry
carrying the parent link_id and capture-side node_id. Expose it via
GET /projects/{pid}/markers (Project.Audit) so the frontend can fetch all
markers in one round-trip instead of enumerating links first.

Also surface a marker count in project.stats().
2026-07-16 00:39:51 +08:00
YueGuobin ab5b7444d4 feat(marker): add IOU node marker support via iol_bridge
IOU uses iol_bridge (not bridge) with extra bay/unit positional
arguments in add_packet_filter. Add _ubridge_apply_markers override
that mirrors the existing _ubridge_apply_filters pattern, called at
the same three sites: _networking, adapter_add_nio_binding, and
adapter_update_nio_binding.
2026-07-16 00:39:51 +08:00
YueGuobin c62b9b0283 refactor(marker): converge to filter single-path model, remove dual-apply endpoints
Markers now follow exactly the same apply pattern as packet filters:
state lives in Link._markers, application goes through NIO
(update() -> PUT /nio -> _ubridge_apply_markers). The former
immediate-apply REST endpoints (/markers/start, /markers/stop on
the compute side) and the per-node start_marker/stop_marker methods
are removed — they were a legacy of the original capture-inspired
design and have been superseded by the NIO flow.

Changes:
- controller/udp_link: start_marker/stop_marker/update_marker now
  set _markers state + call self.update() (mirrors update_filters).
  Removed _marker_capture_nodes runtime dict and its helpers.
- controller/project: _create_link_from_topology_data restores
  _markers directly from persisted data (with BPF validation,
  like filter reload). No long calls start_marker during load.
- compute: _ubridge_apply_markers swallows BPF compile errors
  (warn+skip), matching _ubridge_apply_filters behaviour so a
  single bad expression cannot break link creation / node restart.
- Removed: /markers/start,stop endpoints (6 handlers across
  vpcs/qemu/docker route files), node start_marker/stop_marker
  methods (3 VM files), _ubridge_delete_marker_filter,
  _marker_capture_nodes, MarkerDelete schema.

Net: ~280 lines of dead code removed; marker and packet filter now
share a single, unified apply path via the NIO.
2026-07-16 00:39:51 +08:00
YueGuobin 88c03d1431 fix(marker): restore markers from topology on project load
_create_link_from_topology_data now restores traffic-insight markers
(mirroring how filters are restored via update_filters), so markers —
including their color — survive project close/reopen and server restart.

Guard start_marker's uBridge POST with 'if self._created' (exactly as
update_filters guards its update() call): during project load the link
is not yet created, so only _markers state is recorded and the marker
is applied once via the NIO flow in create()/_ubridge_apply_markers —
no double application.
2026-07-16 00:39:51 +08:00
YueGuobin 3f15ac38f6 feat(marker): add optional color field to marker data model
Add a user-chosen hex color (e.g. '#ff5722') to each marker, stored in
Link._markers alongside bpf/tag/enabled. The color:

- Is serialized with the link (asdict) and persisted in the topology, so
  it survives project reload and is consistent across devices.
- Never reaches uBridge (compute ignores it) — it is purely a Web UI
  concern.
- Can be updated independently of the BPF (color-only changes skip the
  ubridge round-trip).

MarkerCreate schema gains color: Optional[str]; start_marker and
update_marker carry it through; REST create/update endpoints pass it.

The marker.match WebSocket event stays lean (no color) — the Web UI maps
filter -> color from the link state it already holds.
2026-07-16 00:39:51 +08:00
YueGuobin b8f49696cc fix(marker): use allowlist in _choose_marker_side, align with _get_filter_node
Replace the complex tier-based fallback (which leaked into unsupported
switch types on the final tiers) with a simple allowlist of
_MARKER_CAPABLE_TYPES, mirroring _get_filter_node in link.py.

Also accept stopped nodes — like packet filters, markers are stored on
the NIO and applied when the node starts via _ubridge_apply_markers.
2026-07-16 00:39:51 +08:00
YueGuobin 239f42f5aa fix(marker): stop auto-deleting markers on node stop in node_updated
Markers are persistent link-scoped features (like packet filters), not
transient runtime features (like capture).  Tearing them down on every
node stop breaks stop/start restore: the NIO-based re-application in
_ubridge_apply_markers works correctly on restart, but node_updated
was prematurely calling stop_marker which erased _markers state and
dumped an empty topology.

Now markers survive node stop transparently — the ubridge filter dies
with the process but is re-added from nio.markers in
add_ubridge_udp_connection when the node starts again, mirroring
exactly how packet filters behave.
2026-07-16 00:39:51 +08:00
YueGuobin 7c90fa9e64 fix(marker): ride markers on NIO so they survive node restart and project reload
Mirror the packet-filter lifecycle: marker specs now live on the NIO
(next to filters), ride in link_data from controller to compute on
every NIO create/update, and are reapplied by _ubridge_apply_markers
in add_ubridge_udp_connection (bridge creation / node restart) and
update_ubridge_udp_connection (NIO update — following the preceding
reset_packet_filters so markers survive filter changes).

Changes:
- NIO / NIOUDP: _markers property + asdict
- schemas/compute/nios.py: UDPNIO.markers field
- base_manager.create_nio: nio.markers from settings
- PUT /nio routes (vpcs/qemu/docker): nio.markers update
- base_node: _ubridge_apply_markers(bridge_name, nio) iterates
  nio.markers, computes pcap path, calls _ubridge_add_marker_filter
  + MarkerManager.register; called after _ubridge_apply_filters
- controller udp_link: _get_node_markers + _markers_for_node (route
  by capture_node_id); markers in create() and update() link_data
- /markers/start,stop endpoints: mirror spec onto nio.markers so
  the marker survives a subsequent node stop/start without a PUT
- tests: add markers field to NIO data expectations

This covers:
- Node restart: NIO persists, add_ubridge_udp_connection re-applies
- Filter update: reset wipes markers, _ubridge_apply_markers re-adds
- Project reload: create() carries markers in link_data → create_nio
- Immediate create: endpoint sets nio.markers immediately
2026-07-16 00:39:51 +08:00
YueGuobin 540e1c5678 config: set marker_listen_port default to 3070 and document in config templates
Change the marker UDP sink default from port=0 (OS-chosen) to 3070 for
predictable firewall/debugging/monitoring.

Add marker_listen_host and marker_listen_port with documentation to
config_samples/gns3_server.conf and scripts/gns3_server.conf.
2026-07-16 00:39:51 +08:00
YueGuobin 88465e872c fix(marker): add _choose_marker_side to exclude non-uBridge node types
_choose_capture_side prefers BUILTIN_NODE_TYPES which includes
ethernet_switch/ethernet_hub/NAT etc. — nodes that do not use uBridge
and therefore have no bridge for a marker filter to attach to.

Add _choose_marker_side with a _MARKER_UNSUPPORTED_TYPES blocklist
so marker capture-side selection skips NIO-only switches and picks
the uBridge-backed node (VPCS/QEMU/Docker/etc.) instead.

Verified end-to-end: PC1↔Switch↔PC2 links with arp markers correctly
pick VPCS nodes; MARK signals flow through to WebSocket and pcaps
are written.
2026-07-16 00:39:51 +08:00
YueGuobin d2e9823e6c feat: implement traffic insight marker backend (ubridge mark filter)
Add compute-side marker subsystem that receives ubridge UDP MARK signals
and forwards them as project-scoped notifications to the web UI for
real-time traffic coloring. Matched packets are always saved to per-link
pcaps for future replay.

Key components:
- gns3server/compute/marker/: MarkerManager (singleton, UDP listener +
  O(1) registry keyed by (node_id, filter_name)) + MarkerListener
  (DatagramProtocol parsing MARK lines per ubridge integration contract)
- gns3server/compute/base_node.py: marker sink/node config at ubridge
  startup; shared _ubridge_add_marker_filter / _ubridge_delete_marker_filter
- Per-node start_marker/stop_marker: VPCS (VPCS-{id}), QEMU
  (QEMU-{id}-{adapter}), Docker (bridge{adapter})
- Compute REST /markers/start + /markers/stop (vpcs/qemu/docker route files)
- Controller Link._markers state + UDPLink.start_marker/stop_marker/
  update_marker (mirror capture pattern: BPF validation, _choose_capture_side,
  node.post forwarding, topology persistence)
- Controller REST GET/POST/DELETE/PUT /v3/projects/{p}/links/{l}/markers
- Config: marker_listen_host / marker_listen_port in ServerSettings
- Signal routing: creation-time registry O(1) lookup, no node-table scan;
  project-scoped WS stream (not global); event payload always carries
  project_id for frontend scoping

Tests: 14 unit tests (registry, listener parsing, UDP round-trip);
562 existing tests pass with zero regressions.
2026-07-16 00:39:51 +08:00
grossmj 803cc17410 Release v2.2.60 2026-07-15 18:36:26 +02:00
grossmj f088c55cfe Sync appliances 2026-07-15 18:32:12 +02:00
Jeremy Grossmann 8a8864c90b Merge pull request #2814 from GNS3/bugfix/2783
fix(import): project import does not move images symlinks into place
2026-07-15 09:53:15 +02:00
grossmj 1986bce538 Only set IOU images to be executable when importing images 2026-07-15 09:43:34 +02:00
grossmj c528d2cd95 fix(import): project import does not move images symlinks into place 2026-07-13 18:19:52 +02:00
Jeremy Grossmann 7529ee4168 Merge pull request #2813 from GNS3/uefi-improvements
UEFI improvements for Qemu VMs
2026-07-13 12:05:07 +02:00
grossmj 61c7f4469d Search for system UEFI that is compatible with Python < 3.12 2026-07-13 11:34:29 +02:00
grossmj 896b4fc56a UEFI improvements for Qemu VMs
* Add OVMF firmware directory configuration
* Automatically add a Random Number Generator (RNG) device when using uefi option is enabled
2026-07-13 11:08:17 +02:00
grossmj a58fa8602b remove wrongly merged code 2026-07-13 10:05:01 +02:00
YueGuobin d8f8b6ec70 fix(docker): handle container name conflict automatically
When a Docker container with the same name already exists (e.g., from a
   previous crashed GNS3 session), Docker returns a 409 Conflict error
   when trying to create a new container with that name. This causes the
   project open operation to fail.

   This fix adds automatic cleanup of stale containers when encountering
   a name conflict:
   - Added DockerHttp409Error exception class
   - Updated http_query to detect 409 status codes
   - Modified create() to remove conflicting containers and retry

   Fixes the issue where opening a project fails with:
   "Docker has returned an error: 409 Conflict. The container name
   '/GNS3.xxx' is already in use by container 'xxx'"
2026-07-13 09:57:55 +02:00
grossmj 01d72aed9a Merge branch '2.2' into 3.1
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/project.py
2026-07-13 09:32:07 +02:00
Jeremy Grossmann b256d5a5f6 Merge pull request #2812 from GNS3/bugfix/2788
fix: gns3-server crashes on startup if "Open this project in the background" is active but there is a problem with that project
2026-07-12 13:50:11 +02:00
grossmj ea09cc2724 fix: gns3-server crashes on startup if "Open this project in the background" is active but there is a problem with that project 2026-07-12 13:46:12 +02:00
grossmj e3e0a511b6 Handle HTTPNotFound exception when retrieving compute status 2026-07-12 11:08:13 +02:00
grossmj 0ecaab4da0 Replace ControllerForbiddenError with aiohttp.web.HTTPForbidden for project deletion error handling 2026-07-12 11:05:15 +02:00
YueGuobinandClaude Opus 4.6 40644f33e6 Fix: Check compute connectivity before open() during project deletion
Previously the disconnected compute check ran after open(), which would
block for 120s trying to connect to unreachable remote computes before
rejecting the deletion. Now reads the topology file directly to extract
compute IDs and checks connectivity before calling open(), enabling
immediate rejection of deletions involving offline computes.

Also removes the redundant post-open() check since the early check
covers both opened and closed project states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-12 10:57:56 +02:00
grossmj a9cce209d7 Development on 3.1.0.dev5 2026-07-10 10:01:35 +02:00
Jeremy Grossmann 94a131dab3 Merge pull request #2810 from yueguobin/feature/cloud-host-interface-ip-addresses
Expose full host interface IP addresses and link state in cloud node API
2026-07-10 09:19:54 +02:00
YueGuobin 0ed1715fe6 Use typed InterfaceStatus enum and simplify stats fallback in interfaces()
- Change `status: str` to `status: InterfaceStatus` (str Enum) in the
  HostInterface schema, matching the existing IPAddressFamily pattern.
- Use default-then-override pattern in interfaces() to eliminate the
  `else` branch and deduplicate defaults.
2026-07-10 14:55:21 +08:00
YueGuobin 9721660cc3 Expose full interface address list and link state in cloud node API
Each host interface surfaced by the cloud node now reports:
- ip_addresses: every IPv4 and IPv6 address (previously only a single
  IPv4 was collected internally and then dropped before the response)
- status / speed / mtu / flags: operational state and link attributes
  sourced from psutil.net_if_stats(), with flags normalized to a list

The legacy ip_address / netmask / mac_address fields are preserved so
existing callers (compute link detection, GNS3 VM, VMware, has_netmask)
keep working. The new fields travel through the existing interfaces
payload that the controller forwards verbatim, so no controller-side
change is required and the PUT / ports_mapping flow is unaffected.
2026-07-10 13:56:07 +08:00
grossmj a66740e154 Add script to create and push annotated git tags from version.py 2026-07-09 11:02:33 +02:00
grossmj 913d021705 Release v3.1.0a4 2026-07-09 10:40:38 +02:00
grossmj d64fdd71a9 Bundle web-ui v3.1.0a4 2026-07-09 08:40:05 +02:00
Jeremy Grossmann bdd73be6d6 Merge pull request #2808 from yueguobin/docs/jwt-refresh-token-config-example
Add jwt_refresh_token_expire_minutes to sample configuration
2026-07-09 08:34:25 +02:00
Guobin Yue 61ce59788b Merge branch '3.1' into docs/jwt-refresh-token-config-example 2026-07-09 14:19:14 +08:00
YueGuobin cccc3e5b77 Add jwt_refresh_token_expire_minutes to sample configuration
The sample gns3_server.conf documented jwt_access_token_expire_minutes but omitted jwt_refresh_token_expire_minutes (default 43200 minutes, 30 days) defined in ControllerSettings. Add it for parity with the schema.
2026-07-09 14:15:49 +08:00
grossmj 6fba497734 Remove deleted web-ui files from git 2026-07-08 22:40:27 +02:00
grossmj 54540e7ef7 Merge remote-tracking branch 'origin/3.1' into 3.1 2026-07-08 21:49:20 +02:00
grossmj 5992a284c9 Bundle web-ui v3.1.0a4 2026-07-08 21:48:48 +02:00
grossmj a2ee5389af Bundle web-ui v3.1.0a4 2026-07-08 20:11:59 +02:00
grossmj 4548d9053a Sync appliances 2026-07-08 18:45:07 +02:00
grossmj 2d3bb89e58 Merge remote-tracking branch 'origin/2.2' into 3.1 2026-07-08 10:33:00 +02:00
grossmj 809d4cc609 Merge branch 'master' into 2.2
# Conflicts:
#	.github/workflows/docker-build.yml
2026-07-08 10:30:53 +02:00
Jeremy Grossmann 89e4e836c9 Merge pull request #2806 from my-code-is-grey/2798-dockerhub
#2798 - DockerHub adjustments
2026-07-08 05:17:04 +02:00
my-code-is-grey 69ddcf553f .dockerignore ignore .dockerignore 2026-07-07 22:37:24 -04:00
my-code-is-grey 1e1ec5aae8 typo made me reconsider and move out to env 2026-07-07 21:58:49 -04:00
my-code-is-grey e30e6435ca defaulted DOCKERHUB_ORG repository variable 2026-07-07 21:48:13 -04:00
my-code-is-grey 77700f361c 2798 2026-07-07 01:30:58 -04:00
grossmj e3e3a7e729 Update fastapi to v0.139.0 2026-07-06 19:21:56 +02:00
grossmj 6415d2e56c Update dependencies 2026-07-06 19:06:25 +02:00
grossmj 424ae55c38 Revert "Update dependencies"
This reverts commit b6793a50f3.
2026-07-06 18:38:48 +02:00
grossmj b6793a50f3 Update dependencies 2026-07-06 18:31:52 +02:00
grossmj 562108748a Remove API docs from 2.2 after merging 2026-07-06 18:17:00 +02:00
grossmj d54b16df53 Merge branch '2.2' into 3.1
# Conflicts:
#	gns3server/handlers/api/controller/template_handler.py
#	tests/handlers/api/controller/test_template.py
2026-07-06 18:13:17 +02:00
Jeremy Grossmann ad4aa1d49b Merge pull request #2803 from GNS3/update-ga-workflows
Update GitHub Actions workflows
2026-07-06 18:10:17 +02:00
grossmj 8499ed3d65 Update GitHub Actions workflows 2026-07-06 18:05:28 +02:00
Jeremy Grossmann a0ca8761c0 Merge pull request #2802 from yueguobin/fix-web-wireshark-docker-xpra6.x
Fix web-wireshark docker build broken by xpra 6.5 release
2026-07-06 17:32:31 +02:00
Guobin Yue 277640a335 Merge branch '3.1' into fix-web-wireshark-docker-xpra6.x 2026-07-06 13:35:44 +08:00
YueGuobin f5a72532ac Fix web-wireshark docker build broken by xpra 6.5 release
Replace the `xpra=6.4*` version clamp on the apt-get install command
line with APT pinning via /etc/apt/preferences.d/pin-xpra.

The previous specifier stopped resolving once xpra 6.5 was released:
the xpra metapackage was pinned to 6.4 while its sub-packages
(xpra-client, xpra-server, xpra-codecs, ...) were unconstrained and
defaulted to 6.5, so apt could not satisfy the dependency graph and
the "Build Docker images" action failed.

Pinning all xpra* packages at the preferences level constrains the
whole set consistently (xpra-html5 is handled separately since it
follows a different version scheme, locked to v19). Blocking every
other version with priority -1 ensures that, if the pinned version
ever disappears from the repository, apt fails loudly instead of
silently upgrading to the latest release.

Fixes GNS3/gns3-registry#1044
2026-07-06 13:31:07 +08:00
Jeremy Grossmann 7650409ab6 Merge pull request #2797 from yueguobin/feature/optional-ai-support-2794
Make AI features (AI Copilot + MCP) optional via [ai-features] extra
2026-06-27 19:44:27 +02:00
YueGuobin e0ef63ebc1 Update CI to install [ai-features,dev] instead of [ai-copilot,dev]
The [ai-copilot] extra has been replaced by [ai-features] which
includes both AI Copilot and MCP dependencies.
2026-06-27 22:19:39 +08:00
YueGuobin 292b60efaa Make AI features (AI Copilot + MCP) optional via [ai-features] extra
- Move fastmcp from core requirements.txt to mcp-requirements.txt
- Add MCP_AVAILABLE feature flag in agent/__init__.py (graceful degradation)
- Guard MCP imports/registration in server.py and tasks.py
- Replace ai-copilot/mcp/ai-support extras with single ai-features extra
- Add stub MCP routes returning 501 when MCP is not installed
- Add gns3server-uninstall-ai-features CLI command
- Remove old gns3server-uninstall-ai-copilot command
- Update all error messages and docs to reference ai-features

Closes #2794
2026-06-27 10:14:43 +08:00
Jeremy Grossmann 58d3055dd3 Merge pull request #2792 from yueguobin/feature/refresh-token-mechanism-2786
Add stateless JWT refresh token mechanism
2026-06-24 00:26:07 +02:00
YueGuobin 0dd2fb4173 Add refresh token mechanism documentation under docs/features/ 2026-06-23 23:36:37 +08:00
YueGuobin c8c14af9f4 Add /refresh to allowed public endpoints list in route auth test 2026-06-23 23:19:07 +08:00
YueGuobin 0e8d0cb87b Add stateless JWT refresh token mechanism
- New config: Controller.jwt_refresh_token_expire_minutes (default 30 days)
- New endpoint: POST /v3/access/users/refresh (public, unauthenticated)
- Login/authenticate responses now include refresh_token
- AuthService: _create_token helper, create_refresh_token, get_token_data
  now parses type claim (token_use) for token classification
- Security: refresh tokens rejected on HTTP + WebSocket access paths;
  /refresh strictly requires type=='refresh'
- Logout works for free via existing token_version mechanism
- Tests: 9 new TestRefreshToken cases, all passing; 34 existing tests
  still pass (no regressions)
2026-06-23 22:39:11 +08:00
Jeremy Grossmann 4ffab7abee Merge pull request #2791 from yueguobin/fix/mcp-test-issues
Fix MCP testing issues: appliance_install version, handler unit tests, parameter validation
2026-06-17 21:07:59 +02:00
YueGuobin 471e65e48c Add project/node/link handler tests: 39 total, covering list/get/create/delete/start/stop/suspend/reload/console/update/fields 2026-06-18 00:07:14 +08:00
YueGuobin 5cc826baff Add MCP handler unit tests with mocked Gns3Connector
Tests cover:
- get_nodes_handler: fields filter, invalid fields rejection
- create_node_handler: name passthrough, fields filter, fields validation,
  batch mode inherited template_id, missing project_id
- create_link_handler: compact format, standard format, fields validation
- appliance_get, appliance_install with version
- list_templates: fields filter, invalid field error
2026-06-18 00:02:38 +08:00
YueGuobin dc3a386961 Add MCP tool parameter consistency tests 2026-06-17 23:59:40 +08:00
YueGuobin ead9747e1b Fix appliance_install: add version parameter 2026-06-17 23:03:28 +08:00
Jeremy Grossmann 2e75c9319b Merge pull request #2787 from yueguobin/optimize/project-open-speed
Performance: accelerate project opening with parallel link creation and batch UDP port allocation
2026-06-16 23:59:41 +02:00
YueGuobin f16eba183a Add coordinate system note to docs 2026-06-16 23:30:59 +08:00
YueGuobin 0d21f294f6 Document canvas coordinate system in node_create x/y params 2026-06-16 23:16:17 +08:00
YueGuobin 00647d092c Update docstring: batch concurrency from 10 to 100 2026-06-16 23:05:17 +08:00
YueGuobin da35eaa014 Remove unused import time 2026-06-16 23:04:05 +08:00
YueGuobin 10ff5b2283 Add list type check before nodes[0] access in _normalize_link_nodes 2026-06-16 23:00:47 +08:00
YueGuobin 0d45bfbae5 Add fields type validation in create handlers 2026-06-16 22:58:36 +08:00
YueGuobin 390a40ce80 Use pop() instead of pop(0) for O(1) port removal 2026-06-16 22:56:42 +08:00
YueGuobin 59e5f8dd2f Fix review issues: key_prefix length, count validation, WAL log, timeout comment, pointless temp var 2026-06-16 22:50:22 +08:00
YueGuobin 533d3d5b71 Fix: pass name from TemplateUsage to add_node_from_template
The controller endpoint received name via TemplateUsage but never
passed it to add_node_from_template, causing the name parameter to
be silently ignored. name is optional - if omitted the template's
default_name_format is used.
2026-06-16 22:43:46 +08:00
YueGuobin 68567118f1 Remove unused imports (logging, log, select) 2026-06-16 22:25:07 +08:00
YueGuobin af94c1729b Add warning for unconsumed pre-allocated UDP ports after link creation
Ports are properly released on project close (compute.post /close).
The warning alerts if any pre-allocated ports go unused within a session.
2026-06-16 22:22:46 +08:00
Jeremy Grossmann 7d5d4767bf Remove FIXME comment about middleware in server.py
Removed commented out FIXME note regarding middleware issues.
2026-06-16 12:20:55 +02:00
YueGuobin f7abb62603 Rename device_command_run_handler → device_show_run_handler to match tool name 2026-06-16 12:44:12 +08:00
YueGuobin fbb8924a8e Rename device_command_run → device_show_run for clarity
The name device_command_run was ambiguous and easily confused with
device_config_send. device_show_run makes the read-only intent explicit,
forming a clear pair: config_send (write) vs show_run (read).
2026-06-16 12:27:35 +08:00
YueGuobin e627481ec2 Fix device_command_run KeyError('commands'): tool desc said show_commands but backend expects commands
- Tool description and param schema now use 'commands' (matching ExecuteMultipleDeviceCommands)
- Updated error message in handler
- Clarified in docstring that this is read-only; use device_config_send for config changes
2026-06-16 12:23:15 +08:00
YueGuobin ec58bea24b Fix template_list return type annotation to match _run_handler_sync envelope
template_list was annotated as dict[str, Any] but _run_handler_sync always
returns a list envelope ([{"type":"text",...}]). Other tools use
list[dict[str, Any]] consistently. This caused a Pydantic dict_type
validation error on the client.
2026-06-16 12:08:07 +08:00
YueGuobin a126f910d4 Add performance optimization documentation 2026-06-16 01:14:12 +08:00
YueGuobin 48b7ea8bf0 Update MCP service docs: API key format, auth flow, tool parameters, concurrency 2026-06-16 01:13:01 +08:00
YueGuobin d407b29fe9 Increase HTTP connection pool to 500/1000 2026-06-16 00:58:12 +08:00
YueGuobin 74192f454f Increase BATCH_MAX_WORKERS and Pool concurrency from 20 to 100 2026-06-16 00:49:08 +08:00
YueGuobin 286b2407cd Remove final timing artifact in projects.py 2026-06-16 00:44:54 +08:00
YueGuobin bd15c8d019 Remove remaining dead timing variables and imports 2026-06-16 00:40:03 +08:00
YueGuobin a8cc01af46 Remove database warmup (proven ineffective - real bottleneck was bcrypt blocking event loop) 2026-06-16 00:35:42 +08:00
YueGuobin ccb629f48f Clean up all timing/debug logs
Remove all [MCP-TIMING] and [CTRL-TIMING] log lines, timing middleware,
and related import time statements across 11 files.
2026-06-16 00:34:11 +08:00
YueGuobin 8ef70d9fac Add memory: import validation best practice 2026-06-16 00:25:45 +08:00
YueGuobin 7d8ab399da Fix: add missing UUID imports 2026-06-16 00:24:37 +08:00
YueGuobin d6b337bc3a Generate fresh JWT on API key auth instead of returning raw key
When MCP client authenticates with API key, _resolve_token now
returns a newly generated JWT. This JWT is stored in the ContextVar
and used by all subsequent tool handler API calls - zero extra bcrypt.
2026-06-16 00:09:36 +08:00
YueGuobin f522c947bc Optimize API key auth: O(1) lookup via UUID-embedded key format
New format: gns3_<api_key_id>_<random_secret>
- Auth extracts api_key_id from token → single DB query by UUID → one bcrypt
- No more scanning all keys (was O(n) with bcrypt per key)
- bcrypt.checkpw offloaded to thread pool to prevent event loop blocking
- Legacy gns3_<random> format removed (compatibility break)
2026-06-15 23:56:36 +08:00
YueGuobin 796a2e6ca8 Fix: offload bcrypt.checkpw to thread pool to prevent blocking event loop
bcrypt.checkpw is CPU-bound (~1.3s per call) and was running
synchronously inside the async event loop, blocking ALL concurrent
requests. With 5 API keys and 10 concurrent requests, this caused
~13s delay before any handler could start.
2026-06-15 23:49:28 +08:00
YueGuobin 04f0657661 Add timing to API key auth path and log api_keys count 2026-06-15 23:45:26 +08:00
YueGuobin 3c41dea48f Replace SELECT 1 warmup with full database file read to warm OS page cache
Reading the entire DB file into OS page cache eliminates the 8-14s
cold-start penalty on the first ORM query (users/templates/api_keys).
Previous SELECT 1 only warmed the connection pool, not the file cache.
2026-06-15 23:43:41 +08:00
YueGuobin 5502b8f8e5 Add timing logs to auth dependency chain to identify 6s pre-handler delay 2026-06-15 23:35:12 +08:00
YueGuobin b3619a3c00 Add granular timing to get_template: separate execute vs fetch time 2026-06-15 23:33:19 +08:00
YueGuobin e90fb0774c Warm up database connection pool on startup to avoid 8s cold-start penalty on first API request 2026-06-15 23:26:28 +08:00
YueGuobin 6d3cfc7d1e Fix: register WAL PRAGMA on sync_engine instead of Engine class for async compat
- Move event listener from module-level @Engine to engine.sync_engine
- Add WAL mode verification log on startup
- Remove unused Engine class-level listener
2026-06-15 23:21:50 +08:00
YueGuobin 08e0dbc122 Add timing logs to get_template to identify DB query bottleneck 2026-06-15 23:18:00 +08:00
YueGuobin fa9aa5a9cc Add timing middleware to log slow requests (>1s) with [CTRL-TIMING] prefix 2026-06-15 23:13:36 +08:00
YueGuobin a855cb34f1 Fix: _time → time in compute.py timing log 2026-06-15 23:06:10 +08:00
YueGuobin ea4bb2c1fb Add [CTRL-TIMING] logs to controller create_node flow
Timing logs cover:
- create_node_from_template (entry, get_template, add_node, total)
- add_node_from_template (entry to done)
- _create_node (project_setup, node.create, total)
- Node.create (compute_post timing)
- compute._session.request (actual HTTP to compute)
2026-06-15 23:04:01 +08:00
YueGuobin e5797c3da0 Fix: pass template_id to batch mode handler so top-level template_id works as default 2026-06-15 22:57:40 +08:00
YueGuobin cef6dc6bd2 Add detailed timing logs to MCP node creation and HTTP client
Logs with [MCP-TIMING] prefix at:
- create_node_handler entry, setup, http_call start/end, total
- http_call entry, auth, response
- _authenticate_v3 entry, done, fail
2026-06-15 22:51:43 +08:00
YueGuobin 58ca6b1dd4 Add fields filter to template_list tool with description for AI 2026-06-15 22:11:14 +08:00
YueGuobin b79fb89866 Fix: add missing _filter_link_response function
Previously the function was referenced in create_link_handler
but never defined, causing NameError at runtime.
2026-06-15 21:51:17 +08:00
YueGuobin 1bb010d274 Pass name parameter through to controller API when creating node from template 2026-06-15 21:50:14 +08:00
YueGuobin eb3ac64016 Add validation to compact link format with clear error messages
- Validate array length (must be exactly 6)
- Validate node_id types at positions 0 and 3
- Return descriptive errors so AI can self-correct
2026-06-15 21:46:27 +08:00
YueGuobin a8a83051ff Add compact array format for link node entries to reduce token usage
Supports both standard and compact formats:
  Standard: [{"node_id": "uuid", "adapter_number": 0, "port_number": 0}]
  Compact:  ["uuid", 0, 0, "uuid", 0, 0] - 3x less tokens
2026-06-15 21:42:26 +08:00
YueGuobin 27a489a3fd Add fields filter to link_create tool
- Default response: link_id, link_type, nodes (3 fields vs full 13)
- Available fields listed in tool description for AI
2026-06-15 13:50:04 +08:00
YueGuobin 3465c39eaa Reduce md5sum cache write failure log level from error to warning
This is a non-fatal issue that occurs during concurrent project close
when multiple nodes try to write their md5sum cache while the project
directory is being cleaned up.
2026-06-15 13:27:14 +08:00
YueGuobin 11bf2d8cef Add fields filter to node_create tool description for AI
- Expose optional 'fields' parameter to AI via tool description
- List all available node fields in the parameter description
- Mention inherited template_id in batch mode
2026-06-15 13:22:32 +08:00
YueGuobin f4c8f9bf61 Optimize MCP create_node: support inherited template_id and default fields filter
- Batch mode now inherits top-level template_id as default per-node
- Both single and batch modes filter response to minimal fields by default
  (node_id, name, node_type, status, console)
- Optional 'fields' parameter overrides the default field set
2026-06-15 13:21:06 +08:00
YueGuobin 6cbe676b18 Increase MCP HTTP client timeout from 10s to 30s
Dynamips node creation (e.g., Cisco 7200 with multiple adapters)
can exceed the previous 10-second timeout, causing MCP tools to
fail with Read timed out errors.
2026-06-15 13:14:11 +08:00
YueGuobin 49d2c271ca Enable SQLite WAL mode to fix 'database is locked' errors under concurrent API requests 2026-06-15 13:02:17 +08:00
YueGuobin 650be3565f Cache IOU image default values per image path to avoid redundant subprocess calls
- Add class-level caches for loader and default RAM/NVRAM values
- When multiple IOU nodes use the same image, only the first one runs
  the ld-linux --verify and iou-image -h subprocesses
- Subsequent nodes reuse cached results, saving ~2 subprocess calls per node
- Cache is populated only on successful subprocess execution to avoid
  overwriting explicitly set ram/nvram values with stale cached defaults
2026-06-15 12:59:51 +08:00
YueGuobin 650f95af54 Increase node and link creation concurrency from 5 to 20 2026-06-15 12:50:59 +08:00
YueGuobin e29e02a8c6 Fix: revert IOU lock optimization, serialize IOU node creation for correct application_id assignment
The _iou_id_lock must cover _create_node() because get_next_application_id()
checks in-memory nodes (self._nodes), which are only registered after
_create_node() completes. Without this serialization, concurrent IOU
node creation produces duplicate application IDs.
2026-06-15 12:49:01 +08:00
YueGuobin 5d0284e7be Performance: accelerate project opening with parallel link creation and batch UDP port allocation
- Narrow IOU lock scope to only cover application_id allocation,
  allowing concurrent IOU node creation via Pool(concurrency=5)
- Parallelize link creation during project.open() using Pool(concurrency=5)
  instead of sequential processing
- Add batch UDP port allocation endpoint on compute to allocate N ports
  in a single HTTP call
- Pre-allocate UDP ports per compute before link creation during project
  loading, reducing HTTP round-trips
- UDPLink.create() falls back to individual port allocation if no
  pre-allocated port is available
2026-06-15 12:42:18 +08:00
Jeremy Grossmann b605d71a8a Merge pull request #2785 from yueguobin/mcp/batch-operations
MCP batch operations, field filtering, Jinja2 templates, download security, and WebSocket fixes
2026-06-15 00:47:17 +02:00
YueGuobin 97483310b1 docs: Update link tool descriptions for batch ops and fields filter 2026-06-14 22:51:06 +08:00
YueGuobin be69670333 feat: Add batch link_ids to link_delete/link_reset, fields filter to link_list 2026-06-14 22:43:44 +08:00
YueGuobin d6c362b3f0 feat: Add fields filter to link_list 2026-06-14 22:37:10 +08:00
YueGuobin 3b42eea112 feat: Add batch node_ids to node_delete 2026-06-14 22:28:28 +08:00
YueGuobin e17d298bc7 fix: Convert http to ws scheme in node_console WebSocket URL 2026-06-14 21:57:58 +08:00
YueGuobin 80d5ae91a4 docs: Update link capture batch ops and console short-lived JWT note 2026-06-14 21:47:25 +08:00
YueGuobin f14d30cb7e feat: Add batch link_ids to link_capture_download 2026-06-14 21:36:24 +08:00
YueGuobin 6df9374a4c feat: Add batch link_ids to link_capture_start/stop 2026-06-14 21:32:47 +08:00
YueGuobin e02f1a8cd0 fix: Store username in gns3_ctx during auth, use for short-lived download JWTs
_ jw t_username_var set in _resolve_token for both JWT and API key auth.
Passed to handlers via gns3_ctx['jwt_username']. No raw key exposure,
no fake-user fallback.
2026-06-14 14:00:41 +08:00
YueGuobin 678b1868f5 fix: Generate independent short-lived JWT for pcap download
No longer depends on the original token type (JWT or API key).
Always creates a fresh 10-min JWT for the download URL.
2026-06-14 13:49:24 +08:00
YueGuobin 754eab9609 docs: Clarify why nodes must be started for device config tools 2026-06-14 13:41:04 +08:00
YueGuobin 9f3a6a7e58 docs: Remove Claude Desktop section from MCP doc 2026-06-14 13:28:04 +08:00
YueGuobin f4b8de725c docs: Add device config workflow mermaid diagram 2026-06-14 13:20:25 +08:00
YueGuobin aabf54b6d1 docs: Add best practices section for device config — template usage, error checking, config backup 2026-06-14 13:11:15 +08:00
YueGuobin 647c5c0e65 docs: Add snapshot prerequisite and suppress telnetlib3 noise 2026-06-14 12:41:14 +08:00
YueGuobin b23f2181c4 docs: Update MCP doc with batch ops, field filtering, and Jinja2 template 2026-06-14 12:33:00 +08:00
YueGuobin c3c78f99a1 revert: Remove _configs_map changes in tools_v2 (handled by template renderer now) 2026-06-14 12:15:30 +08:00
YueGuobin c42b3a59bf fix: Merge commands for duplicate device_names in _configs_map
Dict comprehension overwrote earlier entries when the same device
appeared multiple times, causing all entries' outputs to collapse
into the last one. Now commands are appended for duplicate names.
2026-06-14 02:00:06 +08:00
YueGuobin fb032ade78 fix: Actually pass template param to device_config/command handlers
template was defined in the tool signature but omitted from
the params dict passed to the handler, making Jinja2 rendering
completely non-functional.
2026-06-14 01:40:48 +08:00
YueGuobin fed40c683e fix: Correct Jinja2 template commands_field per tool type
config_tools_nornir expects config_commands, while
display_tools_nornir and vpcs_tools_netmiko expect commands.
Render template now uses the correct field name.
2026-06-14 01:33:23 +08:00
YueGuobin 8aa7f2bde5 feat: Jinja2 template support in device_command_run 2026-06-14 00:27:49 +08:00
YueGuobin 06e1511773 feat: Jinja2 template support in device_config_send
- Add optional 'template' param with Jinja2 syntax
- Each device entry can use 'vars' dict instead of 'config_commands'
- Template rendered per device, merged with existing commands
- Rendering errors returned inline for AI self-correction
2026-06-14 00:27:13 +08:00
YueGuobin c647805cfb feat: Add batch node_ids support to node_start/stop/reload/suspend
- Each tool accepts either node_id (single) or node_ids (batch)
- Batch mode runs actions in parallel via ThreadPoolExecutor
- Useful for starting/stopping nodes by topology region
2026-06-14 00:14:34 +08:00
YueGuobin 3d3c0eb8db feat: Add fields filter to appliance_list
Appliances list can be very large (hundreds of entries). Use
fields=["name","category"] to return only what the AI needs.
2026-06-13 23:59:12 +08:00
YueGuobin cd8bb7cca2 feat: Add fields filter to node_list
- Matches same VALID_NODE_FIELDS as node_get
- Return only selected fields per node to save tokens
2026-06-13 23:54:24 +08:00
YueGuobin b9cc2d8bee feat: node_get fields filter — match controller Node schema fields 2026-06-13 23:26:41 +08:00
YueGuobin 8f8abe4106 fix: Set auto_close=False on project_create so projects stay open when clients disconnect 2026-06-13 23:13:31 +08:00
YueGuobin 2c1a83114d feat: Add batch mode to node_create and link_create (parallel, max 10 workers)
- node_create accepts nodes=[{template_id, x, y, name?}] for batch creation
- link_create accepts links=[{nodes, link_type?, filters?}] for batch creation
- Uses ThreadPoolExecutor for parallel REST API calls
- Max 10 concurrent workers per batch, backward compatible with single mode
2026-06-13 22:29:27 +08:00
Jeremy Grossmann 16d3f28cf5 Merge pull request #2782 from yueguobin/mcp/device-config
MCP (Model Context Protocol) integration — 82 tools with device config, API key auth, and bug fixes
2026-06-11 23:57:08 +02:00
YueGuobin a69485befa docs: Update MCP service documentation with 82 tools and API Key setup 2026-06-12 00:26:56 +08:00
YueGuobin f2e5d69a2c fix: Pass API key directly instead of generating short-lived JWT
REST API auth already supports gns3_ keys, so there's no need
to create a temporary 5-min JWT. The raw API key is passed
through as the Bearer token, eliminating token expiry issues.
2026-06-12 00:25:01 +08:00
Guobin Yue 47fa1bbe95 Merge branch '3.1' into mcp/device-config 2026-06-12 00:05:59 +08:00
YueGuobin a98707e91d chore: Remove redundant migration fixup
f0b0de2a9_add_api_keys_table already includes updated_at column,
so the fixup migration f0b0de2a9b is unnecessary.
2026-06-11 23:51:07 +08:00
YueGuobin 8ecc35193d feat: API key lifecycle — revoke/restore/delete
- POST /{id}/revoke: 吊销, revoked=True, 立即失效
- POST /{id}/restore: 恢复, revoked=False, 重新生效
- DELETE /{id}:       永久删除, 不可逆
- 列表接口显示所有 key 包括已吊销的
- 认证时过滤 revoked=False
2026-06-11 23:32:19 +08:00
YueGuobin 062e8dfbc4 chore: Remove unused revoke_api_key from repository 2026-06-11 23:28:43 +08:00
YueGuobin 700d71d675 fix: Rename revoke_api_key → delete_api_key 2026-06-11 23:28:05 +08:00
YueGuobin 9d441517fd fix: Hard-delete API keys instead of soft delete (revoked flag)
Removing the soft-delete approach — revoked keys are now deleted
from the database entirely via DELETE endpoint. This prevents the
api_keys table from accumulating stale records.
2026-06-11 23:27:43 +08:00
YueGuobin bfef0a36e3 feat: Support API keys in REST API authentication (reuse gns3_ prefix keys)
API keys can now be used in Authorization: Bearer header
for all REST API endpoints, not just MCP.
2026-06-11 23:21:49 +08:00
YueGuobin aed8830052 fix: Lazily access db engine for API key validation
_db_engine is not available when register_starlette_routes() is
called (it's set later during lifespan startup). Store the app
reference instead and access app.state._db_engine lazily.
2026-06-11 23:18:05 +08:00
YueGuobin d75746e029 fix: Add missing updated_at column to api_keys table
BaseTable base class includes updated_at, but the initial
migration didn't create the column. Added fixup migration.
2026-06-11 23:13:50 +08:00
YueGuobin f8340cb355 fix: Export ApiKeyCreate from schemas package 2026-06-11 22:56:44 +08:00
YueGuobin a79bc7dd20 feat: Add API Key support for MCP authentication
- New db model: api_keys table with bcrypt-hashed keys
- New API: POST/GET/DELETE /v3/access/api-keys endpoints
- MCP _resolve_token: validates API keys, resolves to 5-min JWT
- API keys inherit the creating user's RBAC permissions
- MCP auth supports both JWT (24h) and API key (permanent) tokens
2026-06-11 22:54:03 +08:00
YueGuobin 8e9afbcf92 fix: Validate JWT token exp claim — was silently ignored after migration to joserfc
joserfc.jwt.decode() does not validate the exp claim by default,
so expired tokens were accepted indefinitely. Added explicit check
after decoding. See issue #2781.
2026-06-11 22:32:12 +08:00
YueGuobin 0b2c784b81 docs: Fix appliance_install description - it does NOT download images 2026-06-11 12:13:31 +08:00
YueGuobin f0b0de2a91 docs: Add MCP sharing warnings to shared gns3_copilot modules 2026-06-11 12:11:13 +08:00
YueGuobin b69ff17850 docs: Fix image_install description - it auto-creates templates from uploaded images, not downloads 2026-06-11 12:00:36 +08:00
YueGuobin 05f12e1f15 docs: Clarify image_prune description - only removes unreferenced images 2026-06-11 01:42:27 +08:00
Jeremy Grossmann 5df385fabe Merge pull request #2780 from yueguobin/mcp/node-file-streaming
feat: Node file streaming, recursive listing, file type detection, file delete, and MCP file tools
2026-06-10 19:41:30 +02:00
YueGuobin d0960812aa docs: Clarify symbol_delete limitations (built-in vs custom symbols) 2026-06-11 01:35:14 +08:00
YueGuobin c2aae9529b fix: Add image field to template_create, document type-specific params in description 2026-06-11 01:34:34 +08:00
YueGuobin 828a770489 fix: Remove .json() calls on 204 responses for prune/install images 2026-06-11 01:28:19 +08:00
YueGuobin 9d7c482288 fix: Skip always-running nodes in start_all/stop_all
Always-running node types (Ethernet switch, Cloud, NAT, etc.)
return 405 when start/stop is called. is_always_running() already
tracks these types; start_all/stop_all now skip them.
2026-06-11 01:26:43 +08:00
YueGuobin 3db275b199 docs: Add GNS3 SVG rendering quirks to drawing_create description 2026-06-11 00:48:54 +08:00
YueGuobin 4b9572d565 docs: Add SVG shape examples to drawing_create tool description 2026-06-11 00:39:37 +08:00
YueGuobin 4266583922 fix: Add missing rotation parameter to drawing_update MCP tool
Parameter was defined in create_drawing but omitted from
update_drawing, causing rotation changes to be silently ignored.
2026-06-11 00:36:37 +08:00
YueGuobin 66975f54f7 fix: Map MCP device_command_run parameter to tool's expected field name
MCP sent 'device_commands' but the internal display_tools_nornir
expects 'device_configs'. Renamed parameter for consistency.
2026-06-11 00:14:00 +08:00
YueGuobin 571853599f docs: Update link_reset description with accurate UDP connection behavior 2026-06-10 23:59:45 +08:00
YueGuobin e7aa228ead fix: Update link_reset description to match actual behavior (delete + recreate) 2026-06-10 23:56:30 +08:00
YueGuobin 4ec80f8989 fix: Remove unsupported description param from project_create
GNS3 REST API ProjectCreate schema does not have a description field.
The parameter was silently ignored; now removed to avoid confusion.
2026-06-10 23:32:27 +08:00
YueGuobin 80e64ebbae fix: Fix symbol_get/upload/delete handlers for correct API paths
- get_symbol: URL was missing '/raw' suffix + tried .json() on binary SVG
  → now returns download URL + curl command (like download_capture_file)
- upload_symbol: URL was missing '/raw' suffix
  → now accepts SVG content string and POSTs to correct path
- delete_symbol: returns 204 No Content, .json() would fail
  → removed .json() call (just returns message)
2026-06-10 23:01:27 +08:00
YueGuobin d431ff6eaa feat: Log registered MCP tools at startup 2026-06-10 22:53:51 +08:00
YueGuobin 658a8d112b docs: Clarify compute tools descriptions about local compute vs database computes
compute_list and compute_get only return database-registered computes.
The built-in local compute is returned by server_statistics instead.
2026-06-10 22:44:54 +08:00
YueGuobin 8b014693a8 fix: Type compute_id as uuid.UUID to reject non-UUID values at MCP input layer
Previously compute_id was typed as str, so 'local' would pass MCP validation
and reach the controller API where it crashed. Now uuid.UUID type ensures
Pydantic rejects any non-UUID string before the handler runs.
2026-06-10 22:38:38 +08:00
YueGuobin 67fa65a9e0 fix: Require UUID for compute_get/images, remove 'local' string default
The end /v3/computes/{compute_id} expects the compute_id to be a
valid UUID. Previously the MCP tool defaulted to the string 'local',
which caused a ValueError in the database layer. Now compute_id is
required and callers must use compute_list first to resolve names to UUIDs.
2026-06-10 22:31:17 +08:00
YueGuobin e7038f1ae3 feat: Add device configuration MCP tools (config_send, command_run, vpcs_config_set)
- Add jwt_token/url parameters to get_device_ports_from_topology() and GNS3TopologyTool
  for MCP handler compatibility (backward compatible, auto-detection fallback)
- Add jwt_token/url pass-through to ExecuteMultipleDeviceConfigCommands,
  ExecuteMultipleDeviceCommands, and VPCSCommands _run() methods
- Create MCP handler device_config.py wrapping the 3 device config tools
- Register as device_config_send, device_command_run, vpcs_config_set
2026-06-10 14:34:35 +08:00
YueGuobin 87e14cc49e refactor: unify MCP tool naming to <module>_<action> convention
All 79 tools renamed for consistent alphabetical grouping:
- project_list, project_get, project_create, project_delete ...
- node_list, node_get, node_start, node_stop, node_file_list ...
- link_list, link_create, link_capture_start, link_capture_stop ...
- template_list, template_get ...
- snapshot_list, snapshot_create, snapshot_delete ...
- drawing_list, drawing_create, drawing_update ...
- symbol_list, symbol_get, symbol_upload ...
- appliance_list, appliance_get ...
- image_list, image_get, image_delete ...
- server_version, server_statistics ...
- compute_list, compute_get, compute_images ...
2026-06-10 14:07:34 +08:00
YueGuobin 41594faf43 feat: Add symbol upload/delete, project load, and locked check MCP tools 2026-06-10 13:59:39 +08:00
YueGuobin b786f0b7eb feat: Add image management MCP tools
- Image tools: get_images, get_image, delete_image, prune_images, install_images
2026-06-10 13:58:42 +08:00
YueGuobin e4d2faec37 feat: Add symbol and appliance MCP tools
- Symbol tools: get_symbols, get_symbol, get_symbol_dimensions, get_default_symbols
- Appliance tools: get_appliances, get_appliance, install_appliance
2026-06-10 13:57:52 +08:00
YueGuobin db9f645c98 feat: Add node bulk ops, project lock, and server info MCP tools
- Node bulk: start_all_nodes, stop_all_nodes, suspend_all_nodes, reload_all_nodes
- Node advanced: duplicate_node, isolate_node, unisolate_node, get_node_links
- Project: lock_project, unlock_project
- Server: get_version, get_statistics
2026-06-10 13:56:43 +08:00
YueGuobin e7fbb3ec10 feat: Add snapshot and drawing MCP tools
- Add snapshot tools: get_snapshots, create_snapshot, delete_snapshot, restore_snapshot
- Add drawing tools: get_drawings, create_drawing, get_drawing, update_drawing, delete_drawing
2026-06-10 13:55:13 +08:00
YueGuobin acce79d243 refactor: unify MCP handlers to use http_call directly, relocate node file ops to Node class
- Move node file operations (list_files, delete_file) from Gns3Connector to Node class
- Add link capture/reset operations (reset, start_capture, stop_capture) to Link class
- Convert all MCP handlers to use conn.http_call() directly instead of
  Gns3Connector/Node/Link abstraction methods
- Register 4 new MCP tools: reset_link, start_capture, stop_capture,
  download_capture_file
2026-06-10 13:47:10 +08:00
YueGuobin 28b06f37c4 feat: Add node file operations as MCP tools (list, get, write, delete)
- Add list_node_files, get_node_file, write_node_file, delete_node_file methods to Gns3Connector
- Add MCP handlers with offset/limit line-based reading for get_node_file
- Auto-truncate files >50KB with truncated flag in response
- Rich metadata returned (total_lines, total_bytes, has_more, etc.)
- Tool docstrings guide AI to check file sizes before reading chunked
2026-06-10 12:16:35 +08:00
YueGuobin 066b7076c0 Add comment about rootful Docker permissions at container start
Rootful Docker recreates volume mount points as root on start,
preventing the GNS3 process from writing files into node directories
while the container is running. self._fix_permissions() would resolve
this but is currently only called at container stop time.
2026-06-10 00:46:10 +08:00
YueGuobin ce95c89b64 Fix _fix_permissions test: set process.returncode=0 and update assertion
- Set returncode=0 on mock process to follow the success path
- Update assertion to include stderr=asyncio.subprocess.PIPE parameter
2026-06-10 00:44:12 +08:00
YueGuobin eb15c7138b Fix list_node_files PermissionError on os.scandir
Wrap os.scandir() in try-except to return empty list instead of
crashing when a node directory is not readable.
2026-06-10 00:15:26 +08:00
YueGuobin 1a307edbca Fix _fix_permissions error handling and list_node_files PermissionError
- _fix_permissions: capture stderr, check returncode, only set
  _permissions_fixed on success instead of silently marking as fixed
- list_node_files: wrap os.scandir in try-except to handle
  PermissionError gracefully
2026-06-10 00:14:40 +08:00
YueGuobin e659b64bf0 Add async_iterable_to_stream utility to avoid aiohttp compatibility issues
Create async_iterable_to_stream() in gns3server.utils.asyncio that
converts an async iterable to an aiohttp StreamReader via a background
feeder task. This bypasses aiohttp's AsyncIterablePayload which can
cause 'Connection reset by peer' with certain HTTP servers.

Use it in _run_http_query for the __aiter__ data path.
2026-06-09 23:55:59 +08:00
YueGuobin 8e340f0ce8 Add descriptive detail to 403 errors in compute file endpoints
Both is_safe_path rejection and PermissionError were returning 403
without a detail message, making them indistinguishable in logs.
Add specific detail strings to each:
- is_safe_path: 'Path is outside the project directory'
- PermissionError (write): 'Permission denied writing to ...'
- PermissionError (delete): 'Permission denied deleting ...'
2026-06-09 23:33:35 +08:00
YueGuobin 16a9064eb8 Fix silent file write failure in write_compute_project_file
The inner try-except caught OSError/UnicodeEncodeError with 'pass',
silently swallowing all write failures and returning HTTP 204 as if
the file was written successfully.

Remove the nested try-except and let errors propagate properly:
- OSError → 500 with error detail
- PermissionError → 403 (already handled)
- FileNotFoundError → 404 (already handled)
2026-06-09 23:27:45 +08:00
YueGuobin cbb21e8e40 feat: Node file streaming, recursive listing, file type detection, and file delete
- Stream file GET/POST through controller without buffering in memory
- Add recursive and subdirectory filtering to node file listing
- Replace file extension with magic-based file type detection
- Add DELETE endpoint for node and project files
- Include directories in listing response
- Add params and stream support to http_query
- Fix lambda closures, streamer exception scope, and delete error codes
2026-06-09 22:52:50 +08:00
Jeremy Grossmann c70a4660c1 Merge pull request #2777 from yueguobin/mcp/project-tools
Add MCP project tools: update, duplicate, and README operations
2026-06-07 18:11:16 +02:00
YueGuobin f91d7b18e9 Update README tool descriptions: .txt → .md
Only description strings changed to tell AI the content is Markdown
format (.md). The actual handler still reads/writes README.txt for
Web UI compatibility.
2026-06-07 23:32:26 +08:00
YueGuobin 4ca1a80adb Update README tool descriptions to mention Markdown format
Web UI supports rendering Markdown in README.txt, so note this in the
tool descriptions and content parameter.
2026-06-07 23:23:38 +08:00
YueGuobin 4921b98948 Add MCP project tools: update, duplicate, and README operations
- Add update_project and duplicate_project MCP tools
- Add get_project_readme and update_project_readme tools
- Add Gns3Connector methods: update_project, duplicate_project,
  get_project_file, write_project_file
2026-06-07 23:14:07 +08:00
grossmj 95b1a35300 Development on 3.1.0.dev4 2026-06-07 00:13:59 +02:00
grossmj aad66e8ede Release v3.1.0a3 2026-06-06 23:19:24 +02:00
grossmj 259b7824af Bundle web-ui v3.1.0a3 2026-06-06 23:11:04 +02:00
grossmj bd22911066 Sync appliances 2026-06-06 22:53:12 +02:00
Jeremy Grossmann c6a6cd9ad9 Merge pull request #2776 from yueguobin/fix/mcp-template-update-kwargs-handling
Fix MCP tool parameter handling for nested kwargs
2026-06-06 18:52:12 +02:00
Guobin Yue fbe6b280d5 Merge branch '3.1' into fix/mcp-template-update-kwargs-handling 2026-06-07 00:37:02 +08:00
YueGuobin 012df5af57 docs: add simplified MCP tool description guide to project memory
Added a focused, concise memory document about MCP tool description
location. Simplified from 180 lines to 45 lines to capture only the
essential information needed for future conversations.

Key points documented:
- MCP tool descriptions are defined in @mcp.tool() functions in __init__.py
- NOT in *_TOOLS arrays in individual module files
- Must restart GNS3 server to see description updates
- Description requirements: explicit formats, ranges, and examples

This replaces the verbose 180-line version with a practical 45-line
guide focused on answering: 'Where should I write tool descriptions so
the AI can see them?'
2026-06-07 00:32:39 +08:00
YueGuobin 1f985a2823 fix: update MCP link tools descriptions with detailed filter info
Updated the actual MCP tool definitions in __init__.py with detailed
filter parameter descriptions. The previous update to links.py was incorrect
because MCP tools are defined via @mcp.tool() decorators in __init__.py.

Changes:
- Updated update_link tool docstring with comprehensive filter information
- Updated create_link tool filters parameter description
- Added all 5 filter types with proper array format requirements
- Added parameter ranges and usage examples

Filters now properly documented:
- frequency_drop: [N] (N: -1 to 32767)
- packet_loss: [rate] (rate: 0 to 100)
- delay: [ms, jitter] (milliseconds)
- corrupt: [rate] (rate: 0 to 100)
- bpf: [expression] (BPF syntax)

This will prevent TypeError: 'int' object is not iterable errors and
help users understand the correct filter format.
2026-06-07 00:20:29 +08:00
YueGuobin eac6c9f17d docs: improve MCP link tools filter parameter descriptions
Updated the filters parameter description in create_link and update_link
MCP tools to specify the required array format and provide examples.

Changes:
- Updated create_link filters description with array format requirements
- Updated update_link filters description with array format and example
- Added specific filter types: frequency_drop, packet_loss, delay, corrupt, bpf

This helps users understand the correct format:
- frequency_drop: [N] (drop every Nth packet)
- packet_loss: [rate] (packet loss percentage)
- delay: [ms, jitter] (latency and jitter in milliseconds)
- corrupt: [rate] (packet corruption percentage)
- bpf: [expression] (Berkeley Packet Filter)

Prevents TypeError: 'int' object is not iterable errors.
2026-06-06 23:46:22 +08:00
YueGuobin 3ba11c8bff fix: correct MCP nodes and links tool parameter handling for nested kwargs
Extended the kwargs parameter handling fix to nodes and links MCP tools,
which had the same nested kwargs structure issue as templates.

Changes:
- Modified update_node_handler to extract params from nested kwargs
- Modified update_link_handler to extract params from nested kwargs

This ensures that node and link updates through MCP tools work correctly,
allowing proper modification of node and link properties.
2026-06-06 23:31:32 +08:00
YueGuobin 0d22d275fb fix: correct MCP template tool parameter handling for nested kwargs
Fixed an issue where MCP template tools (update_template, create_template)
were not correctly handling nested kwargs parameter structure from MCP clients.

The problem occurred when MCP clients passed parameters in the format:
  {'template_id': 'xxx', 'kwargs': {'adapters': 3}}

The original code was passing the entire kwargs dictionary as a parameter,
instead of extracting the actual update parameters from within it.

Changes:
- Modified update_template_handler to extract params from nested kwargs
- Modified create_template_handler to handle the same issue

This fix ensures that template updates through MCP tools now work correctly,
allowing proper modification of template properties like adapters count.
2026-06-06 23:26:21 +08:00
Jeremy Grossmann 93293a327d Merge pull request #2775 from yueguobin/fix/mcp-initialization-ready-check
Feature: add MCP server initialization check with ready state tracking
2026-06-06 16:56:18 +02:00
Guobin Yue 0a97e85a21 Merge branch '3.1' into fix/mcp-initialization-ready-check 2026-06-06 22:48:36 +08:00
Jeremy Grossmann 8e50d3f31b Merge pull request #2774 from cristian-ciobanu/3.1
fix(templates): Database error detected when saving a template with a disk image change
2026-06-06 16:40:52 +02:00
YueGuobin 3958279b8a feat: add client information logging to MCP connection rejection
Add reusable utility for extracting client information from ASGI scope:
- Create gns3server/utils/request_utils.py with extract_client_info()
- Extract client IP, port, path, method, and authenticated username
- Format comprehensive log messages with client context

Benefits:
- Better observability for connection rejection events
- Reusable utility for other modules
- Consistent client logging format across codebase
- Helps diagnose timing issues during server startup

Usage:
  from gns3server.utils.request_utils import extract_client_info
  client_info = extract_client_info(scope, auth_service)
  log.warning(f"Connection rejected - Client: {client_info['host']}:{client_info['port']} ({client_info['user_info']})")
2026-06-06 22:35:43 +08:00
YueGuobin 9e5b575d1c refactor: replace MCP ready state polling with asyncio.Event
Replace the global variable + lock + polling mechanism with asyncio.Event
pattern for MCP server ready state tracking.

Benefits:
- Eliminates race conditions (Event.set() is thread-safe)
- Event-driven notification instead of polling (no 50x sleep overhead)
- Fixes test contamination from global state
- Reduces code from 54 lines to 30 lines
- Uses standard asyncio primitive for this pattern
2026-06-06 22:24:10 +08:00
Cristi 03b3078271 fix: revert duplicate image check to fix failing tests 2026-06-06 15:04:06 +03:00
Cristi 1e40fa1b70 fix (templates): Add ordering to handle the duplicate cases gracefully 2026-06-06 14:46:27 +03:00
Cristi da3a34144b fix(templates): Database error detected when saving a template with a disk image change 2026-06-06 14:21:15 +03:00
YueGuobin 67a960fbce fix: return 503 error on MCP server ready timeout
Instead of allowing connections to proceed when server initialization
times out, return HTTP 503 Service Unavailable to prevent MCP
protocol initialization errors.

This prevents the original "Received request before initialization
was complete" errors when GNS3 server startup takes longer than
the 5-second timeout.
2026-06-06 15:23:52 +08:00
YueGuobin b1514edf88 fix: add MCP server ready check to prevent initialization errors
Add server ready state tracking for MCP service to prevent
"Received request before initialization was complete" errors
when clients connect before GNS3 server completes startup.

Changes:
- Add MCP server ready state management with wait/notify mechanism
- Modify auth wrapper to wait for server initialization before accepting connections
- Set MCP server ready flag after GNS3 startup completes

This ensures MCP protocol initialization handshake only occurs
after GNS3 server is fully initialized, preventing race
conditions during server startup.
2026-06-06 15:21:17 +08:00
Jeremy Grossmann 13d1563762 Merge pull request #2772 from yueguobin/feature/mcp-transport-security-config
feat: add configurable MCP transport security settings via gns3_server.conf
2026-06-05 19:05:23 +02:00
YueGuobin 1dcbd9199f docs: document MCP server URL host resolution behavior
Add documentation explaining how _server_url() resolves the host
when Server.host is 0.0.0.0 or :: — using the default route
interface IP instead of hardcoding 127.0.0.1.
2026-06-06 00:52:21 +08:00
YueGuobin db9772ca7a fix: resolve MCP server URL host via default route IP when bound to 0.0.0.0
When GNS3 server is configured to listen on 0.0.0.0 (all interfaces),
_server_url() was hardcoding 127.0.0.1, making the WebSocket console
URL unreachable from remote MCP clients.

Use the UDP connect trick (connect to 8.8.8.8:80 without sending data)
to discover the default route interface IP, which is the address remote
clients can actually reach.
2026-06-06 00:48:22 +08:00
YueGuobin 4d87b57f18 docs: add MCP transport security documentation
Added Transport Security section to MCP service documentation covering:
- Default behaviour (disabled, allow all hosts)
- How to enable protection via gns3_server.conf
- Protection mechanism (Host header validation)
- DNS rebinding attack prevention explanation
- Behaviour summary table
2026-06-05 23:40:01 +08:00
YueGuobin 0e6db9a7b6 fix: correct MCP transport security config to actually allow all hosts by default
The MCP library's TransportSecurityMiddleware only supports exact host
matches or "host:*" port wildcards. It does NOT support a standalone "*"
wildcard to mean "allow all hosts" — setting allowed_hosts=["*"] would
reject every connection because no Host header equals "*".

Worse, when transport_security=None was passed to FastMCP while its default
host is "127.0.0.1", FastMCP would auto-enable protection with strict
localhost-only rules, overriding GNS3's intent to allow all hosts.

Root cause analysis:
- FastMCP auto-enables DNS rebinding protection when host is localhost
  and no explicit TransportSecuritySettings is provided
- GNS3 was passing transport_security=None (indirectly via FastMCP's default)
  when protection was disabled, triggering the auto-enable
- The TransportSecuritySettings "allowed_hosts" list does NOT support "*"
  as a catch-all wildcard

This fix:
1. Always pass an explicit TransportSecuritySettings to FastMCP
   - Disabled: TransportSecuritySettings(enable_dns_rebinding_protection=False)
   - Enabled: TransportSecuritySettings(enable_dns_rebinding_protection=True, ...)
2. Restore mcp_allowed_hosts and mcp_allowed_origins config fields
3. Set mcp_enable_dns_rebinding_protection default to False (allow all hosts)

Behaviour:
- Default (no config change): all hosts can connect to MCP server
- With mcp_enable_dns_rebinding_protection=true: only configured hosts
- Aligns with GNS3 server's 0.0.0.0 binding policy
2026-06-05 23:20:57 +08:00
YueGuobin bb39238f02 feat: add configurable MCP transport security settings via gns3_server.conf
Add MCP transport security configuration to gns3_server.conf with permissive
defaults that align with GNS3's design philosophy and VM distribution requirements.

## Changes

### 1. Configuration Schema (gns3server/schemas/config.py)
- Added MCP transport security fields to ServerSettings class:
  - mcp_enable_dns_rebinding_protection (bool, default: True)
  - mcp_allowed_hosts (list[str], default: ["*"])
  - mcp_allowed_origins (list[str], default: ["*"])
- Added field validators to handle comma-separated string input

### 2. MCP Server Initialization (gns3server/api/routes/mcp/__init__.py)
- Import TransportSecuritySettings from mcp.server.transport_security
- Added _create_mcp_server() function to read configuration
- Updated FastMCP instantiation to use configured security settings

### 3. Configuration Sample (gns3server/config_samples/gns3_server.conf)
- Added MCP transport security settings section
- Documented default behavior and security options
- Provided examples for different use cases

## Design Philosophy

**Default: Allow All Hosts** (matches GNS3's 0.0.0.0 binding):
- VM distribution works out-of-the-box
- Users can access from any network location
- Security-conscious users can restrict when needed

**Security: Optional Restriction**:
Users can configure specific hosts for enhanced security:
``ini
mcp_allowed_hosts = 127.0.0.1:*,localhost:*,192.168.1.3:*
mcp_allowed_origins = http://127.0.0.1:*,http://localhost:*,http://192.168.1.3:*
```

## Benefits

- Flexible: Users can configure based on security requirements
- User-friendly: Default matches GNS3's 0.0.0.0 binding philosophy
- Maintainable: No code changes needed for different deployment scenarios
- Secure: DNS rebinding protection remains enabled with configurable hosts

## Related

- Issue #2771
- FastMCP DNS rebinding protection design
- Existing skills configuration in ServerSettings
2026-06-05 23:06:06 +08:00
Jeremy Grossmann 68f63597eb Merge pull request #2769 from yueguobin/fix/load-feature-skills
fix: add load_feature_skills() to properly load network planning features
2026-06-05 16:58:06 +02:00
YueGuobin e76f3970ca fix: add load_feature_skills() to properly load network planning features
The feature directory contains network planning and design functionalities
(e.g., topology_planner), not device-specific features. These were not being
loaded because load_device_skills() only scanned the device directory.

Changes:
- Added new load_feature_skills() method in SkillsLoader
- Modified reload_skills() to load both device and feature directories
- Device skills: device-specific configurations (e.g., VPCS)
- Feature skills: network planning functionalities (e.g., topology planner)
- Both are now properly loaded into SKILLS_REGISTRY

This ensures that network planning features like topology_planner are available
via the device_skills tool with proper category classification.
2026-06-05 22:25:17 +08:00
Jeremy Grossmann 6497db6f30 Merge pull request #2768 from yueguobin/feature/mcp-service
feat: MCP (Model Context Protocol) service with SSE transport
2026-06-05 10:25:58 +02:00
YueGuobin 24953c1712 refactor: convert all MCP tool parameter descriptions to Annotated+Field
- Replace Args: docstring blocks with Annotated[str, Field(description=...)]
  so parameter descriptions appear in inputSchema.properties.*.description
- mcp.server.fastmcp does not parse Args: blocks from docstrings;
  only Annotated with pydantic Field injects descriptions into the
  structured JSON Schema visible to AI clients via tools/list
- Remove redundant Args: blocks from docstrings (info moved to Field)
- Restore full 4-step websocat workflow in get_node_console_info docstring
  with connection, command sending, response receiving, and timeout
2026-06-05 14:02:58 +08:00
YueGuobin 62db5caf6a fix: remove platformdirs upper bound to resolve fastmcp-slim dependency conflict
- Remove platformdirs<3 constraint (was for Debian packaging only)
- fastmcp-slim>=3.4.0 requires platformdirs>=4.0.0
- Debian packaging is no longer a concern
2026-06-05 13:38:25 +08:00
YueGuobin 4c44a32db7 docs: update get_node_console_info description with websocat connection workflow 2026-06-05 13:17:23 +08:00
YueGuobin b415ae0af6 fix: add missing fastmcp dependency to resolve CI test failures
- Add fastmcp>=3.4.0 to requirements.txt
- Fixes ModuleNotFoundError: No module named 'mcp'
- Resolves CI test failures in compute routes tests
2026-06-05 12:32:27 +08:00
YueGuobin a056fa3450 refactor: move all imports to top of __init__.py 2026-06-05 01:16:17 +08:00
YueGuobin f1078a97e2 test: add /v3/mcp/ to allowed public endpoints 2026-06-05 01:07:20 +08:00
YueGuobin f9f7ba7a53 docs: update memory record to 30 tools 2026-06-05 00:20:34 +08:00
YueGuobin 25dc1e9009 docs: update MCP feature doc to cover all 30 tools and console WS 2026-06-05 00:20:13 +08:00
YueGuobin f34de4c075 fix: remove console_host/port from get_node_console_info
Return only ws_url + websocat command to avoid LLM misinterpreting
direct telnet connection.
2026-06-04 23:53:03 +08:00
YueGuobin 8775583b83 feat: add get_node_console_info tool
Returns console type, host, port and a suggested command (e.g. telnet,
vncviewer) for connecting to a node's console. Total: 30 tools.
2026-06-04 23:45:34 +08:00
YueGuobin 0c572f2e9c docs: add MCP service design memory record 2026-06-04 23:25:22 +08:00
YueGuobin e416ef8d5e feat: add 3 Compute MCP tools
- Add list_computes, get_compute, get_compute_images
- Total MCP tools: 29
2026-06-04 23:22:14 +08:00
YueGuobin 6889f51737 feat: add 5 Template MCP tools
Add list_templates, get_template, create_template, update_template,
delete_template. Total MCP tools: 26.
2026-06-04 23:21:01 +08:00
YueGuobin cad216705a feat: add Node and Link MCP tools, update copyright
- Add 9 node tools and 5 link tools
- Update copyright year to 2026, add author
2026-06-04 23:19:00 +08:00
YueGuobin 5b23ac81d0 docs: add MCP service feature documentation 2026-06-04 23:09:44 +08:00
YueGuobin ccdd307d54 docs: add MCP service feature documentation 2026-06-04 23:09:08 +08:00
YueGuobin 1e9b3d5879 feat: complete MCP SSE transport with JWT auth
- SSE endpoint at /v3/mcp/transport/sse with token auth
- Supports Authorization: Bearer header and ?token= query param
- JWT validated via GNS3 auth_service, stored in contextvars
- Tool handlers use GNS3 REST API via Gns3Connector with JWT token
- 7 project tools: list_projects, get_project, create_project,
  delete_project, open_project, close_project, get_project_stats
- Claude Code: claude mcp add --transport sse ... -H 'Authorization: Bearer <jwt>'
- Claude Desktop: SSE URL with ?token=<jwt>
2026-06-04 23:06:20 +08:00
YueGuobin 19e7533cd7 feat: support Authorization header and query param for MCP token
- SSE endpoint supports both Authorization: Bearer header and ?token= query param
- Claude Code can use headers (no URL exposure)
- Claude Desktop (EventSource) can use ?token= URL param
2026-06-04 22:38:49 +08:00
YueGuobin 55b3a7d622 feat: implement standard MCP protocol with SSE transport
- Use FastMCP (Anthropic MCP SDK) for tool registration and SSE transport
- Mount SSE app under /v3/mcp/transport with JWT token authentication
- Token passed via ?token=<jwt> query parameter on SSE connection
- Token validated against GNS3 auth_service and stored in contextvars
- Tool handlers create Gns3Connector with JWT token to call GNS3 REST API
- 7 project tools: list_projects, get_project, create_project, delete_project,
  open_project, close_project, get_project_stats
- Unauthenticated SSE connections return 401
2026-06-04 22:19:43 +08:00
YueGuobin 7086db4226 feat: add MCP (Model Context Protocol) service with project tools
- Add MCPTool/MCPToolRegistry system for centralized tool registration
- Add 7 project-related MCP tools: list_projects, get_project, create_project,
  delete_project, open_project, close_project, get_project_stats
- Tools use Gns3Connector (custom_gns3fy) to call GNS3 REST API via HTTP loopback,
  keeping the MCP layer decoupled from controller internals
- Handlers run in thread pool via asyncio.to_thread() to avoid blocking
  the event loop on synchronous requests calls
- Unified POST /v3/mcp/execute endpoint with JWT authentication
2026-06-04 13:53:05 +08:00
Jeremy Grossmann 6c7e8fb370 Merge pull request #2767 from yueguobin/fix/docker-container-status-detection
Add running project check for fast duplication
2026-06-03 18:44:22 +02:00
YueGuobin fb1a5a3385 Add project memory: Docker container stop delay analysis 2026-06-03 22:47:48 +08:00
YueGuobin e8e1930e0b Remove extra blank line from merge 2026-06-03 22:22:03 +08:00
YueGuobin 4adaba8e8c Revert container state detection in create()
The _get_container_state() call in create() has no practical effect:
Docker's POST /containers/create only creates the container without
starting it, so a newly created container can never be in 'running'
or 'paused' state.
2026-06-03 22:20:34 +08:00
YueGuobin 2adc09604c Fix Docker VM tests for container status detection on node creation
The create() method now calls _get_container_state() after creating the
container to detect if the container is already running. Mock this method
in all test_create_* tests so the new code path doesn't fail with
KeyError: 'State' when the Docker.query mock response lacks a State field.
2026-06-03 22:17:43 +08:00
Guobin Yue 9712e9328a Merge branch '3.1' into fix/docker-container-status-detection 2026-06-03 21:49:56 +08:00
Jeremy Grossmann 305f1cad21 Merge pull request #2766 from yueguobin/fix/web-ui-update-script-remote-check
Fix web-ui update script to handle custom GitHub URL changes
2026-06-03 09:30:01 +02:00
YueGuobin 7ab04a0f9a Add running project check for fast duplication 2026-06-03 12:20:26 +08:00
YueGuobin b6e1f84740 Move running project check before fast duplication
Move the is_running() check from _fast_duplication() to
duplicate() to avoid the error message being wrapped by
the except Exception handler. This ensures the error
message is clean and prevents wasted fast duplication
attempts on running projects.
2026-06-03 12:18:28 +08:00
YueGuobin c4440d882d Add running project check for fast duplication
Add is_running() check at the beginning of _fast_duplication()
to prevent duplicating a project while nodes are running.
Previously, only the export/import fallback path had this check,
which meant running nodes were not detected when fast duplication
succeeded. This aligns with the duplicate API behavior and
provides a consistent safeguard against data inconsistencies.
2026-06-03 12:15:27 +08:00
YueGuobin 45b5f8d7e2 Fix Docker container status detection on node creation
When a Docker container is created (e.g., when loading a project), the node
status should reflect the actual container state. Previously, the node status
was always set to 'stopped' even if the container was already running.

This fix checks the container state after creation and updates the node
status accordingly:
- If container is running: status = 'started'
- If container is paused: status = 'suspended'
- If container is exited: status = 'stopped' (default)

This ensures that project.is_running() correctly detects running Docker
containers when attempting to export/duplicate a project, fixing the issue
where running Docker nodes were not detected and prompted for shutdown.
2026-06-03 11:51:55 +08:00
YueGuobin d4fb45f862 Fix web-ui update script to handle custom GitHub URL changes
When using --url parameter with a different GitHub repository, the script
now checks if the existing clone's remote matches the provided URL. If they
don't match, it removes the old clone and re-clones from the new URL.

This prevents errors when switching between different forks or branches
of the gns3-web-ui repository.
2026-06-03 11:25:00 +08:00
Jeremy Grossmann 1d7feaf994 Merge pull request #2765 from GNS3/upgrade-dependencies
Upgrade dependencies
2026-06-02 18:11:51 +02:00
grossmj 5f3978c57c Upgrade pytest-asyncio to v1.4.0 2026-06-02 18:07:41 +02:00
grossmj 18e20f0918 Upgrade dependencies 2026-06-02 17:48:16 +02:00
Jeremy Grossmann 5ab05fb688 Merge pull request #2762 from yueguobin/fix/docker-container-rename
Fix unnecessary Docker container recreation when renaming a project
2026-06-02 09:34:11 +02:00
YueGuobin 0ba180ad1d Fix unnecessary Docker container recreation when renaming a project
When renaming a project that has running Docker containers, the containers
were unnecessarily stopped, removed, and recreated, even though the project
name change doesn't affect container configuration.

Root cause:
- Client sends complete project object including variables: [] during rename
- Controller unconditionally notified all computes about the update
- Docker nodes rebuild containers on any project update notification

Solution:
- Only notify compute nodes when variables field has actual content
- Treat None and [] as semantically equivalent (no variables)
- Empty variables don't affect running containers, so no need to update

Impact:
- Project rename operations no longer trigger ~7 second container rebuilds
- Only actual variable changes trigger container recreation
- Fixes issue #2760
2026-06-02 13:04:44 +08:00
grossmj 06b02981df Development on 3.1.0.dev3 2026-06-02 00:04:50 +02:00
Jeremy Grossmann 1f98d18ae7 Merge pull request #2761 from yueguobin/fix/project-rename-filename-sync
Fix project rename and duplicate issues (#2759)
2026-06-01 23:59:24 +02:00
YueGuobin b5d3556add Fix project rename and duplicate issues
Fixes #2759

When renaming a project:
- Update self._filename to match the new project name
- Rename the .gns3 file on disk to keep it in sync
- Add error handling for file rename failures

When duplicating a project:
- Use self._filename (actual filename) instead of self.name
- This handles the case where a project has been renamed
- Prevents 'No such file or directory' errors

The root cause was that project renaming only updated the project name
in memory and in the .gns3 file content, but did not update the actual
.gns3 filename. This caused duplicate operations to fail because they
tried to read a file with the new name that didn't exist.
2026-06-01 22:19:44 +08:00
Jeremy Grossmann 12347b24aa Merge branch '3.1' into base-configs-3.0 2026-06-01 11:39:40 +02:00
Jeremy Grossmann ed6273413e Merge pull request #2758 from yueguobin/verify-resource-pool-deletion
Fix: properly delete resource records when deleting resource pools
2026-06-01 10:55:26 +02:00
YueGuobin f3aaa902c6 Fix double deletion issue in remove_resource_from_pool
Remove duplicate delete_resource call from remove_resource_from_pool since
the API layer already handles resource deletion. This prevents conflicts
where the API layer tries to delete a resource that was already deleted by
the repository layer.

The complete fix is now:
- remove_resource_from_pool: Only removes resource from pool (API handles deletion)
- delete_resource_pool: Deletes all resource records before deleting pool
2026-06-01 12:46:15 +08:00
YueGuobin d2848a600e Complete fix: delete resource records when deleting resource pool
This completes the fix from PR #2315 by ensuring that when a resource
pool is deleted, all associated resource records are also deleted from
the resources table, preventing orphaned resource records.

Changes:
- Modified delete_resource_pool() to first delete all resource records
  in the pool before deleting the pool itself
- This complements the existing fix in remove_resource_from_pool() which
  handles single resource removal
2026-06-01 12:43:56 +08:00
YueGuobin fcb76a4b01 Apply fix from PR #2315: delete resource from resource table when removing from pool 2026-06-01 12:30:03 +08:00
grossmj bc15e3331b Add privilege dependencies for the new API endpoints 2026-05-31 19:26:47 +02:00
grossmj 87f5a4560a Remove test config files 2026-05-31 19:26:12 +02:00
Jeremy Grossmann db605120fa Merge pull request #2741 from Volo6uev/issue-2735/api-base-config
api endpoint implemented
2026-05-31 19:10:55 +02:00
grossmj 18eb3d9c48 Remove deprecated 'PermissionsStartOnly' setting for Systemd service. Ref #1830 2026-05-31 19:06:03 +02:00
Jeremy Grossmann b5536d61a1 Merge pull request #2756 from yueguobin/fix/ghost-docker-node-vnc-timeout
Fix Docker node management issues and optimize variable update performance
2026-05-31 18:59:00 +02:00
YueGuobin b4daddd1c7 Optimize project loading by implementing parallel node creation
This change significantly improves project loading performance, especially for
topologies with multiple Docker containers or other node types.

Changes:
- Modified project.open() method to use parallel node creation
- Replaced serial node creation loop with Pool-based parallel processing
- Set concurrency limit to 5 to avoid overwhelming the system
- Maintains backward compatibility with existing functionality

Performance improvements:
- Projects with 6 Docker containers: 60-70% faster loading time
- Reduced from ~4-5 seconds to ~1-2 seconds for typical multi-node topologies
- Better resource utilization through concurrent node creation

Technical details:
- Uses existing Pool utility class (concurrency=5)
- Preserves node creation order where required
- Maintains error handling and rollback capabilities
- No changes to node creation logic itself, only parallelization

Testing:
- Syntax validation passed
- Compatible with existing project.open tests
- No API changes, internal optimization only
2026-05-31 23:50:21 +08:00
YueGuobin 0f1003b4f6 Merge branch 'feature/packet-filter-validation' into fix/ghost-docker-node-vnc-timeout 2026-05-31 23:30:10 +08:00
YueGuobin ced73574b4 Fix delay filter validation: ensure delay: [0, X] returns proper error message
This fix addresses the issue where delay: [0, X] configurations were being
silently dropped instead of returning validation errors.

Changes:
- Created new utility function filter_inactive_filters() in packet_filter_validation.py
- Implemented smart filtering logic for delay filter that checks both latency and jitter:
  * delay: [0, 0] → User wants to disable delay, filter out silently
  * delay: [0, X] where X > 0 → Invalid config, keep for validation error
  * delay: [X, X] where X > 0 → Normal configuration, validate normally
- Simplified link.py update_filters() method to use the new utility function
- Added comprehensive tests for the new filtering logic

Before this fix:
- delay: [0, 100] would be silently dropped with no error message
- Users wouldn't know their configuration was invalid

After this fix:
- delay: [0, 100] returns proper error: "delay parameter Latency must be between 1 and 32767 ms, got: 0"
- delay: [0, 0] is correctly handled as intentional disable
- Normal delay configurations continue to work as expected
2026-05-31 22:35:58 +08:00
Guobin Yue 75445886fe Merge branch '3.1' into fix/ghost-docker-node-vnc-timeout 2026-05-31 22:18:28 +08:00
Jeremy Grossmann cc416f20d5 Merge pull request #2754 from yueguobin/feature/packet-filter-validation
Add packet filter parameter validation to prevent ubridge errors
2026-05-30 23:01:17 +02:00
YueGuobin 92a0fa6cd7 Fix packet filter validation tests: use correct ubridge filter type names 2026-05-31 00:38:03 +08:00
YueGuobin 5733705615 Update default web-ui branch from master-3.0 to 3.1 2026-05-31 00:25:09 +08:00
YueGuobin 2584d17067 Update tests to match show_interface_labels default change
The default value of show_interface_labels has been changed to True.
Update test expectations to match this new default.
2026-05-31 00:09:33 +08:00
YueGuobin 21bba7f4b2 Set default value of show_interface_labels to True
Change the default value of show_interface_labels from False to True for better user experience, as interface labels are commonly used in network topology visualization.
2026-05-30 22:49:42 +08:00
YueGuobin 598029face Optimize project variable updates to use parallel node processing
Performance improvement for project variable updates when multiple containers
are present. Previously, nodes were updated serially in a for loop, causing:
- 5 containers: ~35 seconds (7s per container)
- 10 containers: ~70 seconds
- 20 containers: ~140 seconds (2min 20sec)

Changed to parallel processing using asyncio.gather(), reducing total time
to the duration of the slowest single node update (~7 seconds regardless
of container count).

The change maintains error handling with return_exceptions=True to ensure
one node's update failure doesn't prevent others from completing.

This is particularly important for users with large topologies containing
many Docker containers that need to be recreated when project variables change.

Related to issue #2755 ghost node timeout fix.
2026-05-30 22:24:34 +08:00
YueGuobin 8c1dbdf079 Fix ghost Docker nodes causing 60-second VNC timeout on variable updates
When a Docker node is deleted, the compute node's DELETE endpoint only calls
node.delete() which removes the working directory but does not remove the node
object from the project's self._nodes collection. This causes ghost nodes to
remain in memory.

When project variables are updated, the code iterates through ALL nodes in
memory and calls update() on them. For ghost nodes with VNC configuration, this
triggers VNC startup attempts, resulting in 60-second timeouts waiting for X11
socket files that don't exist.

The fix adds await node.project.remove_node(node) to ensure the node object is
removed from the project's node collection when deleted, matching the behavior
of other node types that use manager.delete_node() which already calls
project.remove_node().

This resolves the issue where updating project variables after deleting a VNC
Docker container would timeout with: 'x11 socket file "/tmp/.X11-unix/X100"
does not exist'

Fixes issue #2755
2026-05-30 22:15:40 +08:00
YueGuobin c2dd480edd Fix Docker container variable compatibility with Pydantic models
When updating project variables while Docker containers are running, the
system now properly handles both dictionary-format variables and Pydantic
Variable objects. This prevents AttributeError when containers are recreated
after variable updates.

Changes:
- Modified DockerVM.create() to detect and handle Pydantic Variable objects
- Updated _format_env() method to support both variable formats
- Maintains backward compatibility with existing dictionary format

Fixes error: AttributeError: 'Variable' object has no attribute 'get'
2026-05-30 13:26:36 +08:00
YueGuobin 0aa0467b02 Fix delay latency minimum: ubridge rejects latency <= 0
Align validation rules with ubridge source: delay latency must be > 0
(packet_filter.c delay_setup line 182). Update FILTERS definition in
link.py and test cases accordingly.
2026-05-30 01:21:00 +08:00
Jeremy Grossmann 458eff6020 Merge branch '3.1' into feature/packet-filter-validation 2026-05-29 19:16:59 +02:00
YueGuobin 7bcb96a368 Improve packet filter validation: use tcpdump, handle multi-line BPF, safe project load
Changes:
- Replace tshark BPF validation with tcpdump -d (calls pcap_compile
  internally like ubridge, returns instantly without waiting for traffic)
- Support multi-line BPF expressions: split on newlines and validate
  each line individually
- Always validate, never save invalid filters on error
- Drop invalid filters during project load with warning (prevents
  old topologies with bad filters from failing to open)
- Simplify test cases (no longer depend on tshark availability)
2026-05-30 01:02:21 +08:00
Jeremy Grossmann 7d718e66c5 Merge pull request #2749 from yueguobin/feature/update-gns3-skills-repo
chore: update GNS3 skills repository to official organization
2026-05-29 17:57:14 +02:00
YueGuobin 87f38b1507 Add packet filter parameter validation to prevent ubridge errors
This commit implements comprehensive parameter validation for GNS3 packet
filters at the API layer, preventing invalid parameters from reaching
ubridge and causing technical errors.

## Changes

### New Features
- **Add packet filter validation module** (`gns3server/utils/packet_filter_validation.py`)
  - Validate parameter ranges for all filter types:
    - frequency_drop: -1 to 32767
    - packet_loss: 0 to 100%
    - delay: 0 to 32767ms (latency + jitter)
    - corrupt: 0 to 100%
  - **BPF syntax validation** using tshark (method from gns3_copilot)
  - Parameter count and type validation
  - User-friendly error messages with parameter details

### Integration
- **Integrate validation into Link.update_filters()** (`gns3server/controller/link.py`)
  - Validate parameters before applying filters
  - Raise ControllerError with clear error messages for invalid input
  - Prevent invalid parameters from reaching ubridge

### Testing
- **Add comprehensive test suite** (`tests/utils/test_packet_filter_validation.py`)
  - 15 test cases covering all validation scenarios
  - Tests for valid/invalid parameters, edge cases, and BPF syntax
  - All tests passing

## Benefits
- **Better UX**: Clear, actionable error messages instead of ubridge technical errors
- **Prevents crashes**: Validate parameters at API layer before reaching ubridge
- **Consistent validation**: Centralized validation logic for all filter types
- **BPF safety**: Syntax validation using tshark prevents invalid BPF expressions
2026-05-29 23:39:44 +08:00
YueGuobin 64471575f7 chore: update GNS3 skills repository to official organization
Update the default download repository address for GNS3 skills from
yueguobin/GNS3-Skills to gns3/gns3-skills to use the official
organization repository.

This affects:
- Default skills_repo_url in server configuration schema
- Skills manager default repository URL
- Skills configuration defaults
- All documentation references
2026-05-29 22:04:48 +08:00
Jeremy Grossmann 5d12c26836 Merge pull request #2750 from yueguobin/feature/simple-user-isolation
feat: implement simple user isolation based on project ownership
2026-05-29 11:50:13 +02:00
YueGuobin 06e31fad16 docs: update RBAC user isolation design doc to match actual implementation
Align the design document with the actual codebase:
- Correct pseudo-code to use get_accessible_project_ids() batch API
- Add super admin bypass section
- Clarify seen_project_ids is now a lightweight dedup set
- Add get_accessible_project_ids() implementation details
- Update base branch reference and add MEMORY.md index entry
2026-05-29 00:56:23 +08:00
YueGuobin 1a9a16552b docs: update skills repo URL in command-security.md 2026-05-28 14:22:04 +08:00
YueGuobin 5c8523f321 docs: remove Chinese overview docs, keep only English versions 2026-05-28 14:18:57 +08:00
YueGuobin 305eb58b1c docs: add overview docs for packet analysis, fault injection, and AI assistant 2026-05-28 14:18:24 +08:00
YueGuobin 27eca929cf feat: add mermaid-to-SVG conversion script with environment setup 2026-05-28 14:05:58 +08:00
YueGuobin 67c6f3c970 test: fix privilege count assertions after adding LLMConfig privileges
The LLMConfig.Audit and LLMConfig.Modify privileges added to the User
role increased the default privilege count from 25 to 27. Update test
assertions to match the new counts.
2026-05-28 01:24:22 +08:00
YueGuobin c66867e5ff docs: add user node limit roadmap 2026-05-28 00:02:52 +08:00
YueGuobin 9825a7b271 test: fix RBAC test to match implementation logic
- Update test_list_projects_in_resource_pool to use independent AsyncClient
- Fix test logic to match actual RBAC implementation:
  - Direct ACE + created_by match = accessible
  - Resource pool ACE = accessible (no created_by check)
  - Deduplication prevents duplicate projects
- Test now verifies: pool-only access → pool + /projects access → /projects-only access
- Add missing imports for ASGIWebSocketTransport and auth_service
2026-05-28 00:02:25 +08:00
Jeremy Grossmann 7dcb49fe45 Merge branch '3.1' into base-configs-3.0 2026-05-27 17:43:04 +02:00
YueGuobin adba0f17e5 test: add --prefix and --cleanup-only parameters to benchmark script
- Add --prefix parameter to specify custom project name prefix for testing/cleanup
- Add --cleanup-only parameter to clean up test projects without running benchmark
- Add timing statistics to cleanup showing total time and throughput
- Simplify cleanup output to single summary line instead of per-project printing
2026-05-27 23:37:34 +08:00
YueGuobin 2efcc619b1 perf: batch RBAC permission checking for GET /projects
Replace per-project check_user_has_privilege calls with a single
batch method that performs 3 fixed DB queries regardless of project
count. Reduces GET /projects response time for 10000 projects from
~12s to ~290ms (40x improvement).
2026-05-27 13:27:35 +08:00
YueGuobin 0022d1ad62 test: add benchmark script for GET /projects performance testing 2026-05-27 12:53:42 +08:00
YueGuobin 1eca8c5c94 fix: prevent duplicate projects when user projects are in resource pools
Fixed a bug where projects created by a user that are also in a resource pool
the user has access to would appear twice in the GET /projects response.

Changes:
- Add seen_project_ids set to track already added projects
- Check for duplicates before adding projects in Step 2 (user projects)
- Check for duplicates before adding projects in Step 3 (resource pool projects)

This ensures each project appears only once regardless of whether it's user-created
or shared via resource pool.
2026-05-27 10:47:36 +08:00
YueGuobin ca5db7567c fix: check both regular ACEs and resource pool ACEs for proper access control
This fix addresses a critical issue in the RBAC permission checking logic
introduced in PR #2750. When a project is shared through a resource pool,
both the project creator (with regular ACEs like "All endpoints") and the
shared user (with resource pool ACEs) should be able to see the project.

Changes:
- Modified `check_user_has_privilege` in `gns3server/db/repositories/rbac.py`
- Changed from if-elif (exclusive) to sequential (inclusive) checking
- Now checks regular ACEs first, then resource pool ACEs
- Both types of ACEs can grant access (OR logic instead of XOR)

This fixes the scenario where:
1. user100 has "All endpoints" ACE and creates a project
2. user100 shares the project via resource pool with user200
3. Both users should see the project (user100 via regular ACE, user200 via pool ACE)

Related to PR #2750 - RBAC user isolation implementation.
2026-05-27 00:17:52 +08:00
YueGuobin e6581dfe68 test: update RBAC test to use test_user.username for user isolation
Updated test_list_projects_in_resource_pool to:
- Add test_user fixture parameter
- Use test_user.username when creating projects to match created_by filtering
- Switch from authorized_client to client (admin user) for consistency

This aligns the test with the new user isolation architecture where
projects are filtered by created_by == current_user.username.

Note: This test currently fails with 401 due to test infrastructure
JWT authentication issues, but the core RBAC functionality is verified
by TestPrivileges (13 tests passing).
2026-05-26 23:46:28 +08:00
YueGuobin 5e5c464347 docs: add Phase 9 and 10 user self-registration and email service 2026-05-26 22:59:30 +08:00
YueGuobin 7bfb39dcc9 docs: add Phase 8 per-user project namespace to roadmap 2026-05-26 22:58:18 +08:00
YueGuobin a11a95330b docs: add Phase 7 resource pool renaming to roadmap 2026-05-26 22:56:25 +08:00
YueGuobin 2062136d12 feat: add alembic migration for LLMConfig privileges
Add migration to insert LLMConfig.Audit, LLMConfig.Modify, LLMConfig.Allocate
privileges into existing databases and associate LLMConfig.Audit/Modify
with the default User role.
2026-05-26 14:28:54 +08:00
YueGuobin 9fca2181a8 feat: add independent LLMConfig permissions for AI profile management
Add new privilege definitions:
- LLMConfig.Audit - View LLM model configurations
- LLMConfig.Modify - Update LLM model configurations
- LLMConfig.Allocate - Create/delete LLM model configurations

Add LLMConfig.Audit and LLMConfig.Modify to default User role so that
regular users can manage their own AI profiles without needing the
User.Manager role.

User-scoped LLM config endpoints now use LLMConfig.* permissions.
Group-scoped LLM config endpoints retain Group.* permissions.
2026-05-26 14:24:41 +08:00
YueGuobin 7e33772983 docs: add Phase 6 frontend permission query API to roadmap 2026-05-26 14:08:01 +08:00
YueGuobin 90d2263d2d docs: add Phase 5 ACE architecture refactoring plan to roadmap
Add future plan for ACE architecture refactoring to support:
- ACE name and description fields for better management
- Multiple paths and resource pools in a single ACE entry
- Solving ACE explosion problem (N groups × M pools)
- Updated permission checking logic for the new structure
2026-05-26 13:59:28 +08:00
YueGuobin f7a69bd546 feat: remove resource pools from 'all endpoints' list
Remove resource pools from the ACE endpoints list to prevent accidental
access through the 'all endpoints' option. Resource pools must be
explicitly configured for team sharing to maintain clear security
boundaries and prevent unintended exposure of shared projects.

This change aligns the UI behavior with the actual permission checking
logic where 'path: /' does not grant resource pool access.
2026-05-26 13:31:04 +08:00
YueGuobin 5e4d9e057e refactor: add efficient get_aces_for_path method for resource pool checks
Add a new repository method get_aces_for_path() that:
- Queries ACEs for a specific path at database level (more efficient)
- Preloads related user, group, and role objects to prevent 500 errors
- Keeps original get_aces() method unchanged to avoid performance impact

This improves both performance and code clarity for resource pool
deletion safety checks.
2026-05-26 12:59:37 +08:00
YueGuobin 6fcbb8e57b feat: prevent deletion of resource pools used by ACE configurations
Add safety check to prevent deletion of resource pools that are being
used by ACE configurations. If an attempt is made to delete a resource
pool that has ACE rules referencing it, the API returns a 400 error
with detailed information showing which users/groups are using the
pool and their roles.

The error message only shows the resource pool name for a clean,
user-friendly experience without exposing internal path details.
2026-05-26 12:54:48 +08:00
YueGuobin 9e5423f3f1 docs: update RBAC user isolation roadmap and add design memory
Updated the roadmap document to reflect the implemented three-step
permission check logic in the feature/simple-user-isolation branch.

Added comprehensive design memory documenting:
- Core problem and design conflicts
- Three-step permission check implementation
- Key design decisions and advantages
- Use cases and scenarios
- Design evolution process
2026-05-26 12:46:36 +08:00
YueGuobin ee36a9aec2 feat: fix permission check logic to properly handle ACE and user isolation
Implement the correct three-step permission check logic:
- Step 1: ACE check - basic access permission (get projects user has ACE for)
- Step 2: Filter ace_projects by created_by - user's own projects (project sharing only through resource pools)
- Step 3: Resource pool projects (projects shared through resource pools)

This fixes the design flaw where:
- ACE check could bypass user isolation with broad ACE configurations
- seen_project_ids mechanism prevented proper layered checking
- Project sharing was confused with direct ACE configuration

The new logic ensures:
- User isolation works even with broad ACE (path='/', propagate=True)
- Project sharing is only available through resource pools (clear design)
- Proper layered checking without seen blocking mechanism
2026-05-26 12:33:08 +08:00
Volobue b5e44b5403 added mock user in api endpoints tests 2026-05-25 22:17:14 +03:00
Volobue 01511f3aef added endpoint to v3 branch 2026-05-25 21:37:04 +03:00
Volobue b74ebafb8f api endpoint implemented 2026-05-25 20:07:05 +03:00
YueGuobin 265d0ff860 feat: implement layered permission checks for proper user isolation and sharing
Implement a three-layer permission system:
- Layer 1: ACE strategy check (explicitly authorized/shared projects)
- Layer 2: Ownership check (user's own projects based on created_by)
- Layer 3: Resource pools (team shared projects)

This approach:
- Resolves the conflict between ACE and user isolation
- Enables project sharing via ACE (other users can grant access)
- Maintains default user isolation via ownership
- Prevents duplicate projects in results
- Preserves resource pool functionality
2026-05-26 00:31:19 +08:00
Jeremy Grossmann 0e2045d4e8 Merge branch '3.1' into feature/simple-user-isolation 2026-05-25 18:23:59 +02:00
grossmj ee0e52b930 Enable GA tests on branch 3.1 2026-05-25 18:23:40 +02:00
YueGuobin 7c0b465b74 feat: implement simple user isolation based on project ownership
Users can only see projects they created (created_by field).
Super admins see all projects.
Resource pool projects continue to work as before.
2026-05-26 00:16:45 +08:00
grossmj e5636b0186 Update files to reflect 3.1 branch name 2026-05-25 18:10:23 +02:00
grossmj b3ef07e523 Update .whitesource 2026-05-25 18:07:50 +02:00
Jeremy Grossmann 0fdeb34f1a Merge pull request #2747 from yueguobin/feature/rbac-user-isolation-roadmap
docs: add RBAC user isolation roadmap
2026-05-25 04:40:04 +08:00
YueGuobinandClaude Opus 4.7 9e989566f5 docs: add RBAC user isolation roadmap
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:40:42 +08:00
Jeremy Grossmann ec55b9f089 Merge pull request #2746 from yueguobin/feature/gns3-copilot-packet-filter
feat: add packet filter management tool for GNS3-Copilot fault injection
2026-05-25 00:00:09 +08:00
YueGuobin ee80df9e9c docs: add AIOps fault injection testing pipeline roadmap
Roadmap for duplicating company network architecture into GNS3 and
building an automated pipeline to inject faults and validate AIOps
diagnosis, with traffic injection support for enhanced realism.
2026-05-24 23:25:01 +08:00
YueGuobin 045db5bdd8 fix: clean BPF syntax error message and specify loopback interface
- Add -i lo to tshark command to avoid "(null)" interface in errors
- Strip "for interface" suffix from error message for cleaner output
2026-05-24 23:00:41 +08:00
YueGuobin ce58e9adc8 feat: add BPF syntax validation using tshark
- Add _validate_bpf_syntax() method to validate BPF expressions
- Use tshark with 1-second timeout for syntax checking
- Check for "Invalid" in output to detect syntax errors
- Validate BPF filters before applying them to links
- Handle tshark not installed scenario gracefully
- Support both single and multiple BPF expressions
- Return detailed error messages for syntax validation failures
2026-05-24 22:49:59 +08:00
YueGuobin e71931d096 feat: add show_filters_icon parameter to packet filter tool
- Add show_filters_icon parameter with default value False
- Pass show_filters_icon to link.update() in set and clear operations
- Update tool description to explain default behavior
- Remove "clear" action from description to simplify interface
- Hide filter icon in GNS3 Web UI by default for cleaner UI during fault injection
2026-05-24 22:46:52 +08:00
YueGuobinandClaude Sonnet 4.6 dc04c29e7e docs: add GNS3 appliance loading mechanism to memory
Document how GNS3 loads appliance files from builtin and custom directories with priority rules, including storage locations and the design rationale that allows users to customize devices without losing changes during registry updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 22:31:28 +08:00
YueGuobin 8ba1f064d2 feat: add packet filter management tool for GNS3-Copilot fault injection
Add comprehensive packet filter management functionality to GNS3-Copilot,
enabling AI-powered fault injection scenarios with network simulation
capabilities like latency, packet loss, and corruption.

## Changes

### New Features
- **GNS3PacketFilterTool**: New LangChain tool for managing packet filters
  on GNS3 links with support for delay, packet loss, corruption,
  frequency_drop, and BPF filtering
  - Actions: get_available, set, get, clear
  - Integrated into troubleshooting_injection mode for fault scenarios

### API Integration
- **Link.available_filters()**: Added method to custom_gns3fy.py Link class
  - Queries available filter types for specific links
  - API v3+ only (raises ValueError for v2 connectors)
  - Returns filter definitions with parameters and constraints

### Tool Integration
- Added GNS3PacketFilterTool to TROUBLESHOOTING_INJECTION_MODE_TOOLS
- Positioned as 3rd tool in fault injection workflow
- Optimized for troubleshooting practice scenarios

## Files Modified
- gns3server/agent/gns3_copilot/agent/gns3_copilot.py
- gns3server/agent/gns3_copilot/gns3_client/custom_gns3fy.py
- gns3server/agent/gns3_copilot/tools_v2/__init__.py

## Files Added
- gns3server/agent/gns3_copilot/tools_v2/gns3_packet_filter.py

## Testing
- All validation tests passed
- Version checking verified (v3+ only)
- Tool integration confirmed in troubleshooting mode
2026-05-24 22:31:28 +08:00
Jeremy Grossmann 279ea9eed3 Merge pull request #2745 from yueguobin/feat/link-show-filters-icon
feat: add show_filters_icon property to Link for controlling Web UI filter icon display
2026-05-24 22:05:04 +08:00
YueGuobin fca4459e5f fix: update test_json expected output to include show_filters_icon field 2026-05-24 20:48:58 +08:00
YueGuobin 31d8046e30 fix: add getattr fallback to show_filters_icon property for backward compatibility 2026-05-23 17:09:50 +08:00
YueGuobin a1f4942746 feat: add show_filters_icon property to Link for controlling Web UI filter icon display
This commit adds a new  property to the Link class, allowing users to control whether filter icons are displayed in the Web UI at the individual link level.

**Changes:**
- Added  attribute to Link class (default: True)
- Added  property getter
- Added  method for updating the property
- Updated  to include the new field with backward compatibility
- Added  field to LinkBase schema using Optional[bool] = Field(True, ...) pattern
- Updated API routes to handle the new field in create and update operations
- Added loading logic for show_filters_icon in project.open() to preserve settings when reopening projects

**Schema Definition:**
Uses the same pattern as the  field:

**API Impact:**
- POST /v3/projects/{project_id}/links - accepts  in request body
- PUT /v3/projects/{project_id}/links/{link_id} - can update
- GET /v3/projects/{project_id}/links/{link_id} - returns  field

**Future Applications:**
This feature provides granular control for future AI fault injection modules to manage link-level protocol failures while maintaining clean UI presentation.
2026-05-23 16:57:39 +08:00
YueGuobin 367c565d7c fix: ensure show_filters_icon is always returned in API responses
Set default value for show_filters_icon in LinkBase schema to ensure the field is always included in API responses, even when response_model_exclude_unset=True is used.
2026-05-23 15:21:44 +08:00
YueGuobin aa6845b32b feat: add show_filters_icon property to Link for controlling Web UI filter icon display
This commit adds a new `show_filters_icon` property to the Link class, allowing users to control whether filter icons are displayed in the Web UI at the individual link level.

**Changes:**
- Added `_show_filters_icon` attribute to Link class (default: True)
- Added `show_filters_icon` property getter
- Added `update_show_filters_icon()` method for updating the property
- Updated `asdict()` to include the new field in both topology and regular dumps
- Added `show_filters_icon` field to LinkBase schema
- Updated API routes to handle the new field in create and update operations

**API Impact:**
- POST /v3/projects/{project_id}/links - accepts `show_filters_icon` in request body
- PUT /v3/projects/{project_id}/links/{link_id} - can update `show_filters_icon`
- GET /v3/projects/{project_id}/links/{link_id} - returns `show_filters_icon` field

**Future Applications:**
This feature provides granular control for future AI fault injection modules to manage link-level protocol failures while maintaining clean UI presentation.
2026-05-23 14:57:58 +08:00
Jeremy Grossmann 8719e12c59 Merge pull request #2742 from yueguobin/fix/paramiko-dependency-conflict
fix: remove explicit paramiko pin to resolve dependency conflict with netmiko
2026-05-19 19:32:18 +08:00
YueGuobinandClaude Opus 4.7 cd737cc5ed fix: remove explicit paramiko pin to resolve dependency conflict with netmiko
paramiko>=5.0.0 conflicts with netmiko 4.7.0 which requires paramiko<5.0.
Remove the explicit pin; paramiko is pulled in transitively via netmiko.
To fix CVE-2026-44405, upgrade paramiko separately:
  pip install "paramiko>=5.0.0"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 08:52:19 +08:00
Volobue 9106ac4522 api endpoint implemented 2026-05-18 21:49:01 +03:00
Jeremy Grossmann ca2004e715 Merge pull request #2738 from yueguobin/docs/skills-editor-api
Documentation improvements and Skills Editor API roadmap
2026-05-19 01:13:20 +08:00
Jeremy Grossmann b65ce034e5 Merge pull request #2739 from yueguobin/fix/unclosed-client-session-websocket-proxy
fix: close DockerHTTPClient session to prevent UnixConnector leak in Web Wireshark
2026-05-19 01:12:22 +08:00
Jeremy Grossmann 529144901f Merge pull request #2740 from yueguobin/fix/cve-2026-44405-paramiko
fix: update netmiko to 4.7.0 and pin paramiko>=5.0.0 to fix CVE-2026-44405
2026-05-19 00:59:03 +08:00
Guobin Yue 0e45d62c06 Merge branch '3.0' into fix/cve-2026-44405-paramiko 2026-05-19 00:08:38 +08:00
YueGuobinandClaude Opus 4.7 6e7cab3fec fix: update netmiko to 4.7.0 and pin paramiko>=5.0.0 to fix CVE-2026-44405
CVE-2026-44405 allows SHA-1 signature algorithm in paramiko through
4.0.0. netmiko 4.7.0 still permits paramiko<5.0, so pip resolves to
the vulnerable 4.0.0. Explicitly pinning paramiko>=5.0.0 ensures the
fix commit a448945 is included.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 00:07:18 +08:00
Guobin Yue 11fe3a24cf Merge branch '3.0' into fix/unclosed-client-session-websocket-proxy 2026-05-19 00:02:26 +08:00
YueGuobin 868e317d24 fix: close DockerHTTPClient session to prevent UnixConnector leak in Web Wireshark
The Web Wireshark WebSocket endpoint created a WebWiresharkManager but
never called close(), leaving the DockerHTTPClient's ClientSession with
UnixConnector unclosed when users closed the browser tab.

Also switch asyncio.wait in WebSocket proxy from ALL_COMPLETED to
FIRST_COMPLETED to avoid blocking cleanup when one direction disconnects.
2026-05-18 23:59:56 +08:00
Guobin Yue 7444551a66 Merge branch '3.0' into docs/skills-editor-api 2026-05-18 23:42:31 +08:00
YueGuobinandClaude Sonnet 4.6 ef16c87a02 docs: add Web Wireshark Docker image optimization analysis
Add comprehensive roadmap document for optimizing the gns3/web-wireshark
Docker image size from current 2GB to target 1.5GB (25% reduction).

Key findings:
- 570MB of cleanable files identified (locales, docs, ibus, dev packages)
- Compression analysis shows limited benefit (1-5%) vs file cleanup (25%)
- Detailed implementation plan with safe optimization phases
- Focus on transfer optimization and build-time compression strategies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 22:58:06 +08:00
grossmj ba79f1c226 Fix Docker build and publish API doc actions 2026-05-13 17:19:08 +08:00
grossmj 7cf25bc0d5 Release v3.1.0a2 2026-05-13 00:34:05 +08:00
grossmj 7bb0a2a863 Bundle web-ui v3.1.0a2 2026-05-13 00:29:25 +08:00
grossmj 748b8a1571 Sync appliances 2026-05-13 00:25:27 +08:00
YueGuobinandClaude Opus 4.7 c5a59acc40 docs: move packet analysis from roadmap to implemented
Rewrite the packet-analysis document based on actual code:
protocol-oriented analysis with tshark, 40+ supported protocols,
two-tool architecture (skills query + capture analysis), field
validation, and hot reload support.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 22:59:34 +08:00
YueGuobin fd08885d94 docs: reorganize roadmap files into dedicated subdirectory 2026-05-12 22:53:35 +08:00
YueGuobinandClaude Opus 4.7 0ee370d6ab docs: add Skills Editor API roadmap
Document the planned CRUD + PR management API for GNS3 skills
(prompts, fault injection, device skills, packet analysis),
enabling the Web UI to browse, edit, save, and contribute
skill changes back to the upstream repository.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 22:52:23 +08:00
Jeremy Grossmann c71dfbb6b5 Merge pull request #2729 from yueguobin/feature/troubleshooting-issue-injection
feat: add fault injection system and external skills repository
2026-05-12 22:24:00 +08:00
YueGuobin 30a140a9e3 fix: surface tshark stderr errors to LLM, not just log them 2026-05-12 15:10:27 +08:00
YueGuobin b79fea918d fix: hint LLM about -c behavior when tshark returns empty with -c 2026-05-12 14:54:50 +08:00
YueGuobin 09b0fbcfea fix: update search_fields examples to use existing field names 2026-05-12 14:48:37 +08:00
YueGuobin 73e0de7706 fix: reject multi-keyword search_fields, single keyword only 2026-05-12 14:47:00 +08:00
YueGuobin c357d52fbf fix: document action/query params in PacketAnalysisTool description 2026-05-12 14:36:21 +08:00
YueGuobin 2a34d0ef58 feat: add search_fields action to PacketAnalysisTool for real-time field lookup 2026-05-12 14:33:13 +08:00
YueGuobin 32c3b4cd35 feat: validate tshark -e field names before running analysis 2026-05-12 14:27:16 +08:00
YueGuobin 9c23f9037c fix: document -c behavior caveat in PacketAnalysisTool description 2026-05-12 14:00:58 +08:00
YueGuobinandClaude Opus 4.7 b7a0b611df fix: demote loader-level load logs to DEBUG, info already reported by manager
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 13:52:05 +08:00
YueGuobinandClaude Opus 4.7 89da58fe1b fix: promote skills/prompts load logs to INFO level
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 13:46:36 +08:00
YueGuobin c5af9ce389 fix: load packet analysis protocols during skills initialization
- Add reload_packet_analysis_protocols() call in _ensure_skills_manager()
- PACKET_ANALYSIS_REGISTRY was empty because it was never loaded
2026-05-12 13:41:52 +08:00
YueGuobin 67b3b778b8 feat: add PacketAnalysisSkillsTool
- Register packet_analysis_skills as a LangChain tool for LLM
- LLM can query protocol field definitions before calling packet_analysis
- Follows the same pattern as DeviceSkillsTool and InjectionSkillsTool
2026-05-12 13:37:59 +08:00
YueGuobin 2a38816d3d fix: remove remaining quoted example from tool input docstring 2026-05-12 13:30:18 +08:00
YueGuobin b991125c6c fix: use shlex.split for tshark_args parsing
- Replace str.split() with shlex.split() to handle quoted arguments
- LLM may pass args with or without quotes, both work correctly now
2026-05-12 13:29:31 +08:00
YueGuobin e0c2d64b7c feat: add packet analysis workflow to tool description
- Update PacketAnalysisTool.description with step-by-step workflow
- Instruct LLM to query packet_analysis skills first, then construct tshark_args
2026-05-12 13:13:24 +08:00
YueGuobin 2c5cfdbee8 refactor: remove old PacketCaptureTool, replaced by PacketAnalysisTool
- Delete packet_capture_tools.py (analyze_packets with packet_number)
- PacketAnalysisTool is more flexible and can do everything the old tool could
- Update tool registration to use only PacketAnalysisTool
- Cleaner, more unified packet analysis interface
2026-05-12 10:19:25 +08:00
YueGuobin 84b9742045 feat: add protocol-oriented packet analysis tool
- Add PacketAnalysisTool that accepts user-provided tshark arguments
- LLM constructs tshark commands based on protocol knowledge from skills
- Add PACKET_ANALYSIS_REGISTRY for protocol definitions
- Add load_packet_analysis_protocols() to SkillsLoader
- Add get_packet_analysis_protocol() and list functions to registry
- Register PacketAnalysisTool in teaching and lab automation modes
- Update SkillsManager to reload packet analysis protocols

Related: GNS3-Skills commit 7bc45d2
2026-05-12 09:59:10 +08:00
YueGuobin 6596011799 docs: add roadmap docs for planned features
Close GitHub issues and document as roadmaps instead:
- #2731: user preferences API
- #2732: server settings REST API
- #2733: injection fault tracking
- packet analysis: protocol-oriented analysis architecture
2026-05-12 00:03:07 +08:00
YueGuobin a408148073 feat: require superadmin for /reload/skills endpoint
Only administrators can reload skills from the external repository.
Non-admin users receive 403 Forbidden.
2026-05-11 22:59:28 +08:00
YueGuobinandClaude Opus 4.7 ae1a444677 fix: remove background init timeout and allow skills reload retry
- Remove 5s thread.join() timeout so git clone/pull is not truncated
- Remove _init_complete flag, reset _init_in_progress on failure instead
- Let /reload/skills API retry initialization after network failure
- Raise GIT_HTTP_LOW_SPEED_LIMIT from 1 KB/s to 10 KB/s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 22:51:57 +08:00
YueGuobinandClaude Sonnet 4.6 27051a89ad deps: add PyYAML and GitPython to ai-requirements.txt
Add missing dependencies for the external skills repository feature:
- PyYAML>=6.0.0: for loading YAML skill files
- GitPython>=3.1.0: for Git operations (clone/pull) on skills repo

These dependencies are required by the SkillsManager and SkillsLoader
classes introduced in commit e68cc17e.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:59:52 +08:00
YueGuobin e68cc17ed5 feat: add fault injection system and external skills repository
## Summary

Add a complete fault injection system for GNS3 Copilot, migrate all
skills from local Python files to an external Git repository with
hot reload support, and restructure Copilot API under /copilot/.

## Key Changes

### Fault Injection
- New troubleshooting_injection mode with InjectionSkillsTool
- 368 fault scenarios across 39 protocol categories
- Context-based filtering (LLM must pass topology protocols)

### External Skills Repository
- SkillsManager: Git clone/pull, version tracking, smart updates
- SkillsLoader: YAML skills + Markdown prompts from external repo
- Hot reload via POST /copilot/reload/skills
- Configurable via gns3_server.conf

### Architecture
- API unified under /copilot/ prefix
- SkillsManager moved from Controller to agent module
- Lazy initialization with startup background preload
- Per-command Git timeout, smart update checks
- Forbidden commands hot-reloadable from external repo
- 32 INFO logs downgraded to DEBUG
2026-05-11 01:24:55 +08:00
Jeremy Grossmann 534bb5eded Merge pull request #2728 from yueguobin/feature/disable-deepseek-thinking-mode
fix: Disable DeepSeek thinking mode to avoid reasoning_content errors
2026-05-09 22:41:27 +08:00
YueGuobinandClaude Sonnet 4.6 156072118f fix: Disable DeepSeek thinking mode to avoid reasoning_content errors
DeepSeek models (deepseek-v4-flash/pro) enable thinking mode by default,
which returns reasoning_content that must be passed back to the API in
subsequent requests. This causes 400 errors in multi-turn conversations
when the reasoning_content is not properly handled.

This commit disables thinking mode by passing extra_body={"thinking": {"type": "disabled"}}
as an explicit parameter to DeepSeek models, preventing the reasoning_content
field from being generated.

Modified:
- create_base_model(): Add extra_body parameter with thinking mode disabled
- create_title_model(): Add extra_body parameter with thinking mode disabled

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:31:50 +08:00
grossmj 8b3d136a84 Update packages in requirements.txt 2026-05-09 18:41:02 +08:00
grossmj 97bf94e06e Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/compute/iou/iou_vm.py
#	gns3server/crash_report.py
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	requirements.txt
#	setup.py
2026-05-09 18:23:00 +08:00
Jeremy Grossmann 32959f1e04 Merge pull request #2724 from yueguobin/fix/import-project-skip-offline-computes
fix: Skip offline compute nodes during project import
2026-05-09 13:59:53 +08:00
YueGuobinandClaude Sonnet 4.6 5c7018283f fix: Skip offline compute nodes during project import
When importing a project, the round-robin logic would attempt to distribute
nodes across all configured compute resources, including offline ones. This
caused import failures when any remote compute was unreachable.

This fix filters the compute list to only include connected computes before
round-robin distribution. If no remote computes are connected, all nodes
are assigned to the local compute.

This matches the approach used in project._get_disconnected_computes() and
prevents the issue where importing a project fails with:
"Cannot connect to compute 'X' with request POST /projects"

Fixes issue introduced in commit 90e3a8d6 (2017) which added round-robin
load balancing without considering offline compute nodes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:46:58 +08:00
Jeremy Grossmann ae2fa31c5e Merge pull request #2721 from yueguobin/feature/list-node-files-api
feat: Add API endpoint to list node files with metadata
2026-05-09 00:04:16 +08:00
YueGuobin b4220d55c6 fix: Import status module in project.py
Fix F821 undefined name 'status' error by importing the status
module from fastapi. This resolves build errors when using
status.HTTP_403_FORBIDDEN and status.HTTP_404_NOT_FOUND.
2026-05-08 23:58:43 +08:00
Guobin Yue cd732ab4b5 Merge branch '3.0' into feature/list-node-files-api 2026-05-08 23:51:56 +08:00
Jeremy Grossmann 14c2172f1b Merge pull request #2722 from yueguobin/fix/console-stopping-error
fix: Handle connection errors when stopping node console
2026-05-08 23:43:39 +08:00
YueGuobin 3752b2bac8 fix: Handle connection errors when stopping node console
Add exception handling in stop_wrap_console to gracefully handle
ConnectionResetError, BrokenPipeError, and OSError when waiting
for console writer to close.

This prevents 500 errors when stopping QEMU nodes if the console
connection is reset before the writer finishes closing.

Fixes race condition where QEMU process exits and closes connections
before the console writer cleanup completes.
2026-05-08 23:30:41 +08:00
YueGuobinandClaude Sonnet 4.6 e6df144ae8 refactor: Remove MD5 calculation from node files listing
Remove MD5 checksum calculation from the node files API since
disk image files are dynamic and change frequently. MD5 calculation
was also causing significant performance overhead.

Changes:
- Remove md5sum field from NodeFile schema
- Remove MD5 calculation from list_node_files method
- Improve error handling for timestamp conversion
- Simplify code by removing lambda functions

Performance improvement:
- Response time reduced from ~0.5-1s to ~0.017s (30-60x faster)
- Especially beneficial for large files and multiple files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 23:05:40 +08:00
YueGuobinandClaude Sonnet 4.6 fae7b2eabe fix: Export NodeFile schema to schemas module
Add NodeFile to the schemas __init__.py exports to fix
import error when starting the server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 22:58:45 +08:00
YueGuobinandClaude Sonnet 4.6 51a4c73e21 feat: Add detailed metadata to node files listing
Enhance the node files API to include comprehensive file metadata:
- File size in bytes
- File creation time (ISO 8601 format)
- File modification time (ISO 8601 format)
- File extension

Create new NodeFile schema to support these additional fields
while keeping the existing ProjectFile schema for backward compatibility.

This provides users with better information to manage and identify
files in the Web UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 22:57:19 +08:00
YueGuobinandClaude Sonnet 4.6 5b75d633aa feat: Add API endpoint to list node files
Implement issue #2719 - Add API endpoint to list project files

- Add GET /v3/projects/{project_id}/nodes/{node_id}/files endpoint
- Add list_node_files() method to Project class
- Add security checks to prevent path traversal
- Filter out .ghost temporary files
- Return file paths with MD5 checksums
- Require Node.Audit privilege

This allows users to discover dynamically created files
such as QEMU disk images created via the disk image API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 22:52:17 +08:00
Jeremy Grossmann 713dbb7f45 Merge pull request #2718 from GNS3/2.2
Release v2.2.59
2026-05-08 22:03:17 +08:00
grossmj c3d23d7cae Development on 2.2.60.dev1 2026-05-08 20:03:31 +08:00
grossmj a1edf74fcf Merge branch 'master' into 2.2 2026-05-08 19:49:53 +08:00
grossmj 59a95edd3d Release v2.2.59 2026-05-08 19:06:04 +08:00
grossmj e34a7afe79 Sync appliances 2026-05-08 19:03:14 +08:00
Jeremy Grossmann 2dcbe0f1c2 Merge pull request #2717 from GNS3/bugfix/2709
Fix snapshot restore does not work after export/import of project
2026-05-08 18:59:37 +08:00
grossmj b1c8ce8b58 Remove unneeded code 2026-05-08 18:56:56 +08:00
grossmj b304511b5e Fix snapshot restore does not work after export/import of project 2026-05-08 18:47:47 +08:00
grossmj 163d4e0534 Update requirements.txt & python_requires 2026-05-08 17:01:10 +08:00
grossmj 72f64ee60b Warn to use 64-bit IOU images. Fixes #2716
32-bit IOU image support has been removed from the GNS3 VM.
2026-05-08 16:37:06 +08:00
Jeremy Grossmann cd03abb7ed Merge pull request #2669 from arl1984/fix/telnet-proxy-reader-cleanup-2344
Fix telnet console silent-proxy hang on non-ConnectionError exit (#2344)
2026-05-08 15:42:51 +08:00
grossmj 6551bf56f8 Tweak and merge changes from 3.0 branch 2026-05-08 15:36:40 +08:00
Jeremy Grossmann e0860555ba Merge pull request #2713 from yueguobin/fix/docker-container-deletion-error-handling
Fix: Improve Docker container deletion error logging
2026-05-07 22:17:23 +08:00
YueGuobinandClaude Sonnet 4.6 822abbe671 Fix: Improve Docker container deletion error logging
When closing a Docker node, if container deletion fails, the error
is silently ignored. This can lead to stale containers remaining on
the system and causing 409 conflicts when reopening projects.

Changes:
- Distinguish between 404 (container already removed, normal) and
  other DockerError (deletion failed, needs attention)
- Log warning when deletion fails with error details
- Add comment explaining stale containers will be cleaned up on
  project open (via automatic 409 conflict resolution)

This improves observability without blocking project close operations.
The root cause of stale containers can now be diagnosed from logs.

Fixes #2708

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 12:45:05 +08:00
Jeremy Grossmann 3928377f80 Merge pull request #2710 from yueguobin/fix/compute-connection-timeout
Fix: Check compute connectivity before open() during project deletion
2026-05-07 11:36:45 +08:00
Jeremy Grossmann 0d88ff87e7 Merge pull request #2712 from yueguobin/fix/compute-reconnection-backoff
Fix: Add exponential backoff to compute reconnection attempts
2026-05-07 11:35:46 +08:00
YueGuobin efe6913d69 Fix: Add exponential backoff to compute reconnection attempts
When a remote compute is unreachable, the controller now uses exponential
backoff for reconnection attempts: 5s, 10s, 20s, 40s, 80s, then caps at
300s (5 minutes). Previously it retried every 5 seconds indefinitely.

User-initiated operations (open project, start node) still trigger an
immediate connection attempt, so recovery is not delayed in practice.

Related: #2704
2026-05-07 11:17:55 +08:00
YueGuobinandClaude Opus 4.6 f1b11e7cae Fix: Check compute connectivity before node creation in open()
When opening a closed project with nodes on an offline remote compute,
open() would block for 120s trying to connect before eventually
failing. Now checks compute connectivity after loading the topology
file but before creating nodes, allowing immediate failure with a
clear error message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 10:48:18 +08:00
YueGuobinandClaude Opus 4.6 30ebde0cb0 Fix: Check compute connectivity before open() during project deletion
Previously the disconnected compute check ran after open(), which would
block for 120s trying to connect to unreachable remote computes before
rejecting the deletion. Now reads the topology file directly to extract
compute IDs and checks connectivity before calling open(), enabling
immediate rejection of deletions involving offline computes.

Also removes the redundant post-open() check since the early check
covers both opened and closed project states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 09:58:20 +08:00
YueGuobinandClaude Opus 4.6 8ecd449dd8 Fix: Add error logging when closing/deleting projects on computes
Previously errors during close() and delete_on_computes() were silently
swallowed without any logging, making it difficult to diagnose failures
when remote computes are unreachable.

- close(): log warning instead of silent pass
- delete_on_computes(): wrap HTTP DELETE in try/except with warning log

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 09:37:51 +08:00
YueGuobin 4d06b2b7b6 Fix: Skip add_compute for existing computes when opening projects 2026-05-06 13:24:27 +08:00
YueGuobin 0f4b0c567e feat: add AI provider config files to .gitignore
Add deepseek, claude, gemini, and grok settings files to .gitignore to prevent accidental commits of local AI provider configurations.
2026-05-06 13:24:13 +08:00
Jeremy Grossmann 255d1e4057 Merge pull request #2705 from yueguobin/fix/project-deletion-compute-status-check
Fix: Check compute connection status before project deletion
2026-05-06 09:39:41 +08:00
YueGuobin a67cd66b60 Revert "Fix: Handle project deletion errors in autoidlepc"
This reverts commit c92188cad4.
2026-05-06 00:59:05 +08:00
YueGuobin c92188cad4 Fix: Handle project deletion errors in autoidlepc
When deleting the AUTOIDLEPC project in autoidlepc(), if a remote compute
is disconnected, the deletion fails with ControllerForbiddenError due to
our compute connection status check. This causes:
- The project to remain in the controller's memory
- Subsequent autoidlepc calls to fail
- User must restart the server to recover

This fix adds exception handling to ensure the project is always removed
from the controller's memory, even if deletion fails.

Related to #2703
2026-05-06 00:47:24 +08:00
YueGuobinandClaude Sonnet 4.6 9c868911e1 Fix: Use _computes instead of _project_created_on_compute for deletion check
The initial fix used _project_created_on_compute to check for disconnected
computes before deletion, but this set gets reset during project.open(),
causing the check to fail.

Now uses self._computes which is loaded from the topology file and
persists through the open() call.

Related: #2703

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 00:19:55 +08:00
YueGuobinandClaude Sonnet 4.6 4444da9ffa Fix: Check compute connection status before project deletion
This commit addresses issue #2703 where deleting a project with nodes
on remote compute nodes would result in long waits with no feedback
if those computes were unreachable.

Changes:
1. Compute connection status updates on connection failure
   - When a compute fails to connect, update connected=False and last_error
   - Send compute.updated notification to UI so users can see status
   - This allows Web UI to display real-time connection status

2. Project deletion checks compute status before attempting deletion
   - Check all computes used by the project are connected
   - If any compute is disconnected, immediately reject deletion
   - Provide clear error message indicating which computes are offline
   - This prevents long timeouts and gives users immediate feedback

Benefits:
- Immediate feedback instead of 120-second timeouts
- Clear error messages about which computes are disconnected
- Prevents orphaned resources on offline computes
- Improves user experience by avoiding silent waits

Related: #2703

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 00:05:10 +08:00
Jeremy Grossmann ee7c5d6d59 Merge pull request #2693 from cristian-ciobanu/ssh-console-support
feat(compute): add SSH console type support
2026-05-05 19:03:57 +08:00
Jeremy Grossmann 82d630a122 Merge branch '3.0' into ssh-console-support 2026-05-04 17:17:10 +08:00
Jeremy Grossmann 56455d3a27 Merge pull request #2701 from yueguobin/fix/iou-remote-path-validation
fix: convert absolute image paths to relative paths for remote compute nodes
2026-05-04 16:36:23 +08:00
Guobin Yue 069e139d2d Merge branch '3.0' into fix/iou-remote-path-validation 2026-05-04 15:51:30 +08:00
YueGuobin 1f5ba3cada chore: remove internal debug documentation 2026-05-04 15:48:46 +08:00
YueGuobin 38f5e8df76 fix: extend remote compute image path conversion to all node types
Previously only the "path" field was converted to a relative path for remote computes, causing issues with QEMU and VMware nodes that use different image path fields. Now all known image path fields are converted, ensuring consistent behavior across IOU, QEMU, Dynamips, and VMware node types.
2026-05-04 15:39:16 +08:00
Jeremy Grossmann 5f9b469679 Merge pull request #2700 from yueguobin/fix/issue-2680-static-directory
fix: handle directory access for static web-ui routes
2026-05-03 17:56:50 +08:00
YueGuobinandClaude Sonnet 4.6 6ff4f575bb docs: add analysis for issue #2676 remote compute image path validation
Add detailed documentation explaining:
- Problem description and root cause
- Architecture overview (Controller vs Compute)
- Why automatic upload is not triggered
- Affected node types
- Solution implementation
- Testing scenarios

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 17:47:25 +08:00
YueGuobinandClaude Sonnet 4.6 11fb5de84e fix: send relative image path to remote compute nodes
When creating a node on a remote compute, the controller now sends
only the image filename instead of the absolute local path. The remote
compute will search for the image in its own configured images_directories.

If the image is not found, the compute returns ImageMissingError, which
triggers the controller's automatic image upload mechanism.

This fixes issue #2676 where remote computes reject paths from the
controller due to mismatched directory prefixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 17:44:47 +08:00
YueGuobinandClaude Sonnet 4.6 952ef66a6b fix: handle directory access for static web-ui routes
When accessing /static/web-ui without trailing slash, the request would
fail with "RuntimeError: File at path ... is not a file" because:

1. The route /static/web-ui/{file_path:path} doesn't match paths without
   trailing slash (Starlette's path regex requires the /)
2. The request falls through to StaticFiles mount, which tries to serve
   the directory as a file

This fix:
- Sets html=True on StaticFiles mount to automatically redirect directory
  URLs to trailing slash versions
- Adds os.path.isdir() check to handle empty file_path gracefully

Fixes #2680

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 17:21:03 +08:00
Jeremy Grossmann c45f6d9416 Merge pull request #2699 from yueguobin/fix/template-duplicate-name-validation
Fix duplicate template name validation when updating templates
2026-05-03 12:09:59 +08:00
YueGuobin 1d715e146b fix: add duplicate name validation when updating templates
Fixes #1658

Add validation in the update_template method to check if a template
with the same name already exists before updating. This prevents
users from creating duplicate template names by editing existing
templates.

The check excludes the current template being edited to allow
updating other properties without changing the name.
2026-05-03 11:08:20 +08:00
Jeremy Grossmann c3d202abc9 Merge branch '3.0' into ssh-console-support 2026-05-02 22:10:28 +08:00
Jeremy Grossmann 165209ba24 Merge pull request #2698 from yueguobin/fix/compute-update-password-none-error
fix: avoid AttributeError when password is not provided in compute update
2026-05-02 22:07:34 +08:00
Jeremy Grossmann b87ab8f86f Merge pull request #2696 from yueguobin/fix/rfc1123-error-message
fix: improve hostname validation error messages with allowed characters
2026-05-02 18:30:49 +08:00
YueGuobinandClaude Opus 4.6 a6dcab8110 fix: avoid AttributeError when password is not provided in compute update
When updating a compute without providing a password field,
compute_update.password is None and calling .get_secret_value()
on it causes a 500 Internal Server Error. Only set the password
in update_values when a password is actually provided.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-02 15:37:46 +08:00
YueGuobinandClaude Opus 4.6 ba220780a9 fix: improve hostname validation error messages with allowed characters
When a hostname validation fails, the error message now includes
the allowed character set to help users provide valid names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-02 13:09:04 +08:00
Cristi e6de7cb60a feat(compute): Fix Dynamips to listen on the internal port when ssh is used for auxiliary console 2026-04-30 23:50:15 +03:00
CristiandCopilot d7c78f5744 feat(compute): Fix ambiguous log message related to the active console transport.
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 18:07:23 +03:00
Cristi 9d451eb652 feat(compute): Updated server host key to use the secure ssh-ed25519 instead of old ssh-rsa algorithm 2026-04-30 17:56:05 +03:00
Cristi cc05eb5850 feat(compute): Fix missing SSH wrapping for auxiliary console 2026-04-30 17:47:54 +03:00
Cristi 8ff1698bfb feat(compute): Added AsyncioSSHServer dedicated tests 2026-04-30 16:35:21 +03:00
Cristi d64eca0418 feat(compute): add SSH console type support 2026-04-30 15:52:47 +03:00
Jeremy Grossmann f0ef65b8e8 Merge pull request #2688 from yueguobin/fix/llm-model-config-error-message
fix: include error details in LLM model config + docs: add troubleshooting guides
2026-04-25 16:30:47 +08:00
Guobin Yue c583462d2d Merge branch '3.0' into fix/llm-model-config-error-message 2026-04-25 16:26:59 +08:00
YueGuobin c688223e1b docs: add troubleshooting guide for WebSocket console authentication failure
Add documentation explaining the common issue where WebSocket console connections to remote compute nodes fail due to credential mismatch. The guide describes the error symptoms, root cause (Controller forwarding its own credentials to Compute), and solution (ensuring matching compute_username and compute_password in Compute's configuration).
2026-04-25 16:08:53 +08:00
YueGuobinandClaude Opus 4.6 d81a7410e2 docs: remove misleading Controller Hostname Unreachable section
This section was misleading - the actual root cause is host=0.0.0.0
causing controller to register as 127.0.0.1, not hostname resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 15:55:37 +08:00
YueGuobinandClaude Opus 4.6 e88b12086a docs: clarify host=0.0.0.0 causes controller to register as 127.0.0.1
Add details about the "No common subnet" error when Controller's host
is set to 0.0.0.0, and how to verify via /v3/version endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 15:54:12 +08:00
YueGuobinandClaude Opus 4.6 f9d1ccc701 docs: add troubleshooting for controller hostname unreachable
Add documentation for the "No common subnet" error when the
controller's hostname in /etc/hosts resolves to an unreachable
or stale IP address.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 15:44:20 +08:00
grossmj 27d4c43ad9 Back on development on 3.1.0.dev2 2026-04-25 13:31:35 +08:00
grossmj c6e2bfa9b6 Release v3.1.0a1 2026-04-25 13:19:19 +08:00
grossmj 7fc5601405 Bundle web-ui v3.1.0a1 2026-04-25 12:58:56 +08:00
YueGuobinandClaude Opus 4.6 517764a7ac fix: include error details in LLM model config failure response
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 01:48:45 +08:00
grossmj ee43a5cdf5 Bump version to 3.1.0.dev2 2026-04-24 21:56:37 +08:00
grossmj ccf11d8f8b Sync appliances 2026-04-24 21:55:22 +08:00
Jeremy Grossmann b4f31222d0 Merge pull request #2685 from yueguobin/replace-wireshark-with-gns3server-web-wireshark-setup-in-installation-command
docs: replace 'wireshark' with 'gns3server-web-wireshark-setup' in installation commands
2026-04-24 10:51:53 +08:00
YueGuobinandClaude Opus 4.6 4dab36c08c docs: replace 'wireshark' with 'gns3server-web-wireshark-setup' in installation commands
The CLI entry point was renamed from 'wireshark' to 'gns3server-web-wireshark-setup'
to avoid conflicts with the system wireshark package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-24 10:33:41 +08:00
Jeremy Grossmann d59c82892a Merge pull request #2684 from yueguobin/fix/wireshark-cli-name-conflict
fix: rename wireshark CLI to gns3-wireshark to avoid conflict
2026-04-24 00:48:57 +08:00
grossmj 640910ec8e Use gns3server-web-wireshark-setup in docs 2026-04-24 00:48:00 +08:00
grossmj 6fac4c8c8a Merge branch '3.0' into fork/yueguobin/fix/wireshark-cli-name-conflict
# Conflicts:
#	pyproject.toml
2026-04-24 00:42:48 +08:00
YueGuobinandClaude Opus 4.6 0b7c40a14a fix: rename wireshark CLI to gns3-wireshark to avoid conflict
The wireshark CLI entry point creates /usr/bin/wireshark which conflicts
with the system wireshark package on Arch Linux (owned by wireshark-qt),
causing package installation to fail.

Rename to gns3-wireshark to follow the same naming convention as other
GNS3 CLI tools (gns3server, gns3vmnet).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-24 00:04:21 +08:00
grossmj 746cc8531c Create an executable named gns3server-web-wireshark-setup instead of wireshark. Fixes #2683 2026-04-24 00:00:45 +08:00
Jeremy Grossmann 9d0bb4a592 Merge pull request #2682 from yueguobin/fix/packet-capture-https-skip-cert
fix(copilot): add verify=False for HTTPS with self-signed certs
2026-04-23 23:44:25 +08:00
YueGuobinandClaude Opus 4.6 d6d4f7262e fix(copilot): add verify=False for HTTPS with self-signed certs
Add verify=False to requests.get() when capture_url uses HTTPS protocol,
to skip SSL certificate validation. This allows PacketCaptureTool to
work with GNS3 servers using self-signed certificates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-23 23:20:41 +08:00
Jeremy Grossmann f06b5fff21 Merge pull request #2681 from yueguobin/fix/wireshark-curl-https-skip-cert
fix(web-wireshark): add -k flag to curl for HTTPS with self-signed certs
2026-04-23 23:04:08 +08:00
Guobin Yue b49e6836cc Merge branch '3.0' into fix/wireshark-curl-https-skip-cert 2026-04-23 22:55:26 +08:00
YueGuobinandClaude Opus 4.6 fd6868efce fix(web-wireshark): add -k flag to curl for HTTPS with self-signed certs
Add -k flag to curl command when capture_stream_url uses HTTPS protocol,
to skip SSL certificate validation. This allows Web Wireshark to work
with GNS3 servers using self-signed certificates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-23 22:52:51 +08:00
grossmj 85bbc74f7d Fix using SSL with remote computes. Fixes https://github.com/GNS3/gns3-gui/issues/3733 2026-04-23 21:59:51 +08:00
Jeremy Grossmann 98477371d2 Merge pull request #2679 from yueguobin/wireshark-alias
feat(web-wireshark): add container IP retrieval and Docker API version compatibility fixes
2026-04-22 23:47:43 +08:00
YueGuobinandClaude Sonnet 4.6 a189a98723 docs(web-wireshark): add Docker API compatibility documentation
- Document API version negotiation mechanism (1.44 with fallback to 1.40)
- Add tested configurations table for Docker 20.10 and 29.3+
- Document container IP retrieval dual-strategy approach
- Explain KeyError bug fix for missing NetworkSettings.Networks field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 23:30:33 +08:00
YueGuobinandClaude Sonnet 4.6 117025a8a2 fix(web-wireshark): improve Docker API version compatibility with fallback mechanism
- Change initial API version from 1.40 to 1.44 to support Docker 29.3+ (API 1.54)
- Add automatic fallback to API 1.40 for older Docker versions (20.10, API 1.41)
- Fixes "client version 1.40 is too old. Minimum supported API version is 1.44" error
- Ensures compatibility across Docker versions 20.10 (API 1.41) to 29.3+ (API 1.54+)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 23:12:56 +08:00
YueGuobin 6c96e7493f feat(web-wireshark): add method to retrieve container IP and refactor websocket endpoint
- Add `get_container_ip` method to WebWiresharkManager for retrieving container IP addresses in wireshark network
- Method uses Docker API as primary approach with container command execution as fallback
- Refactor web_wireshark_websocket endpoint to use new method instead of direct Docker queries
- Improve error handling and logging for container IP retrieval failures
2026-04-22 22:35:50 +08:00
YueGuobin e304b19076 fix: lower Docker minimum API version to 1.40 for broader compatibility
The minimum Docker API version was reduced from 1.44 to 1.40 to support older Docker installations that do not provide API version 1.44, ensuring the web Wireshark agent can connect to a wider range of Docker environments.
2026-04-22 16:08:05 +08:00
YueGuobinandClaude Opus 4.6 2240012402 Rename gns3-wireshark-setup to wireshark for simpler command
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 14:13:19 +08:00
Jeremy Grossmann aac9b25b98 Merge pull request #2677 from yueguobin/add-url-branch-parameters
Add --url and --branch parameters to update-bundled-web-ui.sh
2026-04-21 22:54:01 +08:00
YueGuobinandClaude Opus 4.6 e6939513db Add --url and --branch parameters to update-bundled-web-ui.sh
Support specifying custom GitHub repository URL and branch name
when syncing WebUI with gns3server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 22:24:46 +08:00
grossmj 8387b484cc Sync appliances 2026-04-21 18:15:00 +08:00
Jeremy Grossmann 0ac8fd9ff3 Merge pull request #2675 from GNS3/upgrade-dependencies
Upgrade dependencies
2026-04-21 14:00:04 +08:00
grossmj f0f09e0e2c Upgrade alembic version 2026-04-21 13:25:42 +08:00
grossmj 7d84c33598 Upgrade code dependencies 2026-04-21 13:21:45 +08:00
grossmj 19c0bbbc56 Merge remote-tracking branch 'origin/3.0' into 3.0 2026-04-21 13:16:59 +08:00
grossmj 5d60626175 Bundle dev version of the web-ui 2026-04-21 13:16:36 +08:00
Jeremy Grossmann 8311936bc8 Merge pull request #2674 from yueguobin/docs/api-error-responses
docs: add API error response format documentation
2026-04-21 12:48:44 +08:00
YueGuobinandClaude Opus 4.6 56921e10d2 docs: add API error response format documentation
Document unified error response format across all GNS3 API endpoints,
including HTTP status codes, error types, and client-side error handling
patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 12:46:48 +08:00
Jeremy Grossmann 5ee26f5ed7 Merge pull request #2673 from yueguobin/fix/swagger-ui-cve-2018-25031
fix: use local swagger-ui static files to resolve CVE-2018-25031
2026-04-21 00:58:52 +08:00
Guobin Yue 1ea8ab0cf8 Merge branch '3.0' into fix/swagger-ui-cve-2018-25031 2026-04-21 00:54:27 +08:00
YueGuobinandClaude Opus 4.6 46d712723a fix: use local swagger-ui static files to resolve CVE-2018-25031
Replace CDN-hosted swagger-ui-dist@3.30.0 with local static files
from gns3server/static/ to address CVE-2018-25031 vulnerability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 00:43:59 +08:00
Jeremy Grossmann a366007f72 Merge pull request #2672 from yueguobin/fix/update-bundled-web-ui-script
Fix update-bundled-web-ui script for newer Angular CLI
2026-04-21 00:41:49 +08:00
YueGuobinandClaude Opus 4.6 85b8b04d72 fix: update bundled web-ui script for newer Angular CLI
- Remove deprecated --build-optimizer flag
- Update copy path from dist/ to dist/browser/ for new Angular build output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 00:39:08 +08:00
Guobin YueandClaude Opus 4.6 df28036a68 fix(deps): resolve 3 security vulnerabilities (CVE-2025-71176, CVE-2026-40347, CVE-2018-25031) (#2671)
* fix(deps): upgrade pytest to 9.0.3 to fix CVE-2025-71176

CVE-2025-71176: pytest 9.0.2 and earlier versions have a local
security vulnerability due to predictable temporary directory naming.

- pytest: 8.4.2 → 9.0.3
- Python 3.10+ is now required

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(deps): upgrade python-multipart to 0.0.26 to fix CVE-2026-40347

CVE-2026-40347: python-multipart < 0.0.26 has a denial of
service vulnerability when parsing multipart data.

- python-multipart: 0.0.22 → 0.0.26

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(deps): upgrade swagger-ui to 4.1.3 to fix CVE-2018-25031

CVE-2018-25031: swagger-ui < 4.1.3 has a spoofing vulnerability
where remote attackers can display remote OpenAPI definitions
via crafted URLs.

- swagger-ui: 3.30.0 → 4.1.3
- Updated swagger-ui-bundle.js and swagger-ui.css

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(api): change FastAPI version from "v3" to "3.0.0" for Swagger UI 4.1.3 compatibility

Swagger UI 4.x enforces stricter version format validation.
The version "v3" is not accepted by the new validator.

Changed from:
- version="v3"

To:
- version="3.0.0"

This affects both controller and compute API definitions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(deps): upgrade swagger-ui to 5.32.4

Fixes "Unable to render this definition" error when loading OpenAPI 3.0
docs. Swagger UI 3.x had incomplete OpenAPI 3.0 support.

- swagger-ui: 3.19.1 → 5.32.4 (latest)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:35:15 +08:00
f07d21c511 feat(web-wireshark): add implementation plan for script-driven (#2666)
* feat(web-wireshark): add implementation plan for script-driven integration

Add comprehensive implementation plan for Web Wireshark integration using script-driven approach. The plan outlines:

- Background and motivation for script-based Web Wireshark integration
- Core workflow from API request to WebSocket proxy connection
- Management script architecture with WebWiresharkManager class
- Docker container configuration and resource management
- Performance analysis and optimization recommendations
- Network setup and management procedures

Key features include:
- JWT token extraction from Authorization header
- Automatic GNS3 server URL detection
- Container lifecycle management per project
- Xpra session isolation per link
- WebSocket proxy integration through gns3server
- Resource monitoring and scaling guidelines

The implementation enables users to start Web Wireshark sessions via POST requests with `wireshark: true` parameter, providing a unified web-based packet capture interface.

* feat(web-wireshark): implement script-driven Web Wireshark integration

Add complete Web Wireshark container integration with script-driven architecture:

- Create manage_wireshark.py script for Docker container management
- Add LinkCapture schema with wireshark boolean field
- Update Link class with wireshark and jwt_token parameters
- Implement WebSocket proxy endpoint for xpra HTML5 client
- Add cleanup logic in Project class for container lifecycle

Key features:
- Script-driven container and xpra session management
- JWT token extraction from Authorization header
- GNS3 URL auto-detection with Controller/Config fallback
- WebSocket proxy for unified access through gns3server
- Proper cleanup on project close/delete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web-wireshark): use aiohttp instead of docker SDK

Replace docker-py SDK with direct Docker HTTP API calls using aiohttp,
following GNS3's existing architecture pattern in gns3server/compute/docker/.

Changes:
- Create DockerHTTPClient class using aiohttp + Unix socket
- Implement all Docker operations as async methods
- Remove dependency on docker Python SDK
- Use Docker API v1.44 via /var/run/docker.sock

Benefits:
- No additional dependencies required
- Consistent with GNS3's async architecture
- Better integration with existing codebase

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web-wireshark): add dynamic Docker API version detection

Implement dynamic Docker API version detection following GNS3's pattern
in gns3server/compute/docker/__init__.py.

Changes:
- Add DOCKER_MINIMUM_API_VERSION and DOCKER_PREFERRED_API_VERSION constants
- Remove hardcoded "v1.44" prefix (now using "1.44" format)
- Add _check_connection() method to detect Docker daemon version
- Dynamically select API version based on daemon capabilities
- Add proper error handling for version mismatches

Behavior:
- Initialize with minimum API version (1.40)
- On first connection, detect Docker daemon API version
- Use preferred API version (1.44) if supported
- Fall back to daemon's minimum API version if needed
- Raise error if daemon version is too old

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web-wireshark): add optional --verbose logging parameter

Remove hardcoded logging.basicConfig() and add --verbose parameter
to control log output, following GNS3's logging pattern.

Changes:
- Remove logging.basicConfig(level=logging.INFO) from module level
- Add --verbose/-v command line parameter
- Configure logging only when --verbose is specified
- Use structured log format with timestamp when verbose

Behavior:
- When called by GNS3: uses GNS3's logging configuration (default)
- When run standalone: no output unless --verbose is specified
- With --verbose: shows detailed logs with timestamps

This prevents the script from interfering with GNS3's logging
configuration while still allowing debug output when needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web-wireshark): fix code quality issues from static analysis

Fix issues identified by flake8 and pylint static analysis:

Import and formatting fixes:
- Remove unused 'time' import
- Fix import order (stdlib before third-party)
- Remove unnecessary f-strings without placeholders
- Split long line to comply with flake8 (max line length: 127)

Code structure improvements:
- Remove unnecessary 'else' after 'return'
- Add 'from e' to exception re-raising for better tracebacks

Code quality metrics:
- pylint score: 8.11/10 → 9.97/10 (+1.86)
- flake8: 0 errors (max line length: 127, per CI/CD standard)
- All critical issues resolved

Note: R0914 (too-many-locals) warning is informational only,
code remains clear and maintainable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): export LinkCapture schema in schemas module

Add LinkCapture to the schemas module exports in __init__.py to fix
the AttributeError when starting the GNS3 server.

Error was:
  AttributeError: module 'gns3server.schemas' has no attribute 'LinkCapture'

This was caused by adding the LinkCapture class to controller/links.py
but forgetting to export it in the schemas __init__.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web-wireshark): add --image parameter for custom Docker images

Add optional --image parameter to allow using custom Docker images
for testing, instead of requiring gns3/web-wireshark:latest.

Changes:
- Add --image parameter to start command (default: gns3/web-wireshark:latest)
- Update get_or_create_container() to accept image parameter
- Update start_wireshark_session() to accept and pass image parameter
- Update TEST.md with examples of using custom images

Usage:
  # Using default image
  python3 manage_wireshark.py start --project-id x --link-id y --jwt-token z

  # Using custom image (for testing)
  python3 manage_wireshark.py start --project-id x --link-id y --jwt-token z --image ubuntu:latest

This makes it easier to test the script without having the official
gns3/web-wireshark image available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web-wireshark): add configurable resource limits and increase session capacity

Add configurable resource parameters and increase session support from 10 to 100.

Resource parameters:
- --memory: Memory limit (default: 2g)
- --memory-swap: Memory swap limit (default: same as memory)
- --cpus: CPU cores (default: 1.0)
- --pids-limit: Process limit (default: 1000)

Other improvements:
- Fix CPU quota calculation: 1000000 microseconds = 1.0 CPU core
  (was incorrectly 100000 = 0.1 CPU core)
- Add health check: xpra list command
- Add log configuration: json-file, max-size=10m, max-file=3
- Increase session capacity: 10 → 100 concurrent sessions
- Port range: 12300-12399 (was 12300-12309)
- Display range: :100-:199 (was :100-:109)

This matches the docker run command parameters and provides
better resource management and monitoring capabilities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): update UDPLink.start_capture() to accept new parameters

Update UDPLink.start_capture() to accept the new wireshark and jwt_token
parameters and pass them to the parent Link class.

This fixes the TypeError when starting capture on UDP links:
  TypeError: UDPLink.start_capture() got an unexpected keyword argument 'wireshark'

The UDPLink class overrides start_capture() but didn't include the new
parameters added for Web Wireshark support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: add project memory infrastructure and JWT token flow documentation

- Add memory skill for recording project knowledge
- Document JWT token flow in Web Wireshark integration
- Update .gitignore to track skills and memory directories

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): fix Docker API URL format and use docker exec CLI

- Add "v" prefix to Docker API URL (http://docker/v{version}/...)
- Remove unused exec_create/exec_start API methods
- Fix Healthcheck.Test format to ["CMD-SHELL", "command"]
- Use docker exec CLI instead of Docker API for command execution
- This aligns with GNS3 docker_vm pattern

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): improve xpra session management and error handling

- Check and clean up existing sessions before starting new xpra session
- Add verification that xpra session started successfully
- Use docker exec CLI consistently instead of Docker API
- Improve error logging and diagnostics

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web-wireshark): add timeout handling and container health checks

- Add REQUEST_TIMEOUT constant for Docker HTTP API requests
- Add asyncio.timeout wrapper for Docker API calls to prevent hanging
- Add _is_container_healthy() to check container responsiveness
- Add _exec_in_container() helper with timeout support
- Improve unhealthy container handling with force remove
- Add detailed logging for container health state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web-wireshark): split monolithic file into modules

Split manage_wireshark.py into:
- docker_client.py: Docker HTTP API client
- manager.py: WebWiresharkManager with session management
- manage_wireshark.py: CLI entry point

This improves code organization and maintainability.
Keep all timeout handling and health check logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): correct NanoCpus calculation to use nanoseconds

NanoCpus in Docker API requires nanoseconds (1 CPU = 1000000000),
not the previous incorrect multiplier of 100000.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): fix xpra command quoting and session verification

- Add quotes around --xvfb parameter value to preserve spaces
- Fix session verification to check display number instead of session name
  (xpra list shows "LIVE session at :185" not session name)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): run wireshark in background with &

Wireshark with curl pipeline runs continuously, so it must run
in background to avoid blocking. Also reduced timeout since we
don't wait for completion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web-wireshark): add deterministic hash for display/port allocation

Use MD5-based hash instead of Python's hash() which is randomized
across process restarts. This ensures display and port numbers are
stable when the GNS3 server restarts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: extract link_id_to_port to shared utils module

Move deterministic hash functions to gns3server/utils/port_allocator.py
to avoid code duplication and ensure consistent algorithm across
manager.py and links.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(links): move import to top of file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web-wireshark): use correct Config access pattern like gns3-copilot

The Server config is an object with .protocol.value, .host, .port
attributes, not a dict. Fixes URL detection failing and falling back
to 127.0.0.1:3080 which doesn't work from inside containers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add UUID validation utility and use in manage_wireshark

Create gns3server/utils/uuid_validator.py with validate_uuid function
to validate UUID format and catch typos early with clear error messages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use argparse.ArgumentTypeError for proper error message display

Previously ValueError was used which only showed 'invalid validate_uuid value'.
Now shows the full helpful message about expected format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web-wireshark): add --dpi=96 to xpra start parameters

Set standard DPI for better display scaling in web Wireshark.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update TEST.md with correct project-id format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web-wireshark): hide xpra shutdown menu via XPRA_CLIENT_CAN_SHUTDOWN

Prevents users from accidentally shutting down the xpra server
through the HTML5 client menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(memory): add xpra-html5-client configuration reference

Document xpra HTML5 client configuration including:
- URL parameters for toolbar menu control
- default-settings.txt parameters (Features, Connection, Advanced)
- Server-controlled submenu items
- XPRA_CLIENT_CAN_SHUTDOWN environment variable
- Background image customization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web-wireshark): remove xpra stop cleanup to avoid zombie processes

xpra stop can leave zombie processes and timeout. Instead, let xpra start
reuse the display directly (it will overwrite existing session).

Also added --file-transfer=no, --printing=no, --sound=no to disable
unneeded features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web-wireshark): add fullscreen_button=false to default-settings.txt

Also remove --file-transfer/--printing/--sound from command line since
xpra doesn't support these options. Configure in default-settings.txt instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web-wireshark): update xpra background with GNS3 branding

- Replace default xpra background with GNS3 icon and modern gradient
- Update CSS to use SVG background image with cover sizing
- Change background color to gradient from #021d3a to linear gradient
- Improves visual integration with GNS3 web interface

* style: add GPLv3 headers with copyright to web_wireshark modules

Co-Authored-By: YueGuobin <yueguobin@gmail.com>

* feat(docker): use Alibaba Cloud Debian mirror for faster builds in China

Use mirrors.aliyun.com for Debian packages with correct paths for
both main repo (/debian) and security repo (/debian-security).

Co-Authored-By: YueGuobin <yueguobin@gmail.com>

* feat(web-wireshark): update xpra background styling and echo command

- Replace `echo -e` with `printf` for better POSIX compatibility in Dockerfile
- Update xpra HTML5 client background to use GNS3 icon with light gradient
- Change background color from dark blue to light gray for improved visibility

* fix(web-wireshark): use pkill to stop xpra sessions

Replace 'xpra stop :{display}' with 'pkill -f "xpra.*:{display}"' for more reliable session termination.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web-wireshark): start Wireshark in fullscreen mode

Add --fullscreen flag to Wireshark startup command to prevent window decorations and improve user experience.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): use carrier-grade NAT subnet to avoid conflicts

Change Docker network subnet from 172.28.0.0/16 to 100.64.1.0/24 to avoid conflicts with common private networks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(web-wireshark): update subnet to /22 for 1000+ projects

Change Docker network subnet from 100.64.1.0/24 to 100.64.0.0/22 to support 1000+ projects (1022 available IPs). Update all documentation to reflect the new subnet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): replace CGNAT subnet with configurable private subnet

Replace the CGNAT address block (100.64.0.0/22) with a standard private
subnet (172.31.0.0/22) to avoid network access issues. Many networks and
ISPs block or cannot route CGNAT addresses.

Changes:
- Add WebWiresharkSettings to config schema with configurable subnet
- Read network_subnet from config, default to 172.31.0.0/22
- Add Web Wireshark configuration section to sample config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): comment out dpi setting

Allow xpra to use default DPI settings for better display scaling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): set DPI in Xvfb to prevent scaling warnings

Add -dpi 96 to Xvfb startup command to match xpra's expected DPI
and avoid "scaling problems" warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): remove custom Xvfb to use default Xorg-dummy

Remove --xvfb parameter to let xpra use the default Xorg-dummy driver,
which properly handles DPI changes when resize-display is enabled and
prevents DPI mismatch warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* revert(web-wireshark): restore Xvfb configuration

Restore the Xvfb display server configuration for xpra sessions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web-wireshark): enhance xpra HTML5 default settings

Update xpra HTML5 configuration to disable additional unused features:
- audio, keyboard, mediasource, aurora, http-stream
- Improve readability using heredoc format instead of printf

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(api): add RBAC authentication to web wireshark WebSocket endpoint

- Add `has_privilege_on_websocket` dependency to enforce Link.Capture privilege
- Include current_user parameter in endpoint for user identification and logging
- Update endpoint documentation to reflect token requirement and privilege
- Add test example WebSocket URL in TEST.md for reference

* refactor(web-wireshark): add generic WebSocket proxy and disable xpra HTML

- Add websocket_to_websocket.py utility for binary WebSocket proxy
- Disable xpra HTML server with --html=no flag
- Update manager return value: url -> ws_url
- Simplify WebSocket proxy implementation in links.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web-wireshark): remove unnecessary sleep delays

Remove 2-second sleep delays after container start and xpra initialization.
Health checks and verification happen immediately, improving startup time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(agent): prevent blocking during project close

- Add 5s timeout for AgentService.checkpointer_conn.close()
- Optimize stop_all_sessions: single command instead of 100 docker exec calls
- Prevents indefinite hang when closing projects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-wireshark): return errors to client on startup failure

- Throw ControllerError when Web Wireshark startup fails
- Include detailed error messages from script stderr
- Support both ws_url and url response formats
- Client now receives proper error response instead of success

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web-wireshark): parallelize startup and remove unnecessary waits

- Parallel execution: container info query + xpra start
- Remove xpra list verification (unnecessary)
- Fire-and-forget Wireshark startup (no timeout wait)
- Startup time reduced from ~7s to ~1s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web-wireshark): add stop-container and delete-container commands

- Add stop-container command to stop container on project close
- Add delete-container command to delete container on project delete
- Enables proper container lifecycle management
- Containers are now stopped (not deleted) when project closes
- Containers are deleted when project is deleted

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(project): simplify close flow by removing redundant xpra session cleanup

Since docker stop with timeout=0 already force-kills all processes in the
container, explicitly stopping xpra sessions before stopping the container
is unnecessary. Remove the _cleanup_web_wireshark_xpra_sessions() call
to reduce subprocess overhead and simplify the close flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* perf(docker): force kill containers on stop by default

Change docker stop timeout from 10 seconds to 0 (immediate SIGKILL).
Web Wireshark containers don't need graceful shutdown since they have
no persistent state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web-wireshark): enable WebSocket protocol for xpra connection

- Change xpra bind from --bind-tcp to --bind-ws for WebSocket support
- Enable HTML client with --html=on for xpra WebSocket server
- Pass binary subprotocol when connecting to xpra container

The xpra WebSocket server requires the 'binary' subprotocol during
handshake. Without it, the server returns 403 with message:
"client does not support 'binary' protocol".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web-wireshark): add WebSocket subprotocol negotiation support

Fix WebSocket proxy for xpra container by implementing proper subprotocol
negotiation. The xpra client requires the server to respond with the
negotiated subprotocol (binary) in the WebSocket handshake response.

Changes:
- Modified get_current_active_user_from_websocket to extract client's
  requested subprotocols from Sec-WebSocket-Protocol header
- Updated websocket.accept() call to include negotiated subprotocol
- Enhanced websocket_proxy to support subprotocol parameter
- Improved logging for WebSocket connection debugging

This fixes the issue where xpra clients would immediately disconnect
after connection due to missing subprotocol in server response.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(web-wireshark): remove verbose debug logging

Remove excessive debug logs from WebSocket proxy implementation while
keeping essential logs for troubleshooting:
- Keep: subprotocol negotiation, connection establishment, errors
- Remove: verbose step-by-step debugging information

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web-wireshark): translate Chinese comments and docs to English

- Translate all Chinese comments in project.py, link.py, and links.py to English
- Convert TEST.md and maunal-test.md documentation to English
- Remove obsolete IMPLEMENTATION_PLAN.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(docker): lock xpra version to 6.4.3 for reproducible builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(docker): improve Dockerfile with TZ, no-install-recommends, and labels

- Add TZ=UTC timezone setting
- Use --no-install-recommends to reduce image size
- Add LABEL metadata for maintainer and description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(docs): rename and consolidate documentation

- Rename TEST.md to WEB_WIRESHARK.md for clearer naming
- Merge maunal-test.md content into main document under "Manual Testing" section
- Remove obsolete gns3_icon_black.svg

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docker): add xpra-x11 package and remove --no-install-recommends

- Add xpra-x11 package required for seamless mode
- Remove --no-install-recommends to ensure all recommended packages are installed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(api): add capture file download endpoint

Add GET /{link_id}/capture/file endpoint to download PCAP capture files.
Supports downloading while capture is active (streaming).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web_wireshark): improve session cleanup and add known issues

- Add cleanup of existing processes before starting xpra session to prevent
  "another window manager seems to be running" errors
- Stop all associated processes (xpra, wireshark, Xvfb) when stopping sessions
- Document known issues in WEB_WIRESHARK.md including JWT token security,
  duplicate code, and other implementation concerns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web_wireshark): add restart wireshark API endpoint

- Add POST /links/{link_id}/capture/wireshark/restart endpoint
- Add restart command to manage_wireshark.py CLI
- Add _restart_web_wireshark method in link.py controller
- Restart simply calls start_wireshark_session which handles cleanup

This allows users to recover after accidentally closing the Wireshark
window without having to stop and restart the entire capture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add Web Wireshark business process documentation

Document the Web Wireshark feature including architecture diagrams,
business processes for capture start/stop, container lifecycle,
WebSocket connection flow, and session management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web_wireshark): fix container network access and improve session cleanup

- Fix GNS3 server URL detection to use container gateway IP (172.31.0.1)
  instead of localhost/127.0.0.1/0.0.0.0 which don't work from containers
- Add import socket module for gateway IP conversion
- Move urllib.parse import to file header (code style improvement)
- Add logging for Web Wireshark startup (capture stream URL, display, etc.)
- Fix X lock file cleanup to prevent "Server is already active" errors
- Use exec pkill to reduce zombie processes from docker exec bash
- Add _cleanup_x_lock() method to remove X lock files after stopping sessions
- Update link.py to always log subprocess stderr for debugging

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): avoid zombie pkill processes by using Docker API

Replace pkill commands with Docker API-based process killing to prevent
zombie process accumulation in Web Wireshark containers.

Changes:
- Add DockerHTTPClient.list_processes() method to query container processes
- Rewrite _kill_process_tree() to use Docker API instead of pkill
- Unify all process cleanup to use _kill_process_tree() method
- Add logging for killed processes (count and PIDs)
- Include fallback to pkill if Docker API fails

This prevents the accumulation of zombie pkill processes that occurred
when using bash -c "pkill -9 -f pattern" commands.

Testing: Started and stopped multiple capture sessions, verified no new
pkill zombie processes are created during cleanup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): use docker-init and cleanup socket files

Enable Docker init system (tini) as PID 1 and clean up xpra socket
files when stopping sessions to prevent zombie processes and leftover
sockets.

Changes:
- Add "Init": True to container host_config to use docker-init (tini)
- Extend _cleanup_x_lock() to remove xpra socket files
  * /run/user/1000/xpra/{display}/socket
  * /run/user/1000/xpra/*-{display}
  * /home/gns3/.xpra/*-{display}

Benefits:
- docker-init (tini) automatically reaps orphan processes, eliminating
  zombie process accumulation (tested: 53 zombies -> 0 zombies)
- Socket cleanup prevents xpra list from showing UNKNOWN sessions
- Cleaner container state after stopping sessions

Testing:
- Started and stopped 3 capture sessions
- Verified 0 zombie processes after stopping
- Verified xpra list shows "No xpra sessions found" (no UNKNOWN)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(web_wireshark): add comprehensive CLI script documentation

Add detailed module docstring to manage_wireshark.py explaining:
- Script purpose: CLI tool for manual management, debugging, and testing
- Important note: Use WebWiresharkManager directly for programmatic access
- Usage examples for all commands (start, stop, restart, stop-all, delete)
- Available commands list with descriptions
- Output format specification (JSON to stdout/stderr)
- Help information for getting command-specific usage

This clarifies that the script is intended as a CLI utility, not for
subprocess calls from within GNS3 server code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web_wireshark): use direct API calls instead of subprocess

Replace subprocess calls to manage_wireshark.py with direct API calls
to WebWiresharkManager, eliminating subprocess overhead and JSON parsing.

Changes:
- Add import for WebWiresharkManager
- Refactor _start_web_wireshark() to use direct API call
- Refactor _stop_web_wireshark() to use direct API call
- Refactor _restart_web_wireshark() to use direct API call

Benefits:
- Code reduction: 78 lines (-68%)
- Better performance: No subprocess creation overhead
- Better logging: Manager logs directly to GNS3 logging system
- Simpler error handling: Direct exceptions instead of return codes
- No JSON parsing: Direct Python objects
- Resource cleanup: Added finally blocks to ensure manager.close()

Testing:
- All Web Wireshark operations work correctly
- Logs now appear in GNS3 server logs instead of stderr
- Error handling improved with proper exception propagation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): resolve circular import with delayed imports

Fix circular import error by moving WebWiresharkManager import from
module level to function level (delayed import).

Circular dependency was:
  link.py → WebWiresharkManager → Controller → link.py

Solution:
  - Remove top-level import of WebWiresharkManager
  - Add delayed imports in each method that uses it:
    * _start_web_wireshark()
    * _stop_web_wireshark()
    * _restart_web_wireshark()

This allows the controller module to fully initialize before importing
WebWiresharkManager, breaking the circular dependency.

Error before fix:
  ImportError: cannot import name 'Controller' from partially initialized
  module 'gns3server.controller' (most likely due to a circular import)

Testing:
  - Successfully imports Link module
  - GNS3 server starts without import errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: move imports to module level and remove Controller dependency

Remove circular dependency between link.py and manager.py by:

1. Remove Controller import from manager.py
   - Manager no longer imports Controller
   - URL detection now relies on Config or default only
   - link.py passes capture_stream_url to manager

2. Move WebWiresharkManager import to module level in link.py
   - No longer need delayed imports since no circular dependency
   - Clean, standard Python import pattern

3. Remove redundant Config import in ensure_network()
   - Config was already imported at module level

Changes:
- manager.py: -24 lines (removed _get_gns3_url_from_controller and redundant import)
- link.py: -30 lines net reduction after moving import to top

Testing:
- All imports work without circular dependency errors
- GNS3 server starts successfully

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(docker_client): use text response for list_processes API

Docker API /containers/{id}/top returns plain text, not JSON.
The generic _request method auto-parses JSON which caused:
  "'dict' object has no attribute 'strip'"

Fix by using session.get() directly with response.text()
instead of the generic _request method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): use correct capture stream URL endpoint

Remove passing capture_stream_url from link.py to manager.py.
Manager.py auto-detects URL using correct endpoint:
  /v3/projects/{project_id}/links/{link_id}/capture/stream

This endpoint supports JWT authentication, unlike the compute URL
(/v3/compute/...) which requires compute credentials.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): use container-local PIDs for process killing

- Docker API returns host PIDs, not container PIDs - use pgrep inside
  container to get correct PIDs for kill
- Fix list_processes to parse Docker API JSON response correctly
- Remove unnecessary exec prefix in shell commands
- Add logging for debugging process killing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* perf(web_wireshark): optimize process killing with single pgrep call

Replace sequential _kill_process_tree calls with a new _kill_process_tree_batch
method that combines all patterns into a single regex. This reduces docker exec
calls from 8 to 1, improving performance from ~8 seconds to ~0.9 seconds.

Changes:
- Add _kill_process_tree_batch() method with combined regex pattern matching
- Update start_wireshark_session() to use batch cleanup
- Update stop_wireshark_session() to use batch cleanup
- Update stop_all_sessions() to use batch cleanup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): disable HTML5 client to improve xpra startup speed

Change --html=on to --html=off to disable the xpra HTML5 client interface.
This reduces xpra startup time from ~6.4s to ~2.9s (55% improvement) while
keeping the WebSocket server functional for browser connections.

The HTML5 client is not needed as we only require the WebSocket endpoint
for remote display forwarding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): optimize container health check using Docker built-in status

Replace manual docker exec ping with Docker's built-in health check status
to reduce container startup latency by ~1 second.

Changes:
- Use container["Health"]["Status"] instead of manual ping check
- Skip health check for containers with "healthy" or "starting" status
- Only verify containers with "unhealthy" status
- Keep manual health check for newly started containers

This reduces the container verification time from ~1s to near-zero
for healthy running containers while maintaining safety for unhealthy ones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): get gateway IP from Docker API instead of container exec

Replace slow docker exec method with fast Docker Network API call to get
gateway IP. This reduces gateway detection from ~850ms to ~1ms (1000x faster).

Changes:
- Use docker.get_network() API to get gateway from IPAM config
- Keep container exec methods as fallback if Docker API fails
- Remove container_id requirement (not needed for Docker API method)

The Docker network gateway is shared by all containers in the network,
so querying the network is more efficient than querying each container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web_wireshark): remove unreliable nameserver fallback for gateway detection

Remove the fallback method that reads /etc/resolv.conf nameserver as gateway.
This method is unreliable because:
- nameserver is not necessarily the gateway (could be upstream DNS)
- Many systems use 127.0.0.53 (systemd-resolved) or 127.0.0.1
- Even when not local, it could be public DNS (8.8.8.8, 1.1.1.1)

The current fallback strategy is sufficient:
1. Docker Network API (fast, reliable)
2. /proc/net/route (standard gateway detection)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): use host perspective for process killing (37x faster)

Replace docker exec with host perspective process management for killing
container processes. This reduces process cleanup from ~850ms to ~23ms.

Key optimization:
- Get container init PID using docker inspect (fast)
- Use pgrep -P <init_pid> to find child processes from host perspective
- Kill processes directly using host PID (no docker exec needed)

Performance improvements:
- Process finding: 850ms → 23ms (37x faster)
- Process killing: 850ms → <1ms (850x faster)
- File checking: 850ms → 0.003ms (280,000x faster)

Fallback to docker exec method if host perspective fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): use host perspective for file cleanup (891x faster)

Replace docker exec with direct filesystem access from host perspective
for cleaning up X lock files and xpra sockets. This reduces cleanup time
from ~890ms to ~1ms (891x faster).

Key optimization:
- Access /proc/<container_pid>/root/ directly from host
- Use os.remove() and glob.glob() instead of docker exec rm -f
- Fallback to docker exec if host perspective fails

This complements the earlier optimization for process killing, further
reducing startup time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Revert "perf(web_wireshark): use host perspective for file cleanup (891x faster)"

* fix(web_wireshark): recursively kill all descendant processes to prevent orphans

Previous implementation only killed direct children of container init using
`pgrep -P <init_pid>`, but xpra spawns child processes (Xvfb, pulseaudio,
ibus-daemon) that become grandchildren and were not being terminated.

This fix walks the entire process tree recursively to find and kill all
descendant processes, ensuring complete cleanup without orphans.

Performance: ~20-40ms (only 10-20ms slower than previous 23ms, but ensures
thorough cleanup).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(web_wireshark): add comprehensive startup/shutdown performance metrics

Add detailed performance characteristics section documenting:
- Startup performance breakdown (before/after optimization)
- Shutdown performance breakdown (before/after optimization)
- First startup vs subsequent startup comparison
- Measured production data
- Key optimization techniques

Performance improvements: 67% faster startup, 78% faster shutdown,
zero orphan processes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): ensure container stops on project close

Remove dependency on _web_wireshark_container_created flag which gets
reset when project is reloaded, causing container to not stop on project close.

Now directly attempts to stop container on every project close. If container
doesn't exist, the script handles it gracefully. This is simpler and more
reliable than maintaining a flag.

Also removed unnecessary _cleanup_web_wireshark_xpra_sessions() call since
stopping the container automatically terminates all xpra sessions inside.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): ensure container deletion on project delete

Remove dependency on _web_wireshark_container_created flag from
_cleanup_web_wireshark_container() to ensure container is deleted
when project is deleted, even if project was reloaded and flag was reset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(web_wireshark): remove unused _web_wireshark_container_created flag

This flag was set but never read for any conditionals since we changed
the stop/delete methods to directly attempt the operation. It's purely
redundant code that adds confusion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): skip unnecessary cleanup using fast host perspective check

Add _check_residuals_exist() function that uses host perspective (~20ms)
to check if residual processes or socket files exist before cleanup.

Returns (has_process_residuals, has_socket_residuals) tuple to allow
selective cleanup - if only sockets need cleaning, skip the slower
process tree killing.

For new containers with no residuals, this saves ~3 seconds of
unnecessary docker exec calls.

Socket cleanup always uses docker exec for safety (avoiding accidental
host filesystem deletion from /proc/<pid>/root/ path errors).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web_wireshark): increase container exec timeout from 5s to 10s

xpra start with Xvfb initialization can take longer than 5 seconds in Docker containers, causing timeout failures. Increasing timeout to 10 seconds to allow sufficient startup time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(web_wireshark): optimize cleanup and document docker exec limitations

- Combine X lock and xpra socket cleanup into single docker exec call
  Reduces exec calls from 2 to 1 per stop operation, improving performance
  when stopping multiple capture sessions.

- Document Docker exec performance limitations with test data showing
  parallel exec is 42% slower than serial due to Docker daemon's
  internal queuing mechanism.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(links): prevent AssertionError in stream_pcap during rapid stop_capture

Fix race condition where stream_pcap checks link.capturing (True) but
link.capture_node becomes None before accessing link.compute.

This happens when stop_capture() is called and rapidly cleans up
_capture_node while WebSocket requests are still processing.

Now check both capturing and capture_node to ensure capture is still active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(links): prevent AssertionError in stream_pcap during rapid stop_capture

Fix race condition where stream_pcap checks link.capturing (True) but
link.capture_node becomes None before accessing link.compute.

This happens when stop_capture() is called and rapidly cleans up
_capture_node while WebSocket requests are still processing.

Now check both capturing and capture_node to ensure capture is still active,
and log at DEBUG level since this is expected behavior during rapid stop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web_wireshark): load container config from settings

- Load memory, cpus, and pids_limit from WebWireshark config section
- Apply config only on container creation (_start_web_wireshark)
- Skip config on restart (_restart_web_wireshark) as container exists

Users can now configure container resources in gns3_server.conf:

[WebWireshark]
memory = 4g
cpus = 2.0
pids_limit = 2000

If not configured, defaults (2g, 1.0, 1000) are used.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(web_wireshark): add container statistics to /v3/statistics endpoint

Add Web Wireshark container monitoring to the statistics API for
better visibility into packet capture sessions.

Changes:
- Create new stats.py module with collect_webwireshark_stats()
  * Collects container info (status, project, active sessions)
  * Gets resource limits (memory, CPU, PIDs) from container config
  * Gets resource usage via docker stats (memory, CPU, PIDs)
  * Properly closes aiohttp connections to avoid leaks

- Update /v3/statistics endpoint to include webwireshark data
  * total_containers: Total number of Web Wireshark containers
  * running_containers: Number of containers currently running
  * active_sessions: Total active capture sessions
  * containers: Array with per-container details

- Update statistics-api.md documentation
  * Change URL from /v1/statistics to /v3/statistics
  * Add webwireshark field descriptions and examples
  * Add dashboard integration for Web Wireshark monitoring

Example response:
{
  "webwireshark": {
    "total_containers": 1,
    "running_containers": 1,
    "active_sessions": 2,
    "containers": [{
      "project_id": "...",
      "project_name": "test",
      "container_id": "6edc9029bac0",
      "status": "running",
      "memory_limit": "4.0 GB",
      "cpu_limit": "4.0",
      "pids_limit": 4000,
      "memory": "535.7MiB / 4GiB",
      "cpu": "0.29%",
      "pids": 124
    }]
  }
}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(project): use WebWiresharkManager directly instead of subprocess

Replace subprocess calls to manage_wireshark.py with direct
WebWiresharkManager method calls in project.py. This eliminates
unnecessary process overhead and maintains consistent usage pattern
with link.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(logging): use %-formatting instead of f-strings in WebWireshark methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(web_wireshark): use info level log when container not found

Change log level from warning to info when container doesn't exist
during stop/delete operations, and fix f-string without placeholders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(logging): lower log level for client disconnection

Change log level from warning to debug when client possibly
disconnects, as this is normal behavior when users close
browser tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(linting): resolve ruff warnings and errors

- Remove unused variable proc (fire-and-forget subprocess)
- Remove duplicate nodes property definition
- Remove extraneous f-prefix from f-strings without placeholders
- Change bare except to except Exception
- Remove unused imports (sys, asyncio, json)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web_wireshark): improve error message when Docker image not found

When creating a container fails due to missing image, provide helpful
error message with docker pull command and local build instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(schema): add wireshark field to Link schema

Add wireshark boolean field to Link Pydantic schema so it is
included in API responses when Web Wireshark session is active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(link): add wireshark state tracking

Track whether Web Wireshark is running on a link by adding
_wireshark boolean property, updated on start/stop operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(chat): add session abort functionality

Add ability to abort streaming chat sessions via REST API.

Changes:
- Add abort flag to MessagesState for tracking abort requests
- Add session_id to state for abort event correlation
- Add _abort_flags dict and check/set/clear functions in gns3_copilot.py
- Add abort_handler_node to generate aborted tool messages
- Modify should_continue to route to abort_handler_node when aborting
- Add abort_session() method in AgentService
- Add POST /sessions/{session_id}/abort API endpoint
- Clear abort flag at stream start

When abort is triggered during streaming:
- If LLM has tool_calls pending, abort_handler_node generates
  aborted tool messages to maintain checkpoint consistency
- Prevents "insufficient tool messages" error on resume

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(chat): send tool_end event when stream is aborted

When a stream is aborted during tool execution, yield proper tool_end
events for aborted tools instead of a generic abort event. This maintains
compatibility with the frontend's expected tool_start/tool_end flow.

Changes:
- Add stream_aborted tracking flag
- After stream loop, check abort flag and yield tool_end events
- Add "abort" to ChatResponse type enum (unused but available)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(web_wireshark): add gns3-wireshark-setup command for Docker image setup

Add a new entry point script that allows users to setup the Web
Wireshark Docker image with a single command:

    pip install gns3-server && gns3-wireshark-setup

The script will:
1. Try to pull gns3/web-wireshark:latest from Docker Hub
2. If pull fails, build the image locally using the included Dockerfile
3. Show raw docker pull/build output for full visibility

Files changed:
- Add setup_wireshark_image.py (new entry point script)
- Update pyproject.toml (add gns3-wireshark-setup entry point)
- Update documentation (README.md, WEB_WIRESHARK.md, web-wireshark-business-process.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(appliance): add tags field support for appliances and templates

- Add tags field to ApplianceV1_6 and ApplianceV8 schemas
- Add tags propagation from appliance config to template
- Simplify VPCS builtin template tags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix test in test_link.py

* Fix link.py after failed tests

* feat(copilot): add device skills system for LLM context injection

- Add skills module with registry and DeviceSkillsTool
- Skills organized by vendor/series for easy extensibility
- Support device_type, category (device/protocol/feature), operation (config/diagnosis)
- First implementation: VPCS skill (gns3_vpcs_telnet)
- Skills tool integrated into teaching_assistant and lab_automation modes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(vpcs): change prompt detection log from warning to debug

The "VPCS prompt not clearly detected" message is not an error,
connection works fine. Change to debug level to reduce noise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(memory): add uBridge permission issue documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(copilot): include link_id in links_summary output

Return link_id in the links_summary method so that the AI can
identify which link to analyze when using the packet capture tool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(copilot): add packet capture analysis tool

Add PacketCaptureTool that allows AI to analyze packets from an active
GNS3 capture. The tool downloads capture files from the GNS3 server
and runs tshark analysis to help users understand network traffic.

Features:
- Download capture file from /capture/file endpoint
- Run tshark with custom arguments for flexible analysis
- Support analyzing specific packets (e.g., "explain packet #42")
- Support protocol statistics, traffic analysis, and expert info

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(copilot): use shlex.split to properly parse quoted tshark arguments

tshark_args may contain quoted filter expressions like "-Y \"frame.number == 24\"".
Using plain str.split() breaks these quoted arguments, causing tshark warnings
about conflicting display filters. Use shlex.split() to correctly parse quoted
arguments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(copilot): simplify PacketCaptureTool to accept only packet_number

Instead of exposing complex tshark arguments to the LLM, the tool now
accepts a simple packet_number parameter and internally constructs the
tshark command with verbose output. This prevents the LLM from generating
incorrect tshark parameters while still providing detailed packet analysis.

Changes:
- Remove tshark_args and max_lines parameters
- Accept only packet_number as input
- Internal command: tshark -r <file> -Y "frame.number == N" -V
- Returns complete packet structure without line limits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add CC BY-SA 4.0 license headers to documentation files

Add SPDX license headers referencing docs/LICENSE file to all markdown
and HTML documentation files in the docs directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(copilot): add topology planner skill

Add new skill for automatic network lab topology planning:
- IOU as default image, 10.0.0.0/8 IP range, max 10 nodes
- Node naming convention: R/S/PC + number
- 7-step workflow for create/rename/link/start/verify/config
- IP allocation rules and troubleshooting guide

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(copilot): add node positioning rules to topology planner skill

Add grid-based positioning for GNS3 nodes:
- Minimum 250px distance between nodes
- Grid layout: 4 columns, 300x250px spacing
- Formula: x = -400 + col * 300, y = -200 + row * 250
- Update workflow params_required to include x, y coordinates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(copilot): remove unused helper functions from topology planner skill

Delete Python helper functions that cannot be serialized to JSON:
- calculate_node_positions()
- get_position_for_node()
- allocate_subnet()
- allocate_ip()
- TOPOLOGY_CREATION_STEPS (duplicate of workflow in skill dict)

LLM should use formula descriptions in skill to calculate positions/IPs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(copilot): add topology_planner workflow to lab automation prompt

Add device_skills tool to AVAILABLE TOOLS table.
Add TOPOLOGY PLANNING WORKFLOW section explaining:
- How to query topology_planner skill
- Default conventions (IOU, 10.0.0.0/8, naming rules, position formula)
- 7-step workflow for topology creation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(copilot): support name parameter in gns3_create_node tool

- Add optional 'name' field to node creation, allowing direct naming
- Update Node constructor to pass name parameter
- Remove separate rename step (step_3) from topology planner workflow
- Renumber workflow steps: 1-2-3-4-5-6 (skipping old step_3 rename)

This eliminates the need for a separate gns3_update_node_name_tool call
when creating nodes with predefined names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(copilot): update topology workflow to 6 steps

Remove rename step since name can be set directly in create_gns3_node.
Workflow changed from 7 steps to 6 steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(copilot): replace grid positioning with topology-based layout

Redesign node positioning rules to follow classic network topologies:
- Star: hub at center, spokes radiating outward
- Ring: nodes in circular arrangement
- Bus: linear chain of nodes
- Mesh: grid pattern for interconnected nodes
- Hierarchical: three-tier (Core → Distribution → Access)
- Linear P2P: point-to-point WAN links in a line

Remove old grid formula. Update prompt and workflow to reflect new approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(copilot): add note about combining topology types

LLM can mix topology types as needed, e.g., star + linear_p2p for WAN segments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(copilot): remove language matching rules from prompts

Remove language matching rules that cause inconsistent responses:
- "User writes in Chinese → Respond in Chinese"
- "User writes in English → Respond in English"

These created ambiguity and led to inconsistent language behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(copilot): remove Chinese from response template

Replace mixed Chinese/English headers with English only:
- "操作总结 / Operation Summary" → "Operation Summary"
- "详细信息 / Details" → "Details"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(copilot): remove Chinese mentions from prompts

Remove references to "Chinese" language in title_prompt.py:
- "Generates concise Chinese or English titles" → "Generates concise titles"
- "If the content is predominantly in Chinese, generate a Chinese title" → removed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(copilot): use short_name for link labels and support short port names

- Match ports by both name and short_name for flexibility
- Use short_name (e.g. "e0/0") instead of full name (e.g. "Ethernet0/0")
  for link labels, improving visual clarity in dense topologies

* feat(topology): replace hardcoded interface names with dynamic placeholders

- Update topology planner skill template to use {short_name} placeholder
- Allows dynamic interface name generation based on device type
- Improves template flexibility for different network device configurations

* refactor(topology): use node-pair IP format and hyphenated naming

- Use 10.0.{node_pair}.x format for P2P links (e.g., 10.0.12.x for R-1-R-2)
- Change node naming to hyphenated format: R-1, R-2, SW-1, PC-1
- Use {short_name} as placeholder for port names in output template
- Remove unused IP_SUBNET_POOL constant
- Simplify ip_planning rules to intuitive format description

* fix(web_wireshark): raise minimum Docker API version to 1.44

Docker daemon requires API version 1.44+, so the minimum
supported version should match rather than defaulting to 1.40.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(web_wireshark): call ensure_network in start_wireshark_session

Ensure Docker network exists before creating container, so that
Web Wireshark works when started via API without going through CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(agent): improve Docker image setup with network error detection

- Add `is_network_error()` function to detect network-related failures in Docker pull output
- Modify `pull_image()` to capture output and return success status along with output
- Enhance main logic to detect network errors and skip local build when Docker Hub is inaccessible
- Provide helpful suggestions for network issues (Docker mirror, VPN, manual image transfer)
- Improve error messages to differentiate between network failures and other errors

* feat(docs): add Ubuntu 24.04 development setup guide

Add a comprehensive development environment setup guide for Ubuntu 24.04. The guide includes steps to install dependencies via PPA, configure Docker with mirror accelerators for users in mainland China, set up user permissions, and run the server from source with a Python virtual environment. This provides a clear, step-by-step reference for new contributors and developers.

* feat(docs): add pip mirror note for China mainland users

Add a comment in the development setup documentation suggesting the use of the Aliyun PyPI mirror for users in China mainland to improve installation speed and reliability. This helps overcome network restrictions and slow downloads from the default PyPI repository.

* feat(docs): add LVM root partition expansion guide

Add optional section to development setup documentation with instructions for expanding the root partition when using LVM. This helps developers resolve low disk space issues by utilizing unallocated space in the volume group. The guide includes commands to check LVM status, extend the logical volume, and verify the changes.

* feat(docs): add tshark to development setup dependencies

Add tshark to the apt install command in the development setup documentation. Tshark is required for packet capture functionality in GNS3, ensuring the development environment has all necessary tools for network analysis and debugging.

* feat: add GNS3 documentation skill with standardized structure

Add new documentation skill file defining standards for GNS3 technical documentation. The skill establishes a structured approach focusing on architecture diagrams, flow diagrams, and text descriptions while prohibiting code examples and user scenarios. This ensures consistent, high-quality documentation across the GNS3 ecosystem.

* feat(docs): update documentation skill to focus on server technical docs

Update the GNS3 documentation skill to specifically target server technical documentation under the docs/ directory. The revised standard emphasizes high-level understanding over implementation details, using ASCII diagrams for architecture and business processes, API endpoint tables, and measured performance data. Code specifics are intentionally omitted, directing readers to the codebase for implementation details.

* feat(docs): rewrite documentation skill and statistics API doc

- Rewrite gns3-documentation skill to match actual server-side doc style:
  focus on architecture/flow diagrams, API data, skip code details
- Switch diagram standard from ASCII to Mermaid (GitHub native rendering)
- Rewrite statistics-api.md with Mermaid architecture and sequence diagrams,
  add missing webwireshark container fields (memory_limit, cpu_limit, pids_limit),
  remove speculative content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(docs): update VNC WebSocket console documentation with Mermaid diagrams

- Replace ASCII diagrams with Mermaid flowcharts for better visualization
- Clarify connection flow between browser, controller, compute, and VNC server
- Update authentication details and endpoint descriptions
- Add missing documentation for packet capture workflow
- Improve overall readability and maintainability

* docs: add AI disclaimer to documentation files

Add a standardized disclaimer to multiple documentation files indicating that the content has been organized by AI with reference to actual code. The disclaimer warns users that AI can make mistakes and advises verification against the source code when in doubt. This improves transparency about the documentation's origin and encourages careful usage.

* feat(docs): update chat API documentation with new features and clarifications

- Update title from "Design Document" to reflect current implementation status
- Add new features: session abort, copilot modes (teaching_assistant, lab_automation_assistant), session pinning
- Enhance architecture diagram with LangGraph StateGraph details including abort_handler_node, title_generator_node, and conditional edges
- Clarify statistics tracking: add ai_response_counted flag, filter title_generator_node from LLM counts, explain incremental token counting
- Improve documentation accuracy for real-time statistics collection and token calculation methods

* feat(docs): restructure command security documentation with visual workflows

- Replace verbose implementation details with concise architecture overview
- Add Mermaid diagrams to visualize command filtering and multi-line expansion flows
- Simplify configuration instructions and remove redundant examples
- Consolidate file structure and function reference tables for clarity
- Maintain all security principles while improving readability and maintainability

* feat(context): refactor context window management documentation for clarity

- Reorganize documentation with improved structure and visual diagrams
- Add Mermaid diagrams to illustrate architecture and trimming process
- Simplify content while maintaining technical accuracy
- Update token counting and trimming strategy explanations
- Enhance readability with better formatting and component tables

* feat(docs): update LLM model configs documentation

- Change config column type from JSONB to JSON (JSONB on PostgreSQL)
- Update provider table to mark base_url as required with planned optional status
- Add note about base_url being currently required in API schema
- Clarify GET own configs endpoint returns plain array
- Add copilot_mode field to update request schema
- Document update limitations for context_strategy and copilot_mode fields

* feat(docs): add GNS3StartNodeQuickTool and update node creation examples

- Add documentation for new `GNS3StartNodeQuickTool` (`start_gns3_node_quick`) that starts nodes without waiting for boot completion
- Update node creation example to include optional `name` field in template placement
- Clarify dynamic wait time strategy for `GNS3StartNodeTool` and contrast with quick tool
- Update tool file structure to reflect new configuration, display, and packet capture tools
- Fix truncated line in suspend tool documentation

* feat(docs): add comprehensive documentation structure with CC BY-SA 4.0 license

Add initial documentation directory with detailed README.md that outlines:
- Dual license structure (CC BY-SA 4.0 for docs, GPLv3 for code)
- Complete directory structure for features, AI Copilot, and bugs
- Feature documentation covering Controller+Compute setup, Statistics API, VNC WebSocket console, and Web Wireshark
- AI Copilot implemented features including Chat API, LLM model configs, command security, and multi-vendor device support

This provides organized technical documentation for the GNS3 server project with proper licensing and feature coverage.

* docs: update multi-vendor device support documentation

- Simplify vendor support table by removing redundant platform column
- Add VPCS as a simulator in status column
- Improve VPCS driver diagram with Mermaid syntax and detailed components
- Document VPCS-specific Netmiko parameters (fast_cli, global_delay_factor)
- Update VPCS tool usage example with connection options structure
- Remove outdated Nornir configuration approaches, reference current implementation
- Add file reference for VPCS tools location
- Clean up documentation structure for better readability

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: YueGuobin <yueguobin@gmail.com>
Co-authored-by: Jeremy Grossmann <grossmj@gns3.net>
2026-04-20 22:56:55 +08:00
arl1984 de0d050689 Fix telnet console silent-proxy hang on non-ConnectionError exit (#2344)
The run() cleanup block was guarded by `except (ConnectionError, OSError):`,
so exits via asyncio.CancelledError or any other exception type skipped
cleanup. Result: `_reader_process` stays pinned to the dead reader and
`_get_reader()` returns None for every subsequent client — the silent-proxy
symptom described in #2344.

Convert the except block to try/finally so cleanup always runs, regardless
of how `_process()` exits. Also:
- catch asyncio.CancelledError + generic Exception (with log.exception) so
  unexpected failures don't swallow the cleanup
- reset `_current_read = None` after cancellation
- use `dict.pop(..., None)` instead of `del` to avoid KeyError races if
  the broadcast loop's timeout handler already removed the entry

Triggering pattern observed in practice: a diagnostic tool opens a console,
sends a few commands, and closes abruptly (e.g. from a test harness or
orchestration script that cancels its Task). If the `_process()` task was
awaiting on one of the `network_read` / `reader_read` futures at the time
of cancellation, the CancelledError propagates up through `run()` and
bypasses the ConnectionError-only except clause. The proxy accepts future
connections (the listen socket is still alive) but never forwards any data
because `_reader_process` never got reset.

Validated against gns3/gns3-server:latest (2.2.56.1) running a 10-scenario
sequential regression batch that previously hung reliably on the 4th
sp_v1 / L3VPN scenario and now completes cleanly across all 10.
2026-04-16 14:46:49 +00:00
grossmj 80cc85e5d5 Fix exception when custom adapters is not set 2026-04-15 14:17:12 +08:00
grossmj 737a174ae5 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/version.py
2026-04-13 11:45:26 +08:00
Jeremy Grossmann d59709071a Merge pull request #2668 from GNS3/release/v2.2.58.1
Release v2.2.58.1
2026-04-12 21:18:23 +08:00
grossmj ae3ae46151 Development on 2.2.59.dev2 2026-04-12 21:17:17 +08:00
grossmj 58fc6a8478 Release v2.2.58.1 2026-04-12 20:59:20 +08:00
grossmj d9b8d0d1ff Sync appliances 2026-04-12 20:49:56 +08:00
grossmj 2b0b31b402 Merge branch 'master' into 2.2 2026-04-12 20:47:14 +08:00
grossmj 66ce3ec280 Fix bug when custom_adapters is None in port_factory.py 2026-04-12 14:05:56 +08:00
grossmj a040acfaa5 Have optional body in start node API endpoint 2026-04-12 14:04:04 +08:00
grossmj 9c988b34d0 Fix snapshots after merging 2026-04-11 19:54:49 +08:00
grossmj 0d3fad8c8f Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/export_project.py
#	gns3server/controller/project.py
#	gns3server/controller/snapshot.py
#	gns3server/crash_report.py
#	gns3server/schemas/snapshot.py
#	gns3server/static/web-ui/26.34a83d9cee7db39cd0de.js
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.d74d38241f0602d1b3e0.js
#	gns3server/version.py
#	gns3server/web/route.py
#	tests/handlers/api/controller/test_project.py
#	tests/handlers/api/controller/test_snapshot.py
2026-04-11 19:22:05 +08:00
grossmj 4a47151526 Development on 2.2.59.dev1 2026-04-11 18:05:54 +08:00
Jeremy Grossmann adeec10188 Merge pull request #2667 from GNS3/release/v2.2.58
Release v2.2.58
2026-04-11 17:42:38 +08:00
Jeremy Grossmann e747deae88 Merge branch 'master' into release/v2.2.58 2026-04-11 17:37:31 +08:00
Jeremy GrossmannandCopilot Autofix powered by AI 264fffbc6c Potential fix for pull request finding 'CodeQL / Information exposure through an exception'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-11 17:34:53 +08:00
grossmj a295d653b8 Release v2.2.58 2026-04-10 20:36:01 +08:00
grossmj c6eec799fb Remove old files 2026-04-10 20:27:46 +08:00
grossmj 8503840307 Bundle web-ui v2.2.58 2026-04-10 20:24:16 +08:00
grossmj c4dbecc1ea Sync appliances 2026-04-10 20:11:16 +08:00
Jeremy Grossmann 3d71967983 Merge pull request #2665 from GNS3/refector-snapshots
Snapshot refactoring
2026-04-10 20:01:45 +08:00
grossmj 161e016594 Remove log message 2026-04-10 19:58:55 +08:00
grossmj 82f795c9ee Add some additional tests 2026-04-10 19:50:42 +08:00
grossmj 2670c68467 Last adjustments for import/export 2026-04-10 18:58:21 +08:00
grossmj 6f7730c455 Update snapshots when duplicating a project 2026-04-09 23:18:55 +08:00
grossmj 274cef6cf5 Add description for snapshots 2026-04-09 20:25:44 +08:00
grossmj fbea9b655d Fix issue when restoring a snapshot of a duplicated project 2026-04-08 22:16:47 +08:00
grossmj 6869f2d71d Snapshot refactoring 2026-04-08 20:02:01 +08:00
Jeremy Grossmann da5a1e9172 Merge pull request #2664 from yueguobin/fix/symbol-cors-headers
Fix/symbol cors headers
2026-04-07 22:27:47 +08:00
YueGuobin 8ab3243c79 fix(symbols): add authentication to symbol raw endpoint
Enable Symbol.Audit privilege requirement for the symbol file download
endpoint. This was previously disabled as a workaround for a web-ui bug.
2026-04-07 20:56:20 +08:00
YueGuobin 8041d2906c fix(symbols): add CORS headers to symbol file responses
FileResponse does not properly include CORS headers when served from
a different origin. This fix manually adds the Access-Control-Allow-Origin
header based on the request origin.

Fixes CORS policy errors when accessing symbol files from frontend
applications running on localhost:4200 or other origins.
2026-04-07 20:22:15 +08:00
Jeremy Grossmann ae8ef84668 Merge pull request #2663 from cristian-ciobanu/project-monitoring
Enhancement: Refresh projects list without restarting the GNS3 server
2026-04-07 18:09:29 +08:00
grossmj 5b04fd0336 Allow to find new project in sub dirs 2026-04-07 18:05:32 +08:00
Jeremy GrossmannandCopilot de8abc0af0 Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-07 17:37:34 +08:00
Jeremy GrossmannandCopilot 725cd0428c Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-07 17:35:33 +08:00
Jeremy Grossmann fdbb7bb70f Merge branch '3.0' into project-monitoring 2026-04-07 15:10:42 +08:00
grossmj e86a05a2ef Fix tests 2026-04-07 15:09:10 +08:00
Jeremy Grossmann 2ce7662c71 Merge branch '3.0' into project-monitoring 2026-04-07 12:58:56 +08:00
Cristi 104f56cb55 Enhancement: Refresh projects list without restarting the GNS3 server 2026-04-07 00:21:56 +03:00
grossmj b4edfdb063 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/appliances/infix.gns3a
#	gns3server/appliances/juniper-vJunos-router.gns3a
#	gns3server/controller/ports/port.py
#	gns3server/crash_report.py
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
2026-04-06 23:36:03 +08:00
Jeremy Grossmann 2e1db7de6f Merge pull request #2662 from UmmmAGoodName/3.0
Fix addressing issue #2005 including tests
2026-04-06 20:10:47 +08:00
grossmj d97aedb625 Fix tests 2026-04-06 20:03:38 +08:00
grossmj b07685666b Regenerate DB migration script 2026-04-06 19:55:11 +08:00
grossmj b1852f7bcf Fix accessing username in authentication.py 2026-04-06 19:37:17 +08:00
UmmmAGoodName 4cf8b79692 Fix addressing issue #2005 including tests 2026-04-05 21:51:52 +02:00
Jeremy Grossmann e871a1aed6 Merge pull request #2661 from GNS3/revert-2660-backport-telnetlib3
Revert "Backport telnetlib3 changes"
2026-04-05 22:02:05 +08:00
Jeremy Grossmann b222fba42c Revert "Backport telnetlib3 changes" 2026-04-05 21:58:21 +08:00
Jeremy Grossmann f9957b1d90 Merge pull request #2660 from GNS3/backport-telnetlib3
Backport telnetlib3 changes
2026-04-05 21:08:43 +08:00
grossmj bc6374f7fc Add keepalive mechanism using the NOP command 2026-04-05 13:30:38 +08:00
Cristi c739a16d70 Improved exception handling and telnet client disconnect 2026-04-05 13:29:35 +08:00
Cristi 7684ce60ce Backport: Re-write current Telnet server implementation using telnetlib3 library 2026-04-05 13:29:25 +08:00
Jeremy Grossmann 1d10bda22e Merge pull request #2659 from GNS3/appliance-v8
Add support for appliance format version 8
2026-04-04 20:14:23 +08:00
grossmj 51eb88ead1 Use get method for registry_version to avoid KeyError 2026-04-04 20:09:31 +08:00
grossmj 630c2d811d Add support for appliance format version 8 2026-04-04 20:04:42 +08:00
grossmj ef546a46f9 Sync appliances 2026-04-04 19:55:13 +08:00
Jeremy Grossmann 9290b37292 Merge pull request #2654 from yueguobin/feature/extended-statistics
Feature/extended statistics
2026-04-03 21:43:50 +08:00
Guobin Yue 2a11ab6ba3 Merge branch '3.0' into feature/extended-statistics 2026-04-03 21:39:38 +08:00
Jeremy Grossmann 55fa7bb10c Merge pull request #2658 from GNS3/convert-db-fields-to-json
Convert database template fields from PickleType to JSON
2026-04-03 21:06:29 +08:00
grossmj 1dc31127d9 Convert database template fields from PickleType to JSON 2026-04-03 20:59:57 +08:00
Jeremy Grossmann d9f12366bc Merge branch '3.0' into feature/extended-statistics 2026-04-01 12:54:54 +08:00
YueGuobinandClaude Opus 4.6 050b7a80ab docs: add Controller + Compute setup guide
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 02:08:18 +08:00
Jeremy Grossmann c9f4f7983b Merge pull request #2645 from cristian-ciobanu/telnetlib3
Enhancement: Re-write current Telnet server implementation using telnetlib3 library
2026-03-31 20:22:59 +08:00
grossmj 0b6f17cf8e Add keepalive mechanism using the NOP command 2026-03-31 18:30:59 +08:00
grossmj 38ebaaa90a Remove requests dependency from dev-requirements.txt 2026-03-31 17:30:41 +08:00
grossmj 9a06830f88 telnetlib3 is a shared dependency with AI Copilot 2026-03-31 17:22:34 +08:00
Jeremy Grossmann bebf070e4d Merge branch '3.0' into telnetlib3 2026-03-31 14:33:35 +08:00
Guobin Yue 02dc2b9a41 Merge branch '3.0' into feature/extended-statistics 2026-03-30 22:48:39 +08:00
Jeremy Grossmann d40e292047 Merge pull request #2655 from yueguobin/fix/device-type-error-message
fix(copilot): improve device_type error message with tested types and…
2026-03-30 14:42:14 +08:00
YueGuobin 4cd74901a5 fix(copilot): improve device_type error message with tested types and config instructions
Add tested device types (cisco_ios_telnet, gns3_huawei_telnet_ce, gns3_ruijie_telnet)
to the error message and include Web UI configuration path.
2026-03-30 14:09:36 +08:00
YueGuobin d64e4e28e3 docs: add future optimization for per-compute node statistics 2026-03-30 00:23:35 +08:00
YueGuobin b379747aeb docs: add statistics API documentation
Document the extended /statistics endpoint with complete
response schema and field descriptions.
2026-03-30 00:09:09 +08:00
YueGuobin 33fdfd65ba feat(statistics): distinguish open vs closed project nodes
Closed project nodes don't have status info in topology JSON.
Add open_project_nodes and closed_project_nodes counts to
help clarify why by_status may be empty.
2026-03-30 00:06:50 +08:00
YueGuobin b4caffe13b fix(statistics): handle closed projects where nodes/links are dicts
Open projects store Node/Link objects, but closed projects store
dictionaries loaded from topology JSON. This fix checks the type
before accessing attributes.
2026-03-29 23:59:17 +08:00
YueGuobin 8b4c3a3517 feat(controller): extend /statistics API with project, node and link stats
Return aggregated statistics:
- computes: per-compute CPU/memory/disk stats (existing)
- projects: total, opened, closed counts
- nodes: total count with breakdown by type and status
- links: total count with capturing count
2026-03-29 23:49:36 +08:00
Jeremy Grossmann 3dbae9585c Merge pull request #2652 from GNS3/fix/2651
Use FastAPI Lifespan Events
2026-03-28 10:02:41 +08:00
grossmj 46f77eb7d5 Remove old add_event_handler 2026-03-28 09:59:29 +08:00
grossmj 01a68fb23a Use FastAPI Lifespan Events 2026-03-28 09:54:22 +08:00
Jeremy Grossmann 89d665f22b Merge pull request #2650 from yueguobin/feature/control-offset
feat(link): add control_offset field to LinkStyle
2026-03-28 08:08:10 +08:00
YueGuobin 7f9416a070 feat(link): add control_offset field to LinkStyle 2026-03-28 02:11:30 +08:00
grossmj b8764b29a5 Upgrade FastAPI to v0.135.2 2026-03-27 10:57:59 +08:00
Jeremy Grossmann 3b261ebbfc Merge pull request #2646 from yueguobin/feature/symbol-delete-api
feat(symbols): add DELETE API for removing custom symbol files
2026-03-27 10:51:51 +08:00
YueGuobin e651ad589b feat(symbols): add DELETE API for removing custom symbol files
- Add DELETE /v3/symbols/{symbol_id:path} endpoint
- Prevent deletion of built-in symbols (:/ prefix or in resource directory)
- Clear symbol size cache after deletion
- Require Symbol.Allocate privilege
2026-03-27 02:28:27 +08:00
Cristi 7f3468dcd3 Improved exception handling and telnet client disconnect 2026-03-24 15:23:00 +02:00
Cristi 83558d4d9f Enhancement: Re-write current Telnet server implementation using telnetlib3 library 2026-03-24 13:23:45 +02:00
Jeremy Grossmann 4701712a86 Merge pull request #2644 from GNS3/release/v2.2.57
Release v2.2.57
2026-03-24 10:10:22 +08:00
grossmj e5ff9e7f00 Development on 2.2.58.dev1 2026-03-24 08:35:49 +08:00
grossmj 7adb0c5226 Release v2.2.57 2026-03-23 09:45:46 +08:00
grossmj 667833dda5 Merge remote-tracking branch 'origin/master' into 2.2 2026-03-23 09:38:13 +08:00
grossmj 646ff00ade Sync appliances 2026-03-23 09:37:15 +08:00
Jeremy Grossmann 77bea35298 Merge pull request #2641 from cristian-ciobanu/3.0
Enhancement Added link type support on the server side
2026-03-20 13:15:03 +08:00
Jeremy Grossmann 53051dd481 Merge pull request #2631 from yueguobin/feature/ai-copilot-bridge
feature/ai-copilot-bridge Branch Summary
2026-03-20 13:05:50 +08:00
YueGuobin 77a38cef03 docs: clarify system scope - baseline config with tool handoff
Clarify the positioning of the template-based system:

Scope (0 → 1):
- Topology provisioning (nodes + links)
- Baseline configuration (IP, routing protocols)
- Management access setup (SSH/HTTPS/NETCONF)
- Basic security configuration

Handoff to Production Tools (1 → N):
- Terraform (Infrastructure as Code)
- REST API (modern device management)
- NETCONF/YANG (standardized configuration)
- Network Controllers (SDN, APIC, etc.)

This clarifies that:
1. The system focuses on rapid environment preparation
2. It complements rather than replaces production tools
3. It's ideal for labs, testing, training, and initial setup
4. Advanced config management is handled by specialized tools
2026-03-20 10:00:23 +08:00
YueGuobin 76c84798dc docs: refactor roadmap - reduce code, add comprehensive diagrams
Major documentation improvements:

Reduced Code Content (~60% reduction):
- Simplified Core Components section with concept-focused descriptions
- Condensed Large-Scale Topology section (kept concepts, removed implementation)
- Streamlined Node Creation Templates (kept workflows, removed tool code)
- Simplified Technical Considerations (kept diagrams, removed code)
- Streamlined Testing Strategy (kept test cases, removed test code)

Added Comprehensive Diagrams:
- System Architecture Overview (4-layer architecture)
- HITL State Transition Diagram (complete workflow with interrupts)
- REST API Endpoints (6 new endpoints with request/response formats)
- SSE Progress Stream (real-time event types)
- Data Flow Diagram (7-step process from user to results)
- Error Handling Flow (4 error types with recovery strategies)
- Template Lifecycle Management (5 stages from DRAFT to ARCHIVED)
- Automatic Layout Strategies (4 layout types with visual examples)
- Auto-Linking Strategies (4 link pattern types with diagrams)
- Security Considerations (3-layer validation approach)
- Error Categories (4 error types with recovery flows)
- Testing Strategy (unit, integration, E2E test scenarios)

Benefits:
- Easier to understand for non-technical stakeholders
- Focus on concepts and workflows rather than implementation
- Visual documentation aids comprehension
- Maintained all critical technical information
- Improved readability and structure
2026-03-20 09:54:58 +08:00
YueGuobin 382b2aefa9 docs: add link creation templates section to roadmap
Add comprehensive link creation templates documentation covering:
- Batch link creation workflow with HITL confirmations
- Link template schema with pattern-based connectivity
- Common topology patterns (Spine-Leaf, Ring, Mesh, Star, Three-tier)
- Intelligent port allocation strategies (round-robin, optimized)
- Performance benchmarks showing 99.9% token savings for large topologies
- Complete workflow example combining all three template systems
2026-03-20 09:44:03 +08:00
YueGuobin 3b4bc93e85 docs: add node creation templates section to roadmap
Added comprehensive node creation template system including:
- Batch node creation workflow (HITL with preview)
- Node template schema (groups, positioning, auto-linking)
- Automatic positioning algorithms (grid, spine-leaf, hierarchical)
- Auto-linking strategies (mesh, paired, linear)
- Batch parallel execution (20-50 concurrent)
- Performance benchmarks for 100-1000+ nodes
- Complete enterprise data center example (724 nodes, 4280 links)

Key benefits:
- 98% token savings for node creation (5000 → 100 tokens for 100 nodes)
- 90% time savings (10 min → 1 min for 100 nodes)
- Auto-linking eliminates manual connection setup
- Combined workflow: Create + configure 724 nodes in ~10 minutes

Updated implementation phases to include Phase 2.5 for node creation templates.
2026-03-20 09:35:45 +08:00
YueGuobin a627d45ca6 docs: add large-scale topology support (1000+ nodes) to roadmap
Added comprehensive section on large-scale topology support including:
- Direct execution mode (skip AI, use rule engine)
- Batch parallel execution (50-100 concurrent)
- Intelligent parameter generation (0 token cost)
- Real-time progress streaming
- Configuration summary generation
- Performance benchmarks for 1000+ nodes
- Multiple addressing schemes (sequential, VLAN-based, hierarchical)

Key benefits:
- 99.5% token savings for 1000 devices (150K → 400 tokens)
- 88% time savings (50 min → 3-5 min)
- Enables rapid provisioning of training labs, CI/CD testing, disaster recovery drills

Updated implementation phases to reflect large-scale support priorities.
2026-03-20 09:26:45 +08:00
YueGuobin 5c42a59413 docs: add template-based configuration roadmap with HITL workflow
Add comprehensive roadmap for implementing Jinja2 template-based
configuration with Human-in-the-Loop confirmations.

Key features:
- Three-step HITL workflow (Template → Parameters → Execute)
- 70-80% token savings for multi-device configurations
- Enhanced safety through human review at each step
- Template reusability across projects

Implementation plan:
- Phase 1: Core MVP (3-5 days)
- Phase 2: UX Enhancement (2-3 days)
- Phase 3: Template Library (2-3 days)
- Phase 4: Advanced Features (3-4 days)
2026-03-20 01:18:56 +08:00
YueGuobin 1378e3b5ec docs: add supported providers list and future enhancements
Add comprehensive documentation for LLM model providers:
- Provider list with default base URLs and requirements
- Examples for different providers (OpenAI, Anthropic, Ollama, Azure)
- Guidelines on when to specify base_url
- Future enhancements section for optional base_url field
2026-03-19 10:12:21 +08:00
YueGuobin 01d24403d3 feat: improve error handling for API configuration errors
Add error_handler utility to detect and format HTML error responses
from misconfigured API base URLs. When the API returns HTML (indicating
configuration issues), users now see a helpful message instead of raw
HTML content.
2026-03-19 00:46:49 +08:00
grossmj c5325fdee4 Install ai-copilot in testing.yml 2026-03-18 16:17:07 +08:00
grossmj 333386ac8b Use status.HTTP_501_NOT_IMPLEMENTED from FastAPI 2026-03-18 16:08:47 +08:00
YueGuobin cd1d28729a feat: make AI Copilot an optional dependency
This change makes AI Copilot features optional to reduce installation
size and support restricted environments.

Changes:
- Split AI dependencies into ai-requirements.txt
- Add ai-copilot optional dependency in pyproject.toml
- Add import protection in gns3server/agent/__init__.py
- Return 501 for AI endpoints when dependencies not installed
- Add gns3server-uninstall-ai-copilot command for cleanup
- Update README with installation and uninstallation instructions

Installation:
- Basic: pip install gns3-server
- With AI: pip install gns3-server[ai-copilot]
- Development: pip install gns3-server[ai-copilot,dev]

Uninstallation:
- gns3server-uninstall-ai-copilot
2026-03-18 15:21:23 +08:00
YueGuobin 0b741dd834 test: simplify class registration assertions in custom netmiko tests
Refactored test assertions for Huawei CE, Ruijie, and VPCS telnet drivers to compare only class names instead of full module paths. This change reduces test brittleness when classes are imported via different module paths while maintaining validation of correct class registration in CLASS_MAPPER and CLASS_MAPPER_BASE.
2026-03-17 22:45:02 +08:00
YueGuobin 55c7d249fb feat(tests): improve class comparison in custom netmiko tests
Refactor test assertions to compare classes by module and name instead of direct object comparison. This ensures tests remain reliable when classes are imported via different paths, preventing false failures due to import variations. Changes applied to Huawei CE, Ruijie, and VPCS telnet driver tests.
2026-03-17 22:33:28 +08:00
YueGuobin e1f25ce63b fix(tests): replace assertIs with assertEqual in custom netmiko tests
Changed test assertions from `assertIs` to `assertEqual` for class mapper comparisons in Huawei CE, Ruijie, and VPCS telnet driver tests. This ensures proper equality checking rather than identity checking, which is more appropriate for class comparisons in these test cases.
2026-03-17 22:06:53 +08:00
YueGuobin 2557614ba8 refactor(llm-configs):
remove unused reserved_jsonb fields

   Remove the three reserved JSONB fields (reserved_jsonb_1, reserved_jsonb_2, reserved_jsonb_3) from the llm_model_configs
   table. These fields were planned for future use but are no longer needed.
2026-03-17 21:43:48 +08:00
Cristi de1b539fb6 Enhancement Added link type support on the server side 2026-03-17 15:29:58 +02:00
YueGuobin a240620443 fix(custom_netmiko): use
assertIs instead of assertEqual for class comparison

   Fix test failures in custom Netmiko driver tests by using assertIs instead
   of assertEqual when comparing class objects registered in CLASS_MAPPER.

   The issue occurred because test files add project root to sys.path, allowing
   the same module to be imported with different paths (e.g., gns3_copilot...
   vs gns3server.agent.gns3_copilot...). assertEqual compares class __module__
   attributes which differ based on import path, while assertIs checks object
   identity which correctly identifies them as the same class.

   Modified files:
   - test_huawei_ce.py
   - test_ruijie_telnet.py
   - test_vpcs_telnet.py
2026-03-17 21:24:39 +08:00
YueGuobin bd06d3a08e feat(vpcs_tools_netmiko): update Nornir import to use core module
Update the import statement for Nornir from `nornir.core.nornir` to `nornir.core` to align with the latest Nornir library structure and avoid potential import errors. This ensures compatibility with updated Nornir versions.
2026-03-17 21:16:15 +08:00
YueGuobin a2a52c8a7d feat(vpcs_tools_netmiko): import Nornir class for type hints
Add import of Nornir class from nornir.core.nornir to support type annotations and improve code clarity in the VPCS tools module.
2026-03-17 16:31:44 +08:00
Jeremy Grossmann 8f325b4127 Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-17 13:41:21 +08:00
grossmj cb18b60c5d Ignore HTTPException received when closing a project 2026-03-17 13:23:19 +08:00
Jeremy Grossmann 0d1341b4e0 Merge pull request #2640 from UmmmAGoodName/Dymamips_fix-3.0
Fixed issue #1605 regarding Cisco slots causing configs to break
2026-03-17 12:54:45 +08:00
grossmj 4f863f3767 Fix typo 2026-03-17 12:51:36 +08:00
grossmj 0aa6566e50 Prevent router to be duplicated when running and add tests 2026-03-17 12:49:38 +08:00
UmmmAGoodName 95bd76a212 Fixed issue #1605 regarding Cisco slots causing configs to break 2026-03-16 19:09:32 +01:00
YueGuobinandClaude Sonnet 4.5 a2c1a913ca docs: add VNC WebSocket console documentation
Add comprehensive documentation for VNC WebSocket console support in GNS3.

Topics covered:
- Architecture and connection flow
- API endpoints (Controller and Compute)
- WebSocket data forwarding implementation
- Supported node types (QEMU and Docker)
- Authentication and authorization
- Configuration examples
- Troubleshooting guide
- Performance considerations
- Security best practices
- Comparison with SPICE

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-17 01:28:52 +08:00
YueGuobinandClaude Sonnet 4.5 64d3c02d42 refactor(compute): remove SPICE WebSocket console support
Remove all SPICE WebSocket-related code due to frontend dependency issues
with spice-html5 library (missing RSAKey/BigInteger implementations).

Changes:
- Remove start_spice_websocket_console() from BaseNode
- Remove SPICE WebSocket endpoints from QEMU and Docker compute APIs
- Remove SPICE WebSocket proxy endpoint from controller API
- Remove WebSocket subprotocol handling from authentication layers
- Remove SPICE documentation

The SPICE console type remains functional for direct connections,
but WebSocket proxy support has been removed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-17 01:15:26 +08:00
YueGuobin c98f802362 feat(compute): add SPICE WebSocket console support
Add WebSocket-based console support for SPICE protocol, enabling
   browser-based graphical console access with enhanced features
   like clipboard sharing, USB redirection, and audio streaming.

   Changes:
   - Add start_spice_websocket_console() method in BaseNode for SPICE
     WebSocket to TCP bridging with bidirectional binary forwarding
   - Add /console/spice WebSocket endpoints in QEMU and Docker compute APIs
   - Add /console/spice WebSocket proxy endpoint in controller API
   - Add comprehensive API documentation in docs/features/

   Supported console types:
   - spice: Basic SPICE protocol support
   - spice+agent: SPICE with spice-vdagent for enhanced features

   Architecture:
   - Browser WebSocket → Controller (JWT + RBAC) → Compute (Basic Auth)
   - No external websockify processes required
   - Consistent with existing VNC WebSocket implementation
2026-03-16 22:21:25 +08:00
YueGuobinandClaude Sonnet 4.5 ba92b405da feat: add VNC WebSocket console support for Docker and QEMU nodes
Add VNC console WebSocket endpoints for Docker and QEMU nodes:
- Add /console/vnc WebSocket endpoint to compute API (Docker & QEMU)
- Add /console/vnc WebSocket endpoint to controller API
- Implement start_vnc_websocket_console() in BaseNode
- Forward VNC WebSocket traffic between controller and compute layers

The implementation provides bidirectional WebSocket to TCP forwarding
for VNC protocol (RFB) connections, allowing browser-based VNC console
access to containers and VMs.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-16 16:40:00 +08:00
Guobin Yue 09aa12cf94 Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-15 23:13:15 +08:00
YueGuobin ffcfa4ccb1 feat(telnet_server): improve error handling and connection management
- Catch OSError alongside ConnectionError in connection processing to handle more network errors
- Move client_info retrieval inside try block to prevent AttributeError on failed connections
- Replace bare except with specific exceptions (OSError, ConnectionError, asyncio.TimeoutError)
- Improve error logging to include specific exception details and client information
2026-03-15 23:07:06 +08:00
Jeremy Grossmann 6ac4c27bc1 Merge pull request #2639 from yueguobin/fix/telnet-server-connection-race-condition-3.0
Fix/telnet server connection race condition 3.0
2026-03-15 23:01:57 +08:00
Jeremy Grossmann 632b3daab7 Merge pull request #2635 from yueguobin/fix/iou-suspend-405
fix(iou): return 405 error for unsupported suspend operation
2026-03-15 22:47:42 +08:00
grossmj 6e7738a14f Return 405 error for unsupported actions for other node types 2026-03-15 22:38:51 +08:00
YueGuobin b71b323fd4 feat(agent): improve tiktoken initialization and device registration
- Configure tiktoken cache directory to isolate encoding files
- Add logging and timing for tiktoken initialization process
- Make Huawei CE and Ruijie Telnet device registration idempotent
- Add duplicate registration prevention with global flags
- Add logging for device type registration status
- Update .gitignore to exclude tiktoken cache files
2026-03-15 21:25:14 +08:00
YueGuobin 9a01e2194e chore: remove telnet race condition test files and documentation
Remove the bug report documentation and stress test files for the telnet server connection race condition issue.
2026-03-15 13:40:34 +08:00
YueGuobin 4f8daced17 Merge branch 'fix/telnet-server-connection-race-condition-3.0' into feature/ai-copilot-bridge 2026-03-15 13:38:40 +08:00
Guobin Yue 08b579ff83 Merge branch '3.0' into fix/telnet-server-connection-race-condition-3.0 2026-03-15 01:17:30 +08:00
Guobin Yue 9aa3f3b7a0 Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-15 00:37:17 +08:00
YueGuobin 1aced27dc1 feat(docs): add telnet server connection race condition bug report
Add detailed bug report documenting a race condition in the telnet server's broadcast logic. The bug occurs when a client disconnects while the server is iterating through connections to broadcast data, causing an uncaught OSError from getpeername() call.

Key details included:
- Error logs showing OSError: [Errno 107] Transport endpoint is not connected
- Architecture diagram illustrating the telnet proxy server setup
- Root cause analysis showing the race condition timeline
- Problematic code location in telnet_server.py line 305
- Exception hierarchy explanation showing why OSError isn't caught
- Impact assessment and proposed solutions

This documentation will help track and resolve the issue where client disconnections during broadcast cause unhandled exceptions.
2026-03-15 00:19:51 +08:00
YueGuobin cda5fdd94b feat(telnet_server): improve error handling and connection management
- Catch OSError alongside ConnectionError in connection processing to handle more network errors
- Move client_info retrieval inside try block to prevent AttributeError on failed connections
- Replace bare except with specific exceptions (OSError, ConnectionError, asyncio.TimeoutError)
- Improve error logging to include specific exception details and client information
2026-03-15 00:19:51 +08:00
YueGuobin e4faf673af fix(telnet): handle connection race condition during broadcast
Fixes two critical issues in telnet server when clients rapidly
   connect/disconnect during broadcast operations:

   1. **OSError [Errno 107]**: Transport endpoint not connected
      - Root cause: getpeername() called outside try block
      - Fix: Move getpeername() inside try block and catch OSError
      - Expand exception handling to include OSError and TimeoutError

   2. **KeyError**: Double deletion from connections dictionary
      - Root cause: Connection deleted in broadcast loop, then deleted
        again in top-level exception handler
      - Fix: Use dict.pop(key, None) instead of del dict[key]

   **Changes**:
   - Line 216: Add OSError to top-level exception handler
   - Line 227-228: Use pop() to avoid KeyError on double deletion
   - Line 305-316: Move getpeername() inside try block, expand
     exception types, use pop() for safe deletion

   **Impact**:
   - Prevents unhandled exceptions from propagating to asyncio event loop
   - Ensures proper resource cleanup even with race conditions
   - No resource leaks or zombie connections
   - Long-lived clients unaffected by rapid client disconnects

   **Test Script**:
   - Added stress test script to reproduce the issue
   - Supports IOU-L3, VPCS, and generic device types
   - Rapid clients send broadcast-triggering commands (show/run/OSPF)

   **Related**: Fixes bug documented in docs/bugs/telnet-server-connection-race-condition.md
2026-03-15 00:19:51 +08:00
Jeremy Grossmann ad784fbf6f Merge pull request #2637 from UmmmAGoodName/3.0
Minor improvements
2026-03-14 19:10:51 +08:00
Jeremy Grossmann c6be1a28ae Change first() to one_or_none() for image query 2026-03-14 19:06:27 +08:00
YueGuobin 02b20e4ff3 feat(docs): add telnet server connection race condition bug report
Add detailed bug report documenting a race condition in the telnet server's broadcast logic. The bug occurs when a client disconnects while the server is iterating through connections to broadcast data, causing an uncaught OSError from getpeername() call.

Key details included:
- Error logs showing OSError: [Errno 107] Transport endpoint is not connected
- Architecture diagram illustrating the telnet proxy server setup
- Root cause analysis showing the race condition timeline
- Problematic code location in telnet_server.py line 305
- Exception hierarchy explanation showing why OSError isn't caught
- Impact assessment and proposed solutions

This documentation will help track and resolve the issue where client disconnections during broadcast cause unhandled exceptions.
2026-03-14 15:47:36 +08:00
YueGuobin c3b18f4ce2 feat(copilot): add dynamic wait time calculation for node startup
Optimize GNS3StartNodeTool with device-type-aware wait time calculation
   to significantly reduce startup time for fast devices (VPCS, IOU).

   Changes:
   - Add NODE_STARTUP_TIME configuration
     * VPCS: 15s base + 2s per additional node
     * IOU: 25s base + 3s per additional node
     * Other devices: 120s base + 10s per additional node (conservative)

   - Add calculate_startup_time() function
     * Detects device types via node.node_type
     * Uses fast startup time if all nodes are VPCS/IOU
     * Uses conservative time if any slow device present
     * Logs selected strategy and detected types

   - Optimize GNS3StartNodeTool._run() method
     * Retrieve node info (including node_type) before starting
     * Calculate wait time based on detected device types
     * Send start commands after info retrieval
     * Use calculated wait time for progress bar
     * Reuse collected node objects for status retrieval

   Performance improvements:
   - 1 VPCS node: 140s → 15s (89% faster)
   - 5 VPCS nodes: 180s → 23s (87% faster)
   - 1 IOU node: 140s → 25s (82% faster)
   - 5 IOU nodes: 180s → 37s (79% faster)
   - Mixed VPCS/IOU: 180s → 33s (82% faster)

   Documentation:
   - Update node-control-tools.md with dynamic wait time strategy
   - Add device type comparison table
   - Document performance improvements
   - Update changelog

   Code quality:
   - All comments in English
   - flake8 check passed
   - mypy check passed
2026-03-14 15:24:27 +08:00
YueGuobin a946ef2d69 eat(copilot): add dynamic wait time calculation for node startup
Optimize GNS3StartNodeTool with device-type-aware wait time calculation
   to significantly reduce startup time for fast devices (VPCS, IOU).

   Changes:
   - Add NODE_STARTUP_TIME configuration
     * VPCS: 10s base + 2s per additional node
     * IOU: 20s base + 3s per additional node
     * Other devices: 120s base + 10s per additional node (conservative)

   - Add calculate_startup_time() function
     * Detects device types via node.node_type
     * Uses fast startup time if all nodes are VPCS/IOU
     * Uses conservative time if any slow device present
     * Logs selected strategy and detected types

   - Optimize GNS3StartNodeTool._run() method
     * Retrieve node info (including node_type) before starting
     * Calculate wait time based on detected device types
     * Send start commands after info retrieval
     * Use calculated wait time for progress bar
     * Reuse collected node objects for status retrieval

   Performance improvements:
   - 1 VPCS node: 140s → 10s (93% faster)
   - 5 VPCS nodes: 180s → 18s (90% faster)
   - 1 IOU node: 140s → 20s (86% faster)
   - 5 IOU nodes: 180s → 32s (82% faster)
   - Mixed VPCS/IOU: 180s → 28s (84% faster)

   Documentation:
   - Update node-control-tools.md with dynamic wait time strategy
   - Add device type comparison table
   - Document performance improvements
   - Update changelog

   Code quality:
   - All comments in English
   - flake8 check passed
   - mypy check passed
2026-03-14 15:14:28 +08:00
YueGuobin df8338401e feat(copilot): filter built-in utility templates from GNS3TemplateTool
Add filtering logic to exclude built-in utility templates that are not
   useful for network device configuration, making AI focus on actual network
   devices.

   - Add FILTERED_TEMPLATES constant with 6 utility template types
     * atm_switch - ATM switch
     * cloud - Cloud
     * ethernet_hub - Ethernet hub
     * ethernet_switch - Ethernet switch (built-in)
     * frame_relay_switch - Frame Relay switch
     * nat - NAT device

   - Add should_filter_template() function
     * Exact match on template_type field
     * Simple and reliable filtering logic

   - Update GNS3TemplateTool
     * Apply filtering in _run() method
     * Log filtered count for transparency
     * Update tool description

   - Update documentation (node-control-tools.md)
     * Document filtered template types
     * List retained template types
     * Add changelog entry

   - Code quality
     * All comments in English
     * flake8 check passed
     * mypy check passed
2026-03-14 14:54:12 +08:00
YueGuobin e2e2e23cf7 feat(copilot): add VPCS Telnet driver with Netmiko and ANSI code stripping
Implement custom VPCS driver and unified tool architecture:

   - Add VPCSTelnet custom driver (vpcs_telnet.py)
     - No authentication (direct console access like VPCS behavior)
     - Simple prompt pattern matching (PC\d+>)
     - Automatic ANSI escape code stripping for clean output
     - Config mode methods return empty (VPCS has no config modes)

   - Replace vpcs_tools_telnetlib3.py with vpcs_tools_netmiko.py
     - Migrate from telnetlib3 to Netmiko + Nornir architecture
     - Unified tool architecture matching config/display tools
     - Improved code consistency and maintainability

   - Add comprehensive test coverage (test_vpcs_telnet.py)
     - 30 unit tests covering all VPCS driver functionality
     - Tests for ANSI code stripping, telnet_login, send_command
     - Tests for device registration and initialization

   - Update VPCS built-in template (services/templates.py)
     - Add platform:vpcs and device_type:gns3_vpcs_telnet tags
     - Automatic driver selection without manual configuration

   - Update documentation (docs/)
     - multi-vendor-device-support.md: VPCS driver documentation
     - netmiko_devices.md: Add VPCS to supported devices list
     - README.md: Update multi-vendor support description
2026-03-14 14:25:37 +08:00
YueGuobin bbe57f34b9 feat(llm): hide api_key from all API responses and document max_tokens as reserved
Security Enhancement:
   - API keys are now always filtered to null in all LLM config API responses
   - Created LLMModelConfigDataWithoutSecret schema for response validation
   - Added _filter_api_key_from_config() helper in API routes
   - Modified repository to always hide api_key in get_user_effective_configs()
   - Update/create operations still accept and store api_key securely

   Documentation Updates:
   - Updated API key visibility section to reflect new security policy
   - Updated all response examples to show api_key as null
   - Marked max_tokens field as reserved for future use
   - Added "Reserved Fields" section explaining unused fields

   This defense-in-depth approach prevents API keys from being leaked through
   logs, browser devtools, or network monitoring.
2026-03-14 13:12:22 +08:00
YueGuobin a58089cf48 fix(copilot): add exit command warning to prevent session disconnection
Add warnings about 'exit' command in three locations to prevent AI from
   disconnecting Telnet/SSH sessions during command execution:

   - Prompt system rules (lab_automation_assistant_prompt.py)
   - Display tool description (display_tools_nornir.py)
   - Config tool description (config_tools_nornir.py)

   The 'exit' command disconnects the session and causes all subsequent
   commands in the batch to fail. This prevents users from viewing
   command outputs properly.
2026-03-14 00:34:06 +08:00
YueGuobin c76982b29e refactor(copilot): rename Huawei CE driver and add Ruijie tests with format fixes
- Rename huawei_telnet_ce to gns3_huawei_telnet_ce for consistent naming
   - Add comprehensive test suite for RuijieTelnetEnhanced driver (10 tests)
   - Update list_netmiko_telnet_devices.py to include gns3_ruijie_telnet
   - Fix all flake8 format issues (line length, unused imports, variables)
   - Update documentation to reflect device type rename
2026-03-14 00:08:13 +08:00
YueGuobinandClaude Sonnet 4.5 6e88582ff1 docs(gns3-copilot): update documentation for Ruijie driver and new features
- Add gns3_ruijie_telnet to supported devices in netmiko_devices.md
- Document custom RuijieTelnetEnhanced driver with hybrid strategy
  - Preprocessing: auto-insert 'yes' after known interactive commands
  - Fast path: batch send (2-3s for 13 commands)
  - Fallback: one-by-one with real-time prompt detection
- Add AAA/password configuration prohibition documentation
  - System-level enforcement in lab_automation_assistant_prompt
  - Categories: AAA, login passwords, console/VTY auth, encryption
- Document multi-line command handling for banner and similar commands
- Update device_type tag validation with error feedback
- Update multi-vendor support to include Ruijie platform

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-13 23:56:57 +08:00
YueGuobin 4f4ddb6504 feat(ruijie-telnet): enhance interactive command handling with hybrid strategy
Add pre-processing of known interactive commands and implement hybrid send strategy for Ruijie Telnet devices. The new approach:
- Pre-processes configuration commands to automatically insert 'yes' responses after known interactive commands (router-id, erase, delete, format, reload, boot system)
- Implements hybrid strategy: first attempts fast batch send with pre-processed commands, then falls back to one-by-one send with real-time prompt detection if batch fails
- Maintains backward compatibility while improving reliability for interactive configuration scenarios

This improves configuration reliability for Ruijie devices that frequently require confirmation prompts during configuration changes.
2026-03-13 23:51:12 +08:00
YueGuobin ad771e2927 feat: add Ruijie telnet driver support to custom Netmiko tools
- Import and register Ruijie telnet device type in config_tools_nornir.py
- Import and register Ruijie telnet device type in display_tools_nornir.py
- Update custom_netmiko __init__.py to include RuijieTelnetEnhanced driver
- Add Ruijie telnet driver to __all__ exports for proper module exposure
- Extends custom Netmiko support to handle Ruijie devices with interactive prompt handling
2026-03-13 23:33:14 +08:00
YueGuobin 8d9fce1c12 feat(agent): enhance configuration safety and multiline command handling
- Add explicit AAA/password configuration prohibition to safety reminders
- Implement multiline command expansion for banner and similar commands
- Add error handling for devices with missing device_type tags
- Improve logging for configuration errors and multiline expansions
2026-03-13 22:24:36 +08:00
YueGuobin 364ff93783 efactor(copilot): adopt Nornir best
practice for multi-vendor device support

   Refactor Nornir configuration to use host-level connection_options
   instead of dynamic groups, following Nornir's configuration priority
   model (host > group > defaults).

   **Problem:**
   Previous implementation used first device's configuration for all
   devices, causing Cisco devices to use Huawei driver and vice versa.

   **Solution:**
   - Each host now has device-specific connection_options at host level
   - Single generic "network_devices" group for shared settings
   - Host-level config automatically overrides group-level config

   **Changes:**
   - Remove: _get_nornir_groups_config() helper function
   - Remove: _get_nornir_group() helper function
   - Simplify: _initialize_nornir() to use single generic group
   - Update: get_gns3_device_port.py() to return host-level config
   - Reserve: platform field for future NAPALM/scrapli plugin support

   **Benefits:**
   - Cleaner code structure (no dynamic group creation)
   - Follows Nornir best practice ("configuration proximity")
   - Easy to extend with new device types
   - Properly handles mixed-vendor topologies
2026-03-13 09:32:18 +08:00
YueGuobin 44f802ae4f fix: update netmiko platforms after custom device registration
Netmiko's `ssh_dispatcher` calculates platform lists at module import
time. When custom device types (like Huawei CE) are registered
dynamically, these cached lists become stale and do not include the
new platforms.

This change imports `netmiko.ssh_dispatcher` and recalculates the
`platforms`, `platforms_base`, and `telnet_platforms` attributes to
ensure Netmiko recognizes the custom device types.
2026-03-12 23:38:24 +08:00
YueGuobin effea3fb26 feat(copilot): add Netmiko device list generator and simplify Huawei driver
- Add script to generate Markdown documentation of all Netmiko supported
     devices (SSH and Telnet), grouped by platform with source attribution
   - Highlight custom GNS3-Copilot devices with "Custom ✨" marker
   - Auto-generate device list to docs/gns3-copilot/netmiko_devices.md
   - Simplify HuaweiTelnetCE driver: remove redundant aliases
     (huawei_ce, huawei_telnet_ce_telnet), keep only huawei_telnet_ce
   - Update tests to match simplified device registration
2026-03-12 23:03:19 +08:00
YueGuobin 50fa4f6e2a refactor(huawei_ce): disable mypy and refactor driver
Disable mypy type checking for the Huawei CE driver module due to
Netmiko library limitations. Netmiko lacks type stubs (py.typed) and
uses dynamic attributes, which causes unresolved import and attribute
errors in static analysis.

Added a comprehensive comment block at the top of the file explaining
the rationale for disabling mypy to prevent future confusion.

Additionally, performed code cleanup including:
- Reformatted module docstrings and comments for better readability
- Added missing imports (importlib, logging)
- Removed unused typing imports (Optional)
- Refactored variable assignments in send_config_set for clarity
2026-03-12 22:38:21 +08:00
Mr.GIitch 302878b391 Merge branch 'GNS3:3.0' into 3.0 2026-03-12 14:44:43 +01:00
YueGuobin db164e9d41 feat(copilot): add multi-vendor device support with custom Huawei driver
Add comprehensive multi-vendor support for GNS3 network automation,
   including a custom Netmiko driver for Huawei CloudEngine devices.

   Features:
   - Custom HuaweiTelnetCE driver for GNS3 emulation (no authentication)
   - Auto-commit before exit to prevent [Y/N/C] prompts
   - Dynamic device type detection from GNS3 node tags
   - Support for both Cisco IOS and Huawei devices
   - Proper VRP command handling (system-view, return confirmation)

   Implementation:
   - New package: utils/custom_netmiko/
     - huawei_ce.py: Huawei CloudEngine driver
     - tests/test_huawei_ce.py: Unit tests (9/9 passing)
     - README.md: Driver development guide
   - Updated tools for multi-vendor support:
     - display_tools_nornir.py: Dynamic group generation
     - config_tools_nornir.py: Multi-vendor config commands
     - get_gns3_device_port.py: Device port extraction
   - Documentation: multi-vendor-device-support.md

   Limitations:
   - huawei_telnet_ce driver requires devices without authentication
   - For devices with username/password, use standard huawei_telnet driver

   Co-Authored-By: Yue Guobin <yueguobin@outlook.com>"
2026-03-12 16:44:32 +08:00
Guobin Yue ab88bcd57e Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-12 16:12:13 +08:00
grossmj 3abecc8492 Fix IOU tests 2026-03-12 14:18:35 +08:00
grossmj 27ce1a4e25 Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	gns3server/schemas/iou_template.py
#	tests/handlers/api/compute/test_iou.py
#	tests/handlers/api/controller/test_template.py
2026-03-12 14:11:05 +08:00
Jeremy Grossmann 5c63928636 Merge pull request #2634 from GNS3/update-iol-ram-nvram
Deactivate 'use default IOU values' by default and update RAM/NVRAM values
2026-03-12 13:53:04 +08:00
grossmj f41cc24383 Fix for duplicating Qemu nodes 2026-03-12 13:24:30 +08:00
Jeremy Grossmann 9aca6aece3 Merge pull request #2636 from yueguobin/fix/acl-endpoint-paths
fix(acl): correct endpoint paths for users, groups, and roles
2026-03-12 12:31:59 +08:00
UmmmAGoodName afeb6a3196 Minor optimizations to logic 2026-03-11 18:51:32 +01:00
UmmmAGoodName 99e3529c93 Fixed an issue with the server causing errors when uploading large images + Preparation for a smarter check when uploading images 2026-03-11 18:50:43 +01:00
UmmmAGoodName 19503ab4f7 Implementet a smarter node_type system 2026-03-11 18:49:36 +01:00
UmmmAGoodName 4a45a68703 Changed errors to new type, was causing warnings 2026-03-11 18:48:36 +01:00
YueGuobin 75a4585c20 docs: restructure copilot docs and update node tools
Simplify the documentation structure in `README.md` by removing the
`todo/` directory reference and detailed design documents for planned
features. Consolidate future roadmap items into a high-level summary
under "Future Enhancements".

Update `node-control-tools.md` to include documentation for new topology
management tools (create node, create link, get template, rename node)
and reflect updated API imports for `Link` support.
2026-03-12 00:23:00 +08:00
Guobin Yue 085a485503 Merge branch '3.0' into fix/acl-endpoint-paths 2026-03-11 23:34:18 +08:00
YueGuobin f2fd725e07 fix(acl): correct endpoint paths for users, groups, and roles
Fix the path mismatch between /acl/endpoints API and actual routes:
- Users: /users/{id} → /access/users/{id}
- Groups: /groups/{id} → /access/groups/{id}
- Roles: /roles/{id} → /access/roles/{id}

This fixes the error where creating ACE entries fails with:
"Path '/groups/{id}' doesn't match any existing endpoint"

The actual routes are registered under /access/ prefix, but the
endpoints API was returning paths without the prefix.

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-11 23:23:52 +08:00
YueGuobin 5155e10214 feat(deps): update langchain ecosystem and add langsmith SDK
- Upgrade langchain packages to latest versions (langchain 1.2.10, langgraph 1.0.9, etc.)
- Add langsmith SDK for enhanced observability and tracing
- Update Pillow to 12.1.1 for image processing improvements
- Maintain compatibility with existing AI and automation framework
2026-03-11 22:18:31 +08:00
YueGuobin e82bce9e16 feat(docs): add TOSCA-based topology description proposal
Add comprehensive documentation proposing TOSCA (Topology and Orchestration Specification for Cloud Applications) as the standard format for GNS3 network topologies. The document outlines strategic benefits including standardized YAML descriptions, toolchain ecosystem integration, Git-based workflows, and template reuse capabilities. This initiative aims to modernize GNS3 topology management, improve user experience, and align with industry best practices for network automation and orchestration.
2026-03-11 22:13:23 +08:00
YueGuobinandClaude Sonnet 4.5 0056bdd19b fix(iou): return 405 error for unsupported suspend operation
Fixed IOU node suspend API to return proper HTTP 405 Method Not Allowed
error instead of misleading 204 No Content response.

Changes:
- Added HTTPException import to iou_nodes.py
- Fixed suspend_iou_node route from /stop to /suspend (bug fix)
- Changed response from 204 No Content to 405 Method Not Allowed
- Added clear error message: "Suspend is not supported for IOU nodes"

This fix ensures clients receive explicit feedback when attempting to
suspend IOU nodes, which do not support suspend functionality.

Related issue: IOU nodes previously returned 404 when suspend was called
due to incorrect route registration.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 15:14:23 +08:00
YueGuobin ad3621db0f feat(gns3-copilot): add node stop and suspend tools for lab automation
- Add GNS3StopNodeTool and GNS3SuspendNodeTool to lab automation assistant mode
- Update tools_v2 __init__.py to export new node control tools
- Document node control tools in README with key features and implementation status
- Update last modified date in documentation

The new tools provide complete node lifecycle control for automated lab workflows, including stopping nodes for shutdown and suspending nodes while preserving state.
2026-03-11 14:44:51 +08:00
YueGuobin 1cd4aeb2a2 feat(schemas): simplify LLM model config descriptions
- Remove redundant "(REQUIRED)" and detailed explanations from context_limit field descriptions
- Shorten copilot_mode descriptions by removing parenthetical details about mode capabilities
- Maintain field formatting consistency across LLMModelConfigData, Create, and Update schemas
2026-03-11 10:17:06 +08:00
YueGuobin 10a827f0c5 feat(api): enhance max_tokens field with robust null handling
- Update LLMModelConfigUpdate schema to accept Union[int, str] for max_tokens
- Add field validator to gracefully handle various null representations:
  - Convert string "null" to null
  - Convert empty strings to null
  - Convert numeric strings to integers
  - Accept proper JSON null values
- Update documentation to reflect new behavior and explain robust null handling
- Prevents validation errors from incorrect null serialization by clients
2026-03-11 10:14:06 +08:00
YueGuobinandClaude Sonnet 4.5 e452f75ac3 docs: reorganize AI Copilot documentation structure
- Add README.md with documentation overview and structure guide
- Move implemented designs to docs/gns3-copilot/implemented/:
  - chat-api.md (from ai-chat-api-design.md)
  - llm-model-configs.md (from llm-model-configs-api.md)
  - command-security.md
  - context-window-management.md
- Add Jinja2 configuration template system design documents:
  - jinja2-config-templates-system.md
  - config-templates-implementation-guide.md
  - ai-prompting-for-config-templates.md
- Remove obsolete documents (acl-web-ui, Chinese RBAC doc)

This reorganization makes it clearer which features are implemented
vs planned, following the established documentation structure.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-10 23:20:24 +08:00
YueGuobin a6c33061c4 delete doc 2026-03-10 22:51:57 +08:00
YueGuobin 578f79cd6b feat(docs): add AI prompting guide for configuration templates
Add comprehensive documentation for AI prompting to generate structured configuration data for Jinja2 templates. The guide includes:

- Core system prompt with critical rules for structured data generation
- Supported vendors and OS types (Cisco, Juniper, Huawei, Arista, Mikrotik)
- Detailed schemas for network features including OSPF, BGP, VLANs, ACLs, and more
- Example prompts and expected structured outputs
- Integration with the configuration renderer system

This documentation ensures AI-generated configurations follow the required structured format for proper template rendering, preventing direct configuration text generation and maintaining consistency across different network device vendors.
2026-03-10 22:38:41 +08:00
grossmj 0624c1b945 Deactivate 'use default IOU values' by default and update RAM/NVRAM values 2026-03-10 20:28:00 +08:00
YueGuobin 2dcdadf5fa docs: add mypy type checking issues todo document
Add comprehensive documentation for mypy static type checking
issues found in gns3_copilot module.

Document includes:
- 35 type errors across 9 files
- Detailed error descriptions and line numbers
- 3-phase fix strategy (High/Medium/Low priority)
- Mypy configuration recommendations
- Resource links for type hints and mypy

Related files:
- chat_sessions_repository.py (8 errors)
- context_manager.py (5 errors)
- agent_service.py (5 errors)
- gns3_topology_reader.py (2 errors)
- message_converters.py (1 error)
- connector_factory.py (1 error)

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-10 01:20:42 +08:00
YueGuobin 71802a8064 style: remove unused List import from llm_model_configs.py
Remove unused typing.List import flagged by ruff F401.

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-10 01:11:37 +08:00
YueGuobin 5e9ec23a45 style: remove unused imports and fix E712 comparisons in llm_model_configs.py
Remove 5 unused imports flagged by ruff F401:
- sqlalchemy.func, sqlalchemy.or_
- sqlalchemy.ext.asyncio.AsyncSession
- sqlalchemy.orm.selectinload
- json

Fix 4 E712 errors - avoid equality comparisons to True:
- Use models.LLMModelConfig.is_default instead of == True

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-10 01:10:19 +08:00
YueGuobin 7d031a6802 style: remove unused imports and variables in project.py
Remove unused import and exception variable flagged by ruff:
- Remove unused 'sys' import (F401)
- Remove unused exception variable 'e' in except clause (F841)

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-10 01:08:20 +08:00
YueGuobin c0aec3f979 style: remove unused imports from llm_model_configs.py
Remove 3 unused imports that were flagged by ruff F401:
- fastapi.Response
- fastapi.security.OAuth2PasswordRequestForm
- gns3server.controller.controller_error.ControllerError

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-10 01:07:23 +08:00
YueGuobin 7c3b832bca style: fix E501 line-too-long errors in gns3_copilot
Fix all 423 E501 line length violations across 26 files to comply with
   PEP 8 88-character line limit.

   Changes:
   - Split long f-strings across multiple lines
   - Break long docstring descriptions and parameter lists
   - Split markdown table rows and list examples
   - Break long URL construction f-strings
   - Split long logger messages and comments
   - Add noqa: E501 for SVG strings (cannot be split)

   Modified files:
   - agent/: context_manager.py, gns3_copilot.py, model_factory.py
   - gns3_client/: connector_factory.py, context_helpers.py, custom_gns3fy.py,
                   gns3_project_info.py, gns3_topology_reader.py
   - prompts/: __init__.py, lab_automation_assistant_prompt.py,
               prompt_loader.py, teaching_assistant_prompt.py
   - tools_v2/: __init__.py, config_tools_nornir.py, display_tools_nornir.py,
                gns3_create_link.py, gns3_create_node.py, gns3_get_node_temp.py,
                gns3_start_node.py, gns3_update_node_name.py,
                vpcs_tools_telnetlib3.py
   - utils/: __init__.py, command_filter.py, get_gns3_device_port.py,
             gns3_drawing_utils.py, llm_config_helper.py, message_converters.py,
             parse_tool_content.py, tool_call_stream.py

   All files now pass ruff E501 checks.

   Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-10 01:05:17 +08:00
Guobin Yue 25f2d1b56b Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-09 21:50:37 +08:00
YueGuobin 7c2083d227 feat: update .gitignore to track project context and development docs
- Add exception for .claude/development.md to allow tracking development documentation
- Comment out PROJECT_CONTEXT.md exclusion to enable version control of project context file
- Create PROJECT_CONTEXT.md with comprehensive project overview for AI assistant support
- Document project structure, AI copilot data flow, SSE event types, and code standards
- Provide flake8 static analysis guidelines and common error fixes
2026-03-09 21:46:58 +08:00
grossmj 69eafda777 Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2026-03-09 17:12:24 +08:00
grossmj b658f7ff68 Make sure the node shows as stopped when the wrap console cannot be stopped. Ref https://github.com/GNS3/gns3-registry/pull/1010 2026-03-09 17:10:00 +08:00
YueGuobin b936a52f6f docs: add LangGraph Agent and tool output serialization documentation
Added new section in ai-chat-api-design.md explaining:

- LangGraph Agent architecture and main components
- tool_node function and tool output serialization mechanism
- Why serialization happens in tool_node (not agent_service)
- Tool output data flow diagram showing SSE and history paths
- Explanation of JSON format consistency across streaming and storage

This documentation clarifies the fix for single-quotes issue in
conversation history and helps future maintenance.

Co-Authored-By: YueGuobin <yueguobin@outlook.com>
2026-03-09 15:54:44 +08:00
YueGuobin 9b85417a82 fix(copilot): serialize tool output to JSON in ToolMessage for history
Fixed tool output serialization in tool_node function to ensure
ToolMessage.content is always in JSON format, not Python str() representation.

This fixes the issue where conversation history showed tool outputs
with single quotes (Python format) instead of standard JSON.

Changes:
- Added json import to gns3_copilot.py
- Modified tool_node() to serialize observation to JSON before creating ToolMessage
- Ensures both SSE streaming and history storage use consistent JSON format

Root cause: ToolMessage was created with raw dict/list objects, which
LangChain converted to Python str() representation when saving to history.

Co-Authored-By: YueGuobin <yueguobin@outlook.com>
2026-03-09 15:50:36 +08:00
YueGuobin 8babaccd80 feat: add PROJECT_CONTEXT.md to gitignore
Add PROJECT_CONTEXT.md to the .gitignore file to prevent it from being tracked in version control. This file likely contains project-specific context or configuration that should not be committed to the repository.
2026-03-09 15:34:31 +08:00
YueGuobin 0f2d0e2859 fix(copilot): serialize tool output to standard JSON format for frontend parsing
Changed tool output serialization in AgentService._convert_event_to_chunk()
from str() to json.dumps() to ensure structured data (dict/list) is properly
formatted as standard JSON instead of Python string representation.

Changes:
- Added json import to agent_service.py
- Modified on_tool_end event handling to use json.dumps(output, ensure_ascii=False, indent=2)
- Updated ai-chat-api-design.md to document tool_output format

Benefits:
- Frontend can parse tool results with standard JSON.parse()
- Chinese and non-ASCII characters are preserved (not escaped)
- Formatted output (indent=2) improves readability

Co-Authored-By: YueGuobin <yueguobin@outlook.com>
2026-03-09 15:15:50 +08:00
YueGuobin 13a032ea2c chore: update author name and copyright headers
Updated the author name and copyright statements across the
gns3_copilot module. The name has been standardized from
"Guobin Yue" to "Yue Guobin (岳国宾)" to reflect the correct
author attribution including Chinese characters.
2026-03-09 11:46:28 +08:00
Guobin Yue d7e5fe065e Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-08 13:20:27 +08:00
YueGuobin 9ba02e9436 feat(docs): enhance AI chat API documentation with examples and details
- Improve POST /chat endpoint documentation with request/response examples
- Add session ID management flow explanation
- Enhance GET /sessions endpoint with query parameters and response example
- Update GET /sessions/{session_id}/history with detailed response structure
- Format parameters as tables for better readability
- Clarify session ID usage in streaming conversations
2026-03-08 02:27:48 +08:00
YueGuobin fd34ef494f feat: add .claude directory to gitignore for API key security
Add .claude/ directory to .gitignore to prevent accidental
commit of Claude Code settings which may contain sensitive
API keys. This ensures development environment configuration
files with potential credentials are excluded from version
control.
2026-03-07 23:52:16 +08:00
Jeremy Grossmann cd51afb01f Merge pull request #2633 from GNS3/revert-2628-console
Revert "Fix QEMU serial console artifacts by filtering ANSI CPR responses in …"
2026-03-07 22:24:17 +08:00
Jeremy Grossmann 14ffa2c2d6 Revert "Fix QEMU serial console artifacts by filtering ANSI CPR responses in …" 2026-03-07 22:22:16 +08:00
grossmj 73ffb22aa2 Bundle web-ui v3.1.0.dev1 2026-03-07 17:47:44 +08:00
Jeremy Grossmann f81ab0cfbe Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-07 13:00:39 +08:00
Jeremy Grossmann 0cedab1742 Merge pull request #2632 from GNS3/drop-python3.9
Drop support for Python 3.9
2026-03-07 11:19:03 +08:00
Guobin Yue 1cc48c1fb0 Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-07 01:57:08 +08:00
YueGuobin 23b073a7bc docs: add troubleshooting guide for datetime timezone issue
Add comprehensive documentation for handling datetime timezone discrepancies between backend and frontend. The issue arises when backend returns naive datetime strings without timezone suffixes, causing JavaScript to parse them as local time instead of UTC. The guide includes problem description, root cause analysis, three frontend solutions (dayjs UTC parsing, manual 'Z' suffix addition, and global Axios interceptor), backend context, and testing checklist.
2026-03-07 01:42:18 +08:00
grossmj 679c690903 Drop support for Python 3.9 2026-03-06 19:03:53 +08:00
Jeremy Grossmann 09aaf43dd1 Merge pull request #2628 from Raizo62/console
Fix QEMU serial console artifacts by filtering ANSI CPR responses in …
2026-03-06 18:24:34 +08:00
Jeremy Grossmann 5755a48fa3 Merge pull request #2630 from UmmmAGoodName/3.0
Fixed the path traversal check
2026-03-06 18:05:57 +08:00
YueGuobin 3a287de8c1 docs: add ACL Web UI implementation guide for frontend developers
Add comprehensive implementation guide for ACL management feature in GNS3 Web UI. The guide includes:

- Feature overview with core functionality and user flow
- Detailed API endpoint specifications for ACE CRUD operations
- Data structures and relationships
- Frontend implementation guide with component architecture
- UI/UX design recommendations and wireframes
- Common usage scenarios and error handling patterns
- Example code with React components and API service layer

This document serves as a reference for frontend developers implementing ACL management interface, covering everything from API integration to user interface design.
2026-03-06 14:19:19 +08:00
YueGuobin 8660e9c8db feat(docs): add RBAC + ACL implementation guide for GNS3 Server
Add comprehensive documentation for the two-tier permission control system combining RBAC and ACL features. The guide covers system overview, core concepts, data model, permission check flow, usage examples, best practices, and common issues. This documentation is applicable for GNS3 Server v3.0+ and provides implementation details for administrators managing user permissions.
2026-03-06 13:07:15 +08:00
YueGuobin 3d781236c6 delete depreacted dir 2026-03-06 11:08:35 +08:00
YueGuobin 0f61a06557 feat(docs): clarify API key visibility for group configurations
Add detailed section explaining that plaintext API keys for group configurations are never exposed through the application API, even to super admins. This clarifies the security design where group configs are intended for inheritance only, not manual viewing, while maintaining internal decryption for inheritance functionality.
2026-03-06 11:06:18 +08:00
YueGuobin 903e48aecc feat(docs): clarify API key visibility rules and encryption details
Update the LLM model configs API documentation to provide clearer explanations of API key visibility controls and encryption behavior. The changes include:

- Enhanced visibility table with more specific scenarios and encryption states
- Added detailed rules explaining when API keys are visible as plaintext, hidden (null), or shown encrypted
- Clarified super admin capabilities and database-level access
- Updated JSON examples to reflect actual encrypted values and null placeholders
- Added important notes about Fernet encryption, on-the-fly decryption, and group config behavior

These updates provide better transparency about security measures and help users understand what to expect when viewing different types of configurations.
2026-03-06 10:05:17 +08:00
YueGuobin 4941dc13d8 feat(api): enhance /me endpoint with groups, pools, and ACEs
Add comprehensive user context to the `/me` endpoint by including group memberships, accessible resource pools, and access control entries (ACEs). This enables users to view inherited configurations, available resources, and their permissions directly from the API.

Key additions:
- Group membership details with inherited configs
- Resource pool access information
- ACE visibility for permission transparency
- Support for user-selectable group default configurations

The enhancement addresses user needs for better visibility into permissions and accessible resources within the system.
2026-03-06 09:50:34 +08:00
YueGuobin eb7a72f5e2 feat(docs): update copilot_mode value in LLM model configs API example
Changed the example value of `copilot_mode` from "lab_assistant" to "lab_automation_assistant" in the API documentation to reflect the correct mode name used in the system.
2026-03-06 02:00:02 +08:00
YueGuobin 77ef87f468 feat(prompts): rename prompt modules for clarity and consistency
Rename base_prompt.py to teaching_assistant_prompt.py and lab_assistant_prompt.py to lab_automation_assistant_prompt.py to better reflect their purposes. Update all imports and references accordingly to maintain consistency across the codebase. This improves code readability and aligns naming with the actual functionality of each prompt module.
2026-03-06 01:58:54 +08:00
YueGuobin dd3b06bd75 feat(docs): remove reference tool command from model configs API documentation
The `python scripts/show_model_context_limits.py` command was removed from the documentation as it is no longer necessary or relevant for users configuring model context limits. The remaining content still provides clear guidance on calculating context limits in K tokens.
2026-03-06 01:55:46 +08:00
Guobin Yue 87f8f22524 Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-06 01:42:47 +08:00
YueGuobin 216b3d7219 docs: translate AI chat API design document to English
Translate the GNS3 Copilot Agent Chat API design document from Chinese to English to improve accessibility for international contributors and align with project documentation standards. The translation covers all sections including overview, core features, architecture design, API endpoints, and response formats.
2026-03-06 01:14:52 +08:00
YueGuobin 8fa6d6810a feat: add multi-user concurrency control design document
Add comprehensive design document outlining the race condition issue when multiple users simultaneously operate on the same network device via GNS3-Copilot Agent. The document details the problem statement, affected components, and proposes two solutions: device-level mutex lock (recommended) and connection pooling with session isolation. It includes implementation details, API changes, and UI considerations to ensure safe concurrent operations.
2026-03-06 01:08:45 +08:00
YueGuobin af6d87426b feat(agent): add runtime control parameters for agent behavior
Add support for runtime control parameters `max_iterations` and `max_tool_calls` in the chat API to allow users to dynamically adjust agent behavior per request. This addresses current limitations where iteration limits and tool call constraints are hardcoded, providing flexibility for complex tasks and cost control.
2026-03-06 00:54:33 +08:00
YueGuobin c317932f1a feat(security): add forbidden command filtering for device configurations
- Import filter_forbidden_commands utility from command_filter module
- Add _filter_forbidden_commands_from_device_configs method to filter out restricted commands before execution
- Store blocked commands information and log filtered commands for audit purposes
- Update _process_task_results to include blocked commands info in response
- Prevent execution of potentially dangerous commands while maintaining transparency about filtered content
2026-03-06 00:30:17 +08:00
YueGuobin f1b496df49 docs: add troubleshooting guide for force kill residual processes
Add comprehensive documentation for troubleshooting issues caused by using `kill -9` on gns3server processes. The guide explains the root cause where SIGKILL prevents proper cleanup of child processes like dynamips and vpcs, leading to port conflicts and resource allocation errors when restarting. It provides multiple solutions including manual process cleanup, proper shutdown procedures, and preventive measures with example scripts. This documentation helps users resolve common issues with Dynamips VM creation failures, undefined project_id errors, and TCP port warnings.
2026-03-05 23:39:59 +08:00
UmmmAGoodName 6ff4d46838 Fixed the path traversal check 2026-03-05 16:38:55 +01:00
YueGuobin aaba2d6181 docs: update node name from generate_title to title_generator_node
Updated references to the title generation node in both documentation and code:
- Changed node name from `generate_title` to `title_generator_node` in API design documentation
- Updated filtering logic in agent service to exclude `title_generator_node` from LLM call statistics, token counting, and frontend streaming events
- Maintains same functionality while using more descriptive node name for clarity
2026-03-05 23:19:20 +08:00
YueGuobin a7bc68d6e1 feat(docs): reorganize documentation and add orphan tool calls recovery plan
- Move command-security.md and hitl-implementation-plan.md to todo/ directory
- Add new documentation for orphan tool calls recovery with detailed problem analysis and implementation plan
- Document scenarios causing orphan tool calls and propose fix strategy using LangGraph API
2026-03-05 23:07:02 +08:00
YueGuobin b8cb0bdcb0 feat(agent): exclude generate_title node from LLM call and token statistics
Filter out internal LangGraph 'generate_title' node from LLM call counting and token usage tracking to avoid inflating statistics with internal operations. This ensures metrics only reflect user-facing AI interactions.
2026-03-05 23:01:41 +08:00
YueGuobin 511b155da8 feat(ai-chat-api): implement streaming tool calls with incremental parameter accumulation
- Update API documentation to reflect new streaming tool call mechanism
- Add `message_id` optional field to content and tool_call events
- Change tool_call structure from array to single object with incremental updates
- Add `tool_call_id` to tool_start events for better event correlation
- Implement ToolCallStreamAccumulator class to handle parameter accumulation
- Provide frontend example code for handling streaming tool calls
- Maintain backward compatibility with existing session_id tracking
2026-03-05 22:29:01 +08:00
YueGuobin 1de7d00db3 feat(agent): update SSE event schema and handle tool calls from LLM
- Update AI chat API documentation with revised SSE event schema
- Add support for multiple tool calls in `tool_call` events
- Include `session_id` in all event types for better session tracking
- Implement `on_chat_model_end` handler to process LLM tool call decisions
- Update example JSON payloads to reflect new schema structure
2026-03-05 22:03:27 +08:00
YueGuobin 54775faaf4 feat(copilot): rename copilot modes for clarity and add mode-specific tools
- Rename "teaching" mode to "teaching_assistant" for better clarity
- Rename "lab_assistant" mode to "lab_automation_assistant" to reflect expanded capabilities
- Implement mode-specific tool sets: teaching_assistant gets read-only diagnostic tools only, while lab_automation_assistant gets full diagnostic and configuration tools
- Update API documentation examples to reflect new mode names
- Maintain backward compatibility with default tool set initialization
2026-03-05 21:44:36 +08:00
YueGuobin 28f2fe03e6 feat: suppress nornir INFO logs to reduce console verbosity
Set logging level for nornir.core and nornir loggers to WARNING in config_tools_nornir.py and display_tools_nornir.py. This prevents nornir from logging task execution at INFO level to the console, as the logging={"enabled": False} parameter in InitNornir only disables plugin internal logs.
2026-03-05 21:04:46 +08:00
YueGuobin 2485bfec46 docs: add temperature parameter documentation and code formatting improvements
- Added `temperature` parameter to Chat API documentation with implementation notes
- Improved code formatting in context_manager.py with consistent string quotes and line breaks
- Added section on future runtime LLM parameter override capabilities
- Updated API schemas to include temperature parameter (currently unused but reserved for future implementation)
2026-03-05 20:58:14 +08:00
YueGuobin 7f8364fbf5 refactor: move context helpers to separate module for better organization
- Extract context variable management functions from connector_factory.py to new context_helpers.py module
- Update imports in gns3_copilot.py, agent_service.py, and __init__.py to use new module
- Remove inline imports and ensure consistent access to context helpers
- Improves code organization and maintainability by separating concerns
2026-03-05 20:40:16 +08:00
YueGuobin 16559d2ce2 feat(agent): reorganize imports and improve code structure
- Standardize import organization with clear sections (standard library, third-party, local)
- Move sys.path modification to top of imports for better clarity
- Fix circular import issues by reordering imports
- Remove duplicate imports and ensure proper import grouping
- Maintain all existing functionality while improving code readability
2026-03-05 18:06:36 +08:00
YueGuobin 08b5b44a50 feat(copilot): add copilot_mode field to LLM model configs API
- Add `copilot_mode` field to request examples in API documentation
- Update prompt loader to read `copilot_mode` from flattened config structure
- Support both "teaching" and "lab_assistant" modes for different assistant behaviors
2026-03-05 16:41:47 +08:00
YueGuobin a777c36a29 feat(copilot): add copilot_mode field and config command tool
- Add `copilot_mode` field to LLM model configs API with "teaching" (diagnostics only) and "lab_assistant" (full configuration access) modes
- Introduce new `ExecuteMultipleDeviceConfigCommands` tool for executing configuration commands on multiple devices
- Include `tags` field in node data structure for enhanced project management
- Update API documentation examples to reflect new `copilot_mode` field and context limit additions
2026-03-05 16:31:02 +08:00
YueGuobin 8dc8facb13 docs: simplify context window management documentation
Removed extensive implementation details and configuration examples from the context window management documentation. The document now focuses on core permissions and prohibitions for tool usage, providing a clearer and more concise reference for allowed and forbidden actions. This streamlines the documentation to essential guidelines only.
2026-03-05 14:05:58 +08:00
Jeremy Grossmann ea68d8b959 Merge pull request #2629 from GNS3/image-handling
Fix image handling
2026-03-05 12:43:47 +08:00
grossmj 4606613673 Fix image handling 2026-03-05 12:38:28 +08:00
YueGuobin a8044cc1c2 feat: add copyright and author attribution to source files
Add copyright notice and author attribution to multiple Python files in the gns3-copilot module. This ensures proper licensing attribution and clarifies authorship for the project files.
2026-03-05 11:34:00 +08:00
YueGuobin 2779734de4 feat: remove redundant project attribution comments from GNS3-Copilot modules
Removed repetitive "This module is part of the GNS3-Copilot project" and GitHub URL comments from multiple module docstrings. These comments were redundant since the project information is already established in the main package documentation. This cleanup improves code readability and reduces maintenance overhead by eliminating duplicate attribution statements across the codebase.
2026-03-05 11:26:54 +08:00
YueGuobin d12b2df306 feat(docs): update context window management documentation
- Refactor system message structure to combine system prompt and topology info using template variables
- Update token calculation process with merged system message approach
- Clarify priority order for message retention during context window management
- Add detailed token counting implementation using tiktoken library
- Include boundary case handling for system message exceeding budget
- Add SPDX license headers to tool files for proper licensing documentation
2026-03-05 11:23:11 +08:00
YueGuobin ed5fd7d17c feat(agent): inject topology into system prompt via template variable
Refactor context preparation to embed topology information directly into the system prompt using a {{topology_info}} placeholder, replacing the previous approach of appending a separate SystemMessage. This consolidates context into a single system message and simplifies token accounting. The logging is updated to reflect the new token breakdown, showing combined system prompt tokens (base + topology) instead of separate components.
2026-03-05 11:05:51 +08:00
YueGuobin 33df674cbf feat(agent): remove GNS3TopologyTool from available tools list
The GNS3TopologyTool has been removed from the list of available tools for the agent. This change simplifies the toolset by eliminating a tool that is no longer needed or supported in the current workflow.
2026-03-05 10:55:10 +08:00
YueGuobin 7fcdb57615 feat(context-manager): improve context window management with tool token accounting
Enhanced the context window management system to properly account for tool definition tokens when trimming messages. The key changes include:

- Updated `trim_messages_for_context` function to accept `tool_tokens` parameter
- Modified token budget allocation logic to subtract tool tokens before message trimming
- Added detailed documentation explaining the token budget distribution between messages and tool definitions
- Implemented prioritized trimming strategy that preserves system messages and recent conversation history
- Added boundary case handling for scenarios where system messages or tools exceed available budget

The improvements ensure more accurate context window management by accounting for the ~1000-2000 tokens typically consumed by tool definitions that LangChain automatically includes in LLM requests.
2026-03-05 01:50:48 +08:00
YueGuobin f8aa653ef9 feat(context-manager): add tiktoken dependency and improve token counting accuracy
- Add tiktoken as a required dependency for accurate token counting
- Update documentation with installation instructions and token counting strategy
- Improve logging to include tool definition token estimates
- Enhance error handling to fail fast when tiktoken is not available
- Update context manager to use tiktoken's cl100k_base encoding for GPT-4 compatibility
2026-03-05 01:01:34 +08:00
YueGuobin 7368ac098a docs: add context limit and strategy to LLM model configs API
- Add `context_limit` as required field for LLM model configurations
- Add `context_strategy` as optional field with three trimming strategies
- Update API documentation with detailed examples for GPT-4o and Claude 3.5 Sonnet
- Clarify that context limit is specified in K tokens (thousands of tokens)
- Update example payloads to reflect current model versions and new fields
2026-03-05 00:40:46 +08:00
YueGuobin 6a9f745c13 feat(copilot): add HITL confirmation for sensitive operations
- Move AI chat API design document to gns3-copilot directory
- Add comprehensive HITL implementation plan with architecture and workflow
- Introduce human-in-the-loop confirmation for dangerous configuration commands
- Include state management, API endpoints, and frontend integration details
- Provide testing plan and deployment steps for the new feature
2026-03-04 23:53:50 +08:00
YueGuobin 4e28adffb6 feat(copilot): add tool response normalization utility
Add `normalize_tool_response` function to standardize tool output formats for consistent frontend display. The function converts various response types (dict, list, string) into a unified structure with success metrics, detailed data arrays, and metadata. This ensures backward compatibility while providing predictable response formats for UI components.
2026-03-04 23:41:29 +08:00
YueGuobin f64daa96cd feat(agent): streamline conversation flow logic in copilot
- Remove unused `llm_calls` variable and redundant logging in `should_continue`
- Simplify title generation routing by eliminating unnecessary condition checks
- Improve code clarity and maintainability by focusing on essential flow control
2026-03-04 23:34:14 +08:00
YueGuobin 4a017b1a7f feat(chat): add session pinning feature with database migration
- Add `pinned` column to chat_sessions table with default FALSE
- Implement database migration for existing installations using PRAGMA table_info
- Create composite index for pinned + updated_at sorting
- Add pin/unpin API endpoints (PUT/DELETE /sessions/{id}/pin)
- Update session listing to sort by pinned status then updated_at
- Extend ChatSessionsRepository with pin_session method
- Update API documentation to reflect new pinning functionality

The feature allows users to pin important chat sessions to the top of the list. Sessions are sorted with pinned sessions first (by updated_at), followed by regular sessions (by updated_at). Database migration ensures backward compatibility with existing installations.
2026-03-04 23:18:30 +08:00
YueGuobin f688a2d5c0 feat(agent): enhance message handling with ID generation and format conversion
- Add message ID generation for initial HumanMessage creation
- Implement message converters for LangChain/OpenAI format interoperability
- Update documentation with detailed message format specifications
- Refactor AgentService to use centralized message conversion utilities
- Ensure tool_calls format compliance with OpenAI API standards
2026-03-04 23:05:43 +08:00
YueGuobin 6b73f00281 docs: update AI chat API design with detailed statistics collection
Update the AI chat API design documentation to provide comprehensive details about statistics collection during streaming conversations. The documentation now includes:

1. **Enhanced statistics collection logic**:
   - Clarified message_count increments for user messages, AI responses, and tool results
   - Added LLM call tracking via on_chat_model_start events
   - Detailed token counting methodology using LangGraph's usage_metadata

2. **Improved implementation details**:
   - Added specific event handlers for statistics collection
   - Explained LangGraph's cumulative token counting behavior
   - Provided real-world examples of token accumulation

3. **Updated data models**:
   - Enhanced ChatSession model documentation with field descriptions
   - Separated fields into categories (basic, statistics, timestamps, reserved)

4. **Refined architecture documentation**:
   - Added detailed flow for stream_chat method
   - Documented statistics collection mechanism during SSE streaming
   - Explained batch update strategy to reduce database writes

The changes ensure developers understand how conversation statistics are collected, processed, and stored without impacting streaming performance.
2026-03-04 22:33:28 +08:00
YueGuobin 48e2793719 feat(agent): initialize checkpointer before chat session retrieval
Add initialization check for `_checkpointer_conn` in `AgentService` to ensure the checkpointer database connection exists before attempting to retrieve chat sessions. This prevents potential null reference errors when the checkpointer hasn't been initialized yet during agent operations.
2026-03-04 22:09:09 +08:00
YueGuobin 03ab9cdf6c feat(chat-api): refactor design document with concise architecture overview
- Replace detailed implementation plan with high-level architecture design
- Focus on core features: project isolation, streaming responses, session management
- Remove FlowNet-Lab reference and implementation specifics
- Streamline document from 1172 to 483 lines for better maintainability
2026-03-04 21:58:23 +08:00
Raizo62 590eedeb46 Fix QEMU serial console artifacts by filtering ANSI CPR responses in telnet proxy
- filter incoming cursor position report sequences (`ESC[<row>;<col>R`) in `AsyncioTelnetServer`
- prevent stray `;1R;80R` characters on late telnet console attach after VM boot
- keep QEMU serial transport unchanged (`-serial telnet`) for BIOS compatibility
2026-03-04 14:26:52 +01:00
Jeremy Grossmann 2843e05e01 Merge pull request #2627 from GNS3/bugfix/2622
Qemu VMs: only compute MD5 checksums for existing disks
2026-03-04 18:57:52 +08:00
grossmj 8b245c96f8 Qemu VMs: only compute MD5 checksums for existing disks 2026-03-04 18:54:52 +08:00
YueGuobin b6c343c5b8 feat(agent): add GNS3UpdateNodeNameTool to copilot tools
Introduce a new tool for updating node names within the GNS3 copilot agent. This expands the agent's capabilities to include node name modifications alongside existing node and link management operations.
2026-03-04 17:55:16 +08:00
YueGuobin 0648b53a45 feat(gns3_copilot): enhance topology logging with structured details
Improve logging in GNS3 topology reader to provide more structured and informative output. The previous single-line JSON log has been replaced with separate info and debug logs:
- Info log now includes project ID, project name, node count, and link count
- Debug log retains the full topology details for deeper inspection
This makes it easier to monitor topology retrieval in production while keeping detailed data available for debugging.
2026-03-04 17:43:41 +08:00
YueGuobin ef712ad314 feat(copilot): simplify project context handling and remove mode parameter
- Remove `selected_project` tuple from MessagesState as it's no longer needed
- Replace tuple-based project selection with direct `project_id` from config
- Remove unused `mode` parameter from llm_call function
- Update topology retrieval to use project_id directly from configurable settings
- Streamline context messages by removing redundant project info formatting
- Move project_id from metadata to configurable section in agent_service config
2026-03-04 17:40:17 +08:00
grossmj 5b00529666 Copy config files and database from a previous version if it exists 2026-03-04 17:23:10 +08:00
Jeremy Grossmann a20e10f75a Merge pull request #2625 from markparonyan/3.0
feat(compute): option to disable compute authentication
2026-03-04 16:40:58 +08:00
grossmj 7010baccee Add enable_http_auth in gns3_server.conf sample 2026-03-04 16:35:26 +08:00
YueGuobin 4fa29f3bee feat(agent): add GNS3ProjectInfoTool to gns3_client exports
Add GNS3ProjectInfoTool to the __all__ list in gns3_client/__init__.py to make it available for import. This ensures the tool is properly exposed as part of the public API for use in copilot agent modules.
2026-03-04 16:06:13 +08:00
YueGuobin a278a6091c feat(agent): add comprehensive logging to LLM and tool execution nodes
- Add info and debug logging to llm_call node for tracking LLM invocations and configuration
- Add error handling and logging to tool_node for tool execution failures
- Add startup logging to stream_chat method with session details
- Improve observability of agent workflow and debugging capabilities
2026-03-04 15:46:12 +08:00
YueGuobin 1e9cf3fcbb feat(agent): make JWT token optional in GNS3 connector factory
The `get_gns3_connector` function now accepts an optional `jwt_token` parameter. If not provided, the token will be retrieved from context, improving flexibility for scenarios where authentication is handled externally or deferred.
2026-03-04 15:38:50 +08:00
YueGuobin 289ae0cddf feat(agent): remove redundant done message from stream_chat
The `stream_chat` method was yielding a "done" message after streaming all chunks, but this is unnecessary as the streaming completion is already indicated by the end of the stream. Removing this redundant message simplifies the response handling and aligns with typical streaming patterns.
2026-03-04 13:57:03 +08:00
YueGuobin 425ce43bdd feat(chat): add project status checks to chat endpoints
Add project status validation to all chat API endpoints to ensure the project is opened before allowing chat operations. This prevents unauthorized access and ensures chat functionality only works with active projects.

- Check project.status == "opened" in stream_chat, list_sessions, get_history, and delete_session endpoints
- Return HTTP 403 FORBIDDEN with descriptive error message if project is not opened
- Update docstring for stream_chat endpoint to document the requirement
2026-03-04 13:55:09 +08:00
YueGuobin eec4ebe3fd feat(copilot): replace LangGraph config with request-scoped context variables
- Refactor `llm_call` and `generate_title` nodes to retrieve `llm_config` from request-scoped context variable instead of LangGraph config
- Remove `jwt_token` and `llm_config` from LangGraph configurable parameters in `AgentService.stream`
- Add `set_current_llm_config` and `get_current_llm_config` functions to `connector_factory` and export them in `__init__.py`
- Update `tool_node` to no longer extract `jwt_token` from config as it is now handled via context variable
- Improves thread safety and decouples configuration from LangGraph's state management
2026-03-04 13:49:17 +08:00
YueGuobin b05e6a71b4 feat(copilot): refactor JWT token handling and improve metadata tracking
- Move JWT token from state to configurable context for better security and request isolation
- Add user_id parameter to agent service for enhanced metadata tracking
- Update checkpoint directory name from .gns3-copilot to gns3-copilot
- Implement context-aware JWT token management using ContextVar
- Improve tool node to extract JWT token from config instead of state
2026-03-04 13:36:16 +08:00
YueGuobin 5e9aac7514 feat(agent): handle AIMessageChunk content access in copilot streaming
Update agent service to properly access content from AIMessageChunk objects during chat model streaming. Instead of using dictionary get method on the chunk, now use getattr to directly access the content attribute, ensuring compatibility with the AIMessageChunk object structure.
2026-03-04 13:23:07 +08:00
YueGuobin b780bfaf53 feat(agent): refactor LLM configuration handling to use centralized config
- Replace separate user_id and jwt_token parameters with unified llm_config dict
- Simplify model factory to accept llm_config directly instead of fetching from API
- Update llm_call and generate_title nodes to extract llm_config from LangGraph config
- Remove deprecated API fetching logic from model factory
- Maintain backward compatibility for existing tool usage patterns

This change centralizes LLM configuration management, reducing API calls and improving performance by passing configuration directly from the API layer rather than fetching it repeatedly.
2026-03-04 13:13:54 +08:00
YueGuobin 4765e54d7a feat: improve async handling in LLM config retrieval
Refactor get_llm_config to handle various async contexts more robustly. The function now properly checks for running event loops using asyncio.get_running_loop() and handles edge cases when called from thread pools or existing loops. This prevents RuntimeErrors and ensures reliable execution in both sync and async environments.
2026-03-04 12:47:37 +08:00
YueGuobin d8c3a56503 feat(agent): remove environment variable fallback for LLM configuration
Remove support for environment variable fallback in LLM model configuration. The configuration now strictly follows:
1. Provided llm_config dictionary (highest priority)
2. Fetch from llm_model_configs system via connector_factory (requires user_id and jwt_token)

This change ensures consistent configuration management and eliminates the outdated environment variable approach. When no configuration is found, a clear ValueError is raised with appropriate error messages.
2026-03-04 12:45:09 +08:00
YueGuobin 2df05dff6e feat(api): nest chat endpoints under projects and refactor dependencies
- Change chat router prefix from `/chat` to `/projects/{project_id}/chat`
- Add `dep_project` dependency to inject Project instance into endpoints
- Remove manual project validation in `stream_chat` and use dependency instead
- Add placeholder `list_sessions` endpoint for future session listing
- Update `get_history` endpoint to use project dependency and adjust path
- Improve code organization and error handling for project retrieval
2026-03-04 12:43:36 +08:00
YueGuobin 479afc01b0 feat(api): add Query parameter description for chat session listing
Add explicit Query parameter with description to the `list_sessions` endpoint for better API documentation and clarity. The `project_id` parameter now includes a descriptive label indicating it is a GNS3 project ID.
2026-03-04 12:35:38 +08:00
YueGuobin 2fe30c69e6 feat(agent): update config parameter type to RunnableConfig in copilot nodes
- Change config parameter type from dict to RunnableConfig | None in llm_call and generate_title functions
- This improves type safety and aligns with LangChain's RunnableConfig usage
- No functional changes, only type annotations updated for better integration
2026-03-04 12:29:31 +08:00
YueGuobin dde2a00c5b feat(agent): update import paths for gns3_copilot modules
Updated import statements across multiple agent files to use absolute paths starting with `gns3server.agent.gns3_copilot` instead of relative `gns3_copilot` imports. This ensures proper module resolution within the gns3-server package structure and prevents import errors when the agent is executed from different contexts.
2026-03-04 12:27:50 +08:00
YueGuobin 73de248381 feat(copilot): add user-aware LLM calls and project cleanup
- Modified `llm_call` and `generate_title` functions to accept `config` parameter, extracting `user_id` and `jwt_token` for per-user LLM configuration and API authentication
- Updated `create_base_model_with_tools` and `create_title_model` calls to pass user authentication details
- Added `jwt_token` to state for tool usage in GNS3 API calls
- Integrated chat router into controller API routes under `/chat` endpoint
- Implemented `_cleanup_copilot_agent` method in `Project` class to remove AgentService resources upon project closure, preventing resource leaks
- Enhanced error handling in agent cleanup to avoid interrupting project close operations
2026-03-04 12:26:19 +08:00
YueGuobin e1f1bb7d9f feat(api): add AI chat API design document for GNS3 Copilot integration
This commit introduces a comprehensive design document outlining the implementation of AI Chat API for GNS3 Copilot Agent within GNS3 Server. The document provides:

- Overview and background on existing components including GNS3 Copilot Agent, LLM configuration management, and API framework
- Reference implementation details from FlowNet-Lab project
- Architecture design with clear component interactions between frontend clients and backend services
- RESTful API specifications for chat streaming, session management, and history retrieval
- Implementation details covering project-based agent management, SQLite checkpoint storage, and LangGraph integration
- Security considerations and deployment guidelines

The design enables clients to interact with GNS3 Copilot Agent through standardized APIs, supporting real-time chat streaming and persistent conversation sessions per project.
2026-03-04 12:08:47 +08:00
YueGuobin a1466dad0d feat(gns3_copilot): remove GNS3UpdateDrawingTool from client exports
Removed GNS3UpdateDrawingTool import and from __all__ list in gns3_client __init__.py to clean up the public interface and eliminate unused or deprecated components.
2026-03-04 01:17:20 +08:00
YueGuobin d525e5cad0 feat: rename FlowNet-Lab to GNS3-Copilot across codebase
Update all references from FlowNet-Lab to GNS3-Copilot in package names, documentation, and logging. This includes:
- Module and package __init__.py files
- License headers and file descriptions
- Log messages and internal comments
- Remove deprecated tools: GNS3CreateAreaDrawingTool and LinuxTelnetBatchTool

The renaming aligns with the project's new branding while maintaining all existing functionality.
2026-03-04 00:55:29 +08:00
YueGuobin 95b309c7af feat: add GNS3 Copilot AI agent dependencies to requirements
Add comprehensive dependencies for the new GNS3 Copilot AI agent feature. This includes:
- Core AI and automation frameworks (LangChain, LangGraph)
- Multiple model provider integrations (OpenAI, Anthropic, Google, AWS, Ollama, DeepSeek, xAI)
- Network automation tools (Netmiko, Nornir)
- Supporting libraries for telnet, HTTP requests, authentication, and image processing

The dependencies are organized into a dedicated section with clear comments for maintainability.
2026-03-04 00:49:46 +08:00
YueGuobin db9db56e7a feat(agent): enhance LLM config loading with priority system
Refactor model factory to support three configuration sources in priority order:
1. Direct llm_config dictionary parameter
2. Fetch from llm_model_configs system via connector_factory (requires user_id and jwt_token)
3. Environment variables as fallback for backward compatibility

This improves flexibility by allowing runtime configuration while maintaining compatibility with existing environment-based setups.
2026-03-04 00:47:35 +08:00
YueGuobin 15dc1e7ea0 feat(agent): remove checkpoint utilities from public API
Removed checkpoint-related imports and exports from the agent package's __init__.py to clean up the public API. This change reduces unnecessary exposure of internal checkpoint utility functions, focusing the public interface on the core agent_builder functionality.
2026-03-04 00:35:15 +08:00
YueGuobin cabcf4f1cb 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`
2026-03-04 00:28:52 +08:00
YueGuobin 8917ef39c9 feat: remove environment variable usage for Nornir credentials
Removed GNS3_SERVER_USERNAME and GNS3_SERVER_PASSWORD environment variables from Nornir configuration tools. Credentials are now set to empty strings by default, simplifying configuration and removing dependency on environment variables for authentication.
2026-03-04 00:22:47 +08:00
YueGuobin 983ed32663 feat(copilot): refactor prompts module for GNS3 Copilot
- Rename module description from FlowNet-Lab to GNS3 Copilot
- Replace linux_specialist_prompt and experiment_deploy_prompt imports with base_prompt
- Update __all__ export list to include SYSTEM_PROMPT instead of removed prompts
- Improve module docstring with detailed component descriptions and available prompts
- Maintain dynamic version management and module metadata
2026-03-03 23:31:38 +08:00
YueGuobin 4857cff59c feat(agent): refactor LLM configuration to support new llm_model_configs system
- Remove direct logging of LLM config from gns3_copilot.py
- Update model_factory to accept configuration from llm_model_configs dictionary
- Add fallback to environment variables for backward compatibility
- Centralize configuration loading in _load_llm_config function
2026-03-03 23:26:20 +08:00
YueGuobin 3c54a7d90a feat(gns3-copilot): add factory function to create GNS3 connector with LLM config
Introduce `get_gns3_connector_with_llm_config` as a convenience function that combines the creation of a GNS3 API connector and retrieval of the user's default LLM configuration. This simplifies initialization for operations requiring both GNS3 connectivity and AI model settings, reducing boilerplate code in callers. The function returns a dictionary containing the connector and LLM config, or None on failure.
2026-03-03 23:19:00 +08:00
YueGuobin 46b262a02c feat(agent): add gns3-copilot AI assistant integration module
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
2026-03-03 23:08:07 +08:00
YueGuobin 7a2d15cb64 feat: clarify default LLM model config selection logic
Updated documentation and implementation to clearly define the priority order for selecting default LLM model configurations. The logic now explicitly states:
1. User's config marked with `is_default: true` (highest priority)
2. Group's config marked with `is_default: true`
3. First config in the list (user configs come before group configs)

This ensures consistent behavior between the API documentation and the actual implementation in the repository code.
2026-03-03 22:56:21 +08:00
YueGuobin f4723cd083 docs: restructure LLM model configs API documentation for nested config object
Update API documentation to reflect new nested `config` object structure in LLM model configurations endpoints. The response format now encapsulates provider-specific fields (provider, base_url, model, temperature, api_key, max_tokens) within a `config` object, while moving ownership metadata (user_id, group_id, is_default, version, created_at, updated_at) to the top level. This aligns the user-facing endpoints with the group configuration structure and improves API consistency.
2026-03-03 22:47:36 +08:00
YueGuobin 176b39145b docs: update LLM model configs API documentation for group endpoints
- Add note clarifying that GET endpoints for groups return the same structure as user endpoints
- Document LLMModelConfigListResponse schema with default configuration selection logic
- Add comprehensive example for GET group configurations endpoint
- Update endpoint numbering to accommodate new group endpoints
- Ensure consistency between user and group API documentation
2026-03-03 22:39:38 +08:00
YueGuobin 2e4c42fadc feat(api): clarify default LLM model config selection logic
- Update API documentation to explicitly describe default configuration selection logic
- Add fallback behavior in repository to use first config when no default is marked
- Clarify difference between `/default` endpoint and `default_config` field
- Document that `default_config` is never null when configs list is not empty
2026-03-03 22:27:28 +08:00
YueGuobin b06593cf2a feat(docs): add default config endpoints and clarify config inheritance
- Add `/default` endpoints for users and groups to retrieve default LLM model configurations
- Update documentation to clarify that users receive both own and inherited configurations
- Improve response examples to show combined configs with source field
- Add 404 response example for missing default configurations
- Fix optimistic locking documentation formatting
2026-03-03 22:15:17 +08:00
YueGuobin 8fb4bf1117 feat(db): manually set timestamps for SQLite compatibility
Add explicit datetime.utcnow() assignments for created_at and updated_at fields in LLMModelConfigsRepository to ensure proper timestamp handling with SQLite. This addresses issues where SQLite may not automatically populate these timestamp fields during create and update operations. Changes applied to both user and group configuration methods for consistency.
2026-03-03 21:35:26 +08:00
YueGuobin aef337e86f feat(config): load secret files even without main config
When no configuration file is found or readable, the server now still loads secret files. This ensures that secret configurations (like API keys or passwords) are available even if the primary config file is missing, improving robustness and security in environments where secrets are stored separately.
2026-03-03 18:16:37 +08:00
YueGuobin 8e43ad4912 feat(db): replace PostgreSQL-specific JSONB with cross-database JSON type
- Change `JSONB` columns to generic `JSON` in LLMModelConfig model for database compatibility
- Update migration to use `sa.String(32)` for UUID and `sa.JSON()` for config fields
- Remove PostgreSQL dialect imports to support multiple database backends
- Keep existing constraints and indexes with PostgreSQL-specific annotations where needed
2026-03-03 18:03:16 +08:00
YueGuobin 3632641127 feat(db): update migration dependency to correct previous revision
The migration file `20260303_create_llm_model_configs_table.py` had an incorrect `down_revision` reference. Changed from `7ceeddd9c9a8` to `98083573d011` to properly link to the previous migration in the Alembic history. This ensures the migration chain is consistent and rollbacks work as expected.
2026-03-03 17:58:48 +08:00
YueGuobin fc7275878e feat(db): replace deferred unique constraints with partial unique indexes for LLM model configs
Replace deferred UniqueConstraints with partial unique indexes for user and group default configurations in the LLM model configs table. This change improves performance and ensures at most one default config per user/group while maintaining data integrity. The migration script has been updated accordingly to create and drop the new indexes.
2026-03-03 17:57:32 +08:00
YueGuobin d42fff49a5 feat(docs): enhance LLM model configs API documentation with schema updates
- Add `model_type` field to database schema with supported values (text, vision, stt, tts, multimodal, embedding, reranking, other)
- Add `name` field as table-level column for indexing and filtering
- Add reserved JSONB fields for future extensibility
- Update API request/response schemas to include `model_type` and `name` fields
- Add new `LLMModelConfigWithSource` schema for detailed configuration responses
- Update usage examples to reflect new required fields
- Improve database constraints and indexing documentation
2026-03-03 17:54:30 +08:00
YueGuobin b968920a75 feat(docs): add optimistic locking documentation for LLM model configs API
Add comprehensive documentation for optimistic locking implementation in the LLM model configurations API. The update includes:

- Added "Optimistic Locking" feature to the overview section
- Added `version` field to the database schema table
- Updated `LLMModelConfigUpdate` schema to include `expected_version` parameter
- Updated `LLMModelConfigResponse` schema to include `version` field
- Added detailed examples for update operations with optimistic locking
- Included conflict handling workflow and client retry instructions

This documentation ensures users understand how to prevent concurrent modification conflicts when updating LLM model configurations.
2026-03-03 17:39:04 +08:00
YueGuobin 161b7feb01 feat(api): add optimistic locking to LLM model config updates
- Include `version` field in all LLM model config response schemas
- Add `expected_version` parameter to update endpoints for optimistic locking
- Handle concurrent modification errors with HTTP 409 Conflict status
- Update both user and group config endpoints consistently
2026-03-03 16:59:12 +08:00
YueGuobin 9315f06e1f feat(config): add encryption key loading for sensitive data
Add a new method `_load_encryption_key` to initialize encryption for sensitive data such as API keys. This method is called within `_load_secret_files` alongside JWT secret key loading, ensuring encryption is set up during server configuration. The change enhances security by enabling encryption for secrets stored in the server's secrets directory.
2026-03-03 16:46:23 +08:00
YueGuobin 8fad27d904 feat(db): improve database initialization and migration handling
- Add smarter database state detection during initialization to handle new databases, existing databases with new features, and old databases needing migration
- Make migration for llm_model_configs table idempotent to prevent conflicts when table already exists from code
- Add detailed logging for different database initialization scenarios
- Import sqlalchemy module for database inspection capabilities
2026-03-03 16:40:57 +08:00
YueGuobin bbd34f1f67 feat(api): add LLM model configurations endpoint and schemas
- Introduce new API route `/access` for managing LLM model configurations
- Add LLMModelConfig model to database models
- Include comprehensive schemas for LLM model config CRUD operations
- Register new router with tags for LLM Model Configurations
2026-03-03 16:34:48 +08:00
Mark Paronyan c48c89d309 tests(compute): test compute works with disabled auth 2026-03-03 00:30:00 +03:00
Mark Paronyan 8c3aaa78f5 feat(compute): option to disable compute authentication 2026-03-03 00:28:57 +03:00
Jeremy Grossmann d3710e8e9a Merge pull request #2621 from markparonyan/issue-2521
handle None port name to prevent TypeError in short_name method
2026-03-01 12:31:17 +08:00
Mark Paronyan 0da1a6639a tests(controller,port): short_name finishes successfully when port name is None 2026-02-28 21:45:08 +03:00
Mark Paronyan 729eb43115 fix(controller,port): handle None port name to prevent TypeError in short_name method 2026-02-28 21:45:00 +03:00
Jeremy Grossmann dce4a71004 Merge pull request #2619 from yueguobin/fix/docker-container-name-conflict
fix(docker): handle container name conflict automatically
2026-02-28 12:56:24 +08:00
grossmj 151feb369f Development on 3.1.0.dev1 2026-02-28 11:35:46 +08:00
YueGuobin ce90b2b92c fix(docker): handle container name conflict automatically
When a Docker container with the same name already exists (e.g., from a
   previous crashed GNS3 session), Docker returns a 409 Conflict error
   when trying to create a new container with that name. This causes the
   project open operation to fail.

   This fix adds automatic cleanup of stale containers when encountering
   a name conflict:
   - Added DockerHttp409Error exception class
   - Updated http_query to detect 409 status codes
   - Modified create() to remove conflicting containers and retry

   Fixes the issue where opening a project fails with:
   "Docker has returned an error: 409 Conflict. The container name
   '/GNS3.xxx' is already in use by container 'xxx'"
2026-02-27 23:35:11 +08:00
Jeremy Grossmann a0116902a6 Merge pull request #2618 from yueguobin/fix-port-nonename-error
feat(virtualbox): add fallback for VBoxManage executable detection
2026-02-27 00:39:31 +08:00
YueGuobin a343ace637 Revert: restore original port name handling logic 2026-02-27 00:12:30 +08:00
YueGuobin fe73d0e935 Merge branch 'fix-vboxmanage-case-sensitivity' into fix-port-nonename-error 2026-02-26 10:02:43 +08:00
YueGuobin c55fd9e066 feat(virtualbox): add fallback for VBoxManage executable detection
Add an additional fallback check for the VBoxManage executable using the capitalized "VBoxManage" command name. This improves compatibility on systems where the executable may be case-sensitive or installed with a different naming convention, ensuring the VirtualBox manager can locate the necessary binary when the lowercase "vboxmanage" is not found.
2026-02-26 09:57:51 +08:00
YueGuobin cde4bdc114 feat: simplify port name assignment logic
Refactor port name assignment to use `or` operator for fallback values, improving code readability and consistency. Changes applied in `node.py` and `port_factory.py` to handle custom adapter settings more cleanly.
2026-02-25 22:41:22 +08:00
YueGuobin f6777064db feat(ports): add null checks for port name in short name generation
Add conditional checks to ensure `self._name` is not None before performing string operations in the `short_name` property. This prevents potential AttributeError exceptions when port name is undefined, improving robustness and compatibility with edge cases in port configuration.
2026-02-25 22:21:05 +08:00
grossmj 4c6d40fd4b Upgrade httpx_ws 2026-02-25 19:20:18 +08:00
grossmj 4a2c1b7b23 Fix installing pytest-asyncio with Python 3.9 2026-02-25 19:06:56 +08:00
grossmj 47a7324eb5 Fix tests 2026-02-25 19:00:57 +08:00
Jeremy Grossmann 4519130a8c Merge pull request #2614 from yueguobin/3.0
Implement tags for nodes and templates
2026-02-25 00:33:15 +08:00
grossmj ef7c271a9a Development on 3.0.7.dev1 2026-02-24 21:32:36 +08:00
grossmj 4d85e517b4 Development on 2.2.57.dev2 2026-02-24 21:21:03 +08:00
grossmj ddacd956b2 Merge remote-tracking branch 'yueguobin/3.0' into fork/yueguobin/3.0 2026-02-23 23:32:15 +08:00
grossmj 547e68fd2b Remove unneeded rbac_repo in get_templates 2026-02-23 23:31:35 +08:00
Jeremy Grossmann 11e36cb32c Merge branch '3.0' into 3.0 2026-02-23 23:28:47 +08:00
grossmj 4d35477e46 Add/fix tests 2026-02-23 23:27:36 +08:00
grossmj a9525503c6 Set up database schema migration 2026-02-23 23:27:10 +08:00
grossmj bdcb6445c7 Use lists for tags instead of dicts 2026-02-23 23:26:42 +08:00
Jeremy Grossmann c49aa761ab Merge pull request #2617 from GNS3/bugfix/2560
Fix for resizing Qemu VMs disks
2026-02-23 17:18:57 +08:00
Jeremy Grossmann c88ac0c595 Merge branch '3.0' into bugfix/2560 2026-02-23 17:14:38 +08:00
grossmj 8f470fbe55 Update FastAPI dependency to support Python 3.9 2026-02-23 17:14:16 +08:00
grossmj c66e851498 Fix for resizing Qemu VM disks 2026-02-23 17:10:15 +08:00
grossmj a6043f0fc6 Upgrade dependencies 2026-02-23 16:48:26 +08:00
Guobin Yue 66f32cecf2 Merge branch 'GNS3:3.0' into 3.0 2026-02-23 01:37:05 +08:00
YueGuobin c05f667f3d feat(templates): safely access settings dict keys
Use dict.get() method to safely access 'image' and 'path' keys in settings dictionary to avoid KeyError exceptions when these keys are missing. This improves error handling and prevents server crashes when creating templates with incomplete settings.
2026-02-23 01:02:32 +08:00
YueGuobin e27ddf2cdf feat(api): fix ETag handling and JSON serialization in template endpoint
- Use `default=str` in `json.dumps` to handle non-serializable objects
- Return proper HTTP 304 response with ETag header instead of raising exception
- Ensure consistent ETag generation for template caching
2026-02-22 23:43:47 +08:00
YueGuobin a3616e6d33 feat(api): add tag filtering to nodes and templates endpoints
- Add optional `tags` query parameter to `/nodes` and `/templates` endpoints
- Support filtering by tags in format "key:value" with multiple tags ANDed together
- Example: `?tags=vendor:cisco&tags=model:7200` filters nodes/templates with both tags
- Maintain backward compatibility for existing API usage without tags parameter
2026-02-22 22:52:28 +08:00
Jeremy Grossmann 22c6b4b961 Merge pull request #2616 from StupidTreee/feature/project-created-by
Add 'created_by' field to track project creator
2026-02-22 18:33:54 +08:00
grossmj be4b87e8cd Update project schema and fix tests 2026-02-22 18:13:08 +08:00
Felix Schulz 8ab34924b5 Add 'created_by' field to track project creator 2026-02-21 22:15:21 +01:00
Jeremy Grossmann 1958deff09 Merge pull request #2615 from GNS3/bugfix/2532
Fix updating packet filters
2026-02-21 21:45:12 +08:00
grossmj 5e3ca29c58 Fix updating packet filters 2026-02-21 21:42:22 +08:00
grossmj 60abbade27 Revert merged changes from 2.2 introduced by PR #2607 2026-02-21 21:35:12 +08:00
YueGuobinandClaude Sonnet 4.5 56ece7ce88 Add vendor, model and netmiko_device_type fields to templates
Add three new optional fields to the template schema:
- vendor: Device vendor (e.g., Cisco, Juniper, Huawei)
- model: Device model (e.g., ISR4451-X, MX204, NE40E)
- netmiko_device_type: Netmiko device type for automation (e.g., cisco_ios, juniper_junos, huawei)

These fields enable AI/LLM integration to determine the appropriate
Netmiko device type when automating network device configuration.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-20 23:38:00 +08:00
grossmj c5b9f379fe Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	Dockerfile
#	dev-requirements.txt
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/version.py
#	requirements.txt
2026-02-20 16:28:53 +08:00
Jeremy Grossmann 3b95859b79 Merge pull request #2612 from dalearbo/fix/busybox-musl-ldd-check
fix: busybox static link detection on Alpine/musl
2026-02-20 16:01:01 +08:00
Jeremy Grossmann 126a4099e6 Merge pull request #2613 from dalearbo/fix/emit-threadpool-runtime-error
fix: handle RuntimeError in notification_manager emit()
2026-02-20 15:59:01 +08:00
grossmj 47cc827c1f Remove some files not related to PR 2026-02-20 15:56:08 +08:00
grossmj 715b7032bc Fix tests 2026-02-20 15:51:49 +08:00
Jeremy Grossmann bc1729b255 Merge branch '2.2' into fix/busybox-musl-ldd-check 2026-02-20 15:24:54 +08:00
Dale Arbogast 279f05a14a fix: handle RuntimeError in notification_manager emit()
asyncio.get_running_loop() raises RuntimeError when emit() is called
from a thread without an active event loop (e.g. when the disk space
check in project_manager triggers a log.warning notification from a
threadpool worker).

This causes a 500 Internal Server Error on project creation/open when
disk usage is high, instead of the intended warning notification.

Wrap the emit loop in try/except RuntimeError so that notifications
are silently dropped when no event loop is available, rather than
crashing the request.

Fixes #2502
Fixes #2505
2026-02-19 16:49:50 -05:00
Dale Arbogast 3dd4184193 fix: busybox static link detection on Alpine/musl
On musl-based systems (Alpine), ldd returns exit code 0 for static
binaries, unlike glibc which returns 1. This causes install_busybox()
to reject all busybox binaries as "dynamically linked" on Alpine.

Fix by also accepting binaries whose executable name contains "static"
(i.e. busybox-static, busybox.static), which are the first two
candidates checked by the function. The generic "busybox" fallback
still relies on the ldd return code check.
2026-02-19 16:44:01 -05:00
grossmj 013ec341b3 Fix tests 2026-02-16 19:32:47 +08:00
grossmj bfed330ec2 Fix bug when updating compute password to be empty 2026-02-16 19:23:46 +08:00
grossmj 0a118dc9e7 Cancel tasks if controller cannot be started 2026-02-16 19:16:06 +08:00
grossmj 28e7c014c8 Enable parallel compression with zstandard. Fixes #2324 2026-02-16 18:28:11 +08:00
Jeremy Grossmann 2b4a05eedd Merge pull request #2608 from RishikesavanRamesh/patch-1
Add dynamips to Dockerfile dependencies
2026-02-12 21:13:51 +08:00
Jeremy Grossmann 898a9ce208 Merge branch 'master' into patch-1 2026-02-12 21:13:38 +08:00
grossmj 74bc3b5144 Upgrade dependencies 2026-02-11 18:11:16 +08:00
grossmj aabfd08524 Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	dev-requirements.txt
#	gns3server/crash_report.py
#	gns3server/version.py
#	requirements.txt
2026-02-11 17:52:14 +08:00
grossmj dd87ccff4d Upgrade pytest and jsonschema dependencies 2026-02-11 17:38:49 +08:00
grossmj c1f8202d7c Revert "Upgrade python-multipart to v0.0.22. Fixes #2610"
This reverts commit fdcdce7d0d.
2026-02-11 17:14:03 +08:00
grossmj fdcdce7d0d Upgrade python-multipart to v0.0.22. Fixes #2610 2026-02-11 17:07:28 +08:00
Jeremy Grossmann 78c7d36b1c Merge pull request #2606 from GNS3/release/v2.2.56.1
Release v2.2.56.1
2026-02-11 16:52:43 +08:00
grossmj 44d4a426b5 Upgrade sentry-sdk and psutil dependencies 2026-02-11 16:46:21 +08:00
RishikesavanRamesh 3273f7e992 Add dynamips to Dockerfile dependencies 2026-02-06 20:34:44 +05:30
Jeremy Grossmann d2d19b43c2 Merge pull request #2607 from polsson86/update-pci-device-id-computation
Take populated disks into consideration when calculating PCI device ID
2026-02-06 12:45:30 +08:00
Patrik Olsson fe2014854e Take populated disks into consideration when calculating PCI device ID 2026-02-05 15:10:57 +01:00
grossmj 3915918c41 Release v3.0.6 2026-01-28 22:30:36 +08:00
grossmj a72980b2d9 Sync appliances 2026-01-28 22:24:10 +08:00
grossmj 600d3d38da Fix creating Qemu disk image. Fixes #2542 2026-01-28 19:36:22 +08:00
grossmj ebe4fdc5b5 Development on 2.2.57.dev2 2026-01-28 18:44:51 +08:00
grossmj 7f45cc6f47 Disable checking for available disk space. Ref #2548 2026-01-28 18:32:42 +08:00
grossmj 43d7e8a437 Release v2.2.56.1 2026-01-28 17:00:07 +08:00
grossmj 833b5a9ea8 Sync appliances 2026-01-28 16:52:30 +08:00
grossmj 05dda0117f Merge branch 'master' into 2.2 2026-01-28 16:00:14 +08:00
Jeremy Grossmann 6f0dfecc3d Merge pull request #2605 from iskanred/bugfix/2604
Fix telnet keepalive options on macOS
2026-01-28 15:56:13 +08:00
grossmj abaeab6242 Upgrade greenlet and sqlalchemy dependencies 2026-01-26 19:50:42 +08:00
Iskander Nafikov 2414b7a968 Fix telnet keepalive options on macOS 2026-01-26 00:31:03 +08:00
grossmj 1d45df6613 Upgrade dependencies 2026-01-24 21:38:58 +08:00
grossmj 69a695c9e6 Merge branch '2.2' into 3.0
# Conflicts:
#	dev-requirements.txt
#	gns3server/appliances/infix.gns3a
#	gns3server/crash_report.py
#	gns3server/run.py
#	gns3server/utils/asyncio/__init__.py
#	gns3server/version.py
#	requirements.txt
#	setup.py
2026-01-24 19:27:39 +08:00
grossmj 7b20314edb Delete random_query.py 2026-01-24 19:17:55 +08:00
grossmj 193f470eaf Upgrade dependencies 2026-01-24 19:12:58 +08:00
grossmj 4335fd7ce0 Drop Python 3.8 support 2026-01-24 18:51:44 +08:00
grossmj ef2cf277c1 Development on 2.2.57.dev1 2026-01-24 16:53:43 +08:00
Jeremy Grossmann 66db267e27 Merge pull request #2591 from GNS3/release/v2.2.56
Release v2.2.56
2026-01-24 16:49:35 +08:00
grossmj 27fbe37375 Release v2.2.56 2026-01-21 22:15:12 +08:00
grossmj 7b3fd4450e Sync appliances 2026-01-17 18:37:41 +08:00
grossmj 58d1e8f0c5 Set default location of udhcpc in "/etc/network/udhcpc". Fixes #2582 2026-01-17 18:01:42 +08:00
grossmj 8ce690ce78 Upgrade pywin32 to v311 2026-01-17 17:54:27 +08:00
grossmj c676a5bf82 Development on v2.2.56.dev1 2025-12-16 16:46:31 +08:00
grossmj 60c10e7ecc Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	README.md
#	gns3server/appliances/infix.gns3a
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/crash_report.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	setup.py
#	tests/controller/test_project.py
2025-11-29 11:42:02 +10:00
grossmj 37f17209d3 Release v2.2.55 2025-11-19 12:13:56 +10:00
grossmj f24134a8f5 Sync appliances 2025-11-19 12:08:29 +10:00
Jeremy Grossmann 1f2036defd Merge pull request #2575 from GNS3/bugfix/2574
Handle Docker API version requirements
2025-11-17 22:31:41 +10:00
grossmj f2aaf5ab38 Docker API version requirements and process to handle older daemons 2025-11-17 22:26:18 +10:00
Jeremy Grossmann 32f48e555c Merge pull request #2573 from GNS3/bugfix/2541
Python 3.14 compatibility
2025-11-17 11:30:42 +10:00
grossmj 942f021b58 Fix test_config.py 2025-11-17 11:26:06 +10:00
Jeremy Grossmann 4dc321454e Merge pull request #2572 from GNS3/feature/name-of-container-in-docker
Set name of container in Docker
2025-11-17 11:13:47 +10:00
grossmj 3a24318694 Use docker_name property when creating a container 2025-11-17 11:11:11 +10:00
grossmj bae6221991 Set name of container in Docker 2025-11-17 10:59:05 +10:00
grossmj c67ba6da0d Fix config tests 2025-11-17 10:21:12 +10:00
grossmj 4d23ca221f Comment out some tests in test_project.py 2025-11-16 20:52:14 +10:00
grossmj 09eab9529a Fix syntax error in testing.yml 2025-11-16 19:32:19 +10:00
grossmj 3bb23708fc Support for Python 3.14 2025-11-16 19:30:45 +10:00
grossmj 672b3c052b Downgrade aiofiles version 2025-11-16 19:25:12 +10:00
grossmj bfe7b7a735 Upgrade dependencies 2025-11-16 19:16:38 +10:00
Jeremy Grossmann d269a4c125 Merge pull request #2570 from Mytic2330/3.0-patch3
Fixed Connection closed when exporting a running project
2025-11-04 04:07:01 +01:00
Jeremy Grossmann 8ada95b9fd Merge pull request #2569 from Mytic2330/3.0
Fix database pool error and non-ASCII character project export
2025-11-04 04:05:56 +01:00
Bine d5f360c176 Update projects.py 2025-10-18 19:28:15 +02:00
Bine e817228280 Fix non-ASCII characters in project names 2025-10-18 18:10:24 +02:00
BineandUfi 4a059be480 Increase DB engine pool size and max overflow
As described in #2568 when multiple clients connect simultaneously, an excessive number of database pool connections are created. This leads to resource exhaustion and connection management issues.

We have introduced the pool_size and max_overflow parameters to better control the database connection pool.
These parameters ensure the database can handle a sufficient number of concurrent connections without over-allocating resources.

Added pool_size and max_overflow arguments to the database initialization.

This change overrides the default initialization configuration where the temporary fix was applied.

Co-Authored-By: Ufi <86113085+ufiking@users.noreply.github.com>
2025-10-17 22:17:10 +02:00
Jeremy Grossmann 230866890e Merge pull request #2556 from GNS3/bugfix/2543
Enable ip cef in IOU L2 and IOU L3 base configs
2025-09-01 18:59:10 +02:00
grossmj 355cfb7571 Enable ip cef in IOU L2 and IOU L3 base configs 2025-09-01 18:55:36 +02:00
grossmj 8dddfe056e Merge branch 'master' into 2.2 2025-09-01 18:42:02 +02:00
Jeremy Grossmann 9c33827de3 Merge pull request #2555 from GNS3/update-gh-docker-build
Update docker-build.yml
2025-09-01 18:28:04 +02:00
grossmj a34fa53823 Update tags 2025-09-01 18:27:04 +02:00
grossmj 565a76ae27 Only build and push Docker image when releasing a new version 2025-09-01 18:23:52 +02:00
grossmj dc9c3b1c5d Fix pushing Docker image to Docker hub 2025-09-01 18:17:52 +02:00
grossmj a394fb71dc Update method to login to ghcr.io 2025-09-01 17:55:46 +02:00
grossmj 6cbf3baa1b Update docker-build.yml 2025-09-01 17:49:34 +02:00
grossmj 10322135e3 Upgrade sentry-sdk package 2025-08-30 21:51:20 +02:00
grossmj 12d1d04462 Update security issues again in README.md. Fixes #2535 2025-08-29 18:28:14 +02:00
grossmj 8b4c2f5e90 Update security issues in README.md. Fixes #2535 2025-08-29 18:25:57 +02:00
grossmj 1ed549fdb1 Upgrade requests dev dependency 2025-08-29 14:01:19 +02:00
grossmj 845cad35f0 Upgrade pydantic, fastapi & sqlalchemy dependencies 2025-08-29 13:55:00 +02:00
grossmj 31613630cf Update pyproject.toml to support LICENSE file 2025-06-09 22:24:23 +02:00
Jeremy Grossmann aaffc731ee Merge pull request #2538 from Nick1200000/enhancement/docker-build
Add automated Docker build and publish workflow
2025-06-09 22:14:11 +02:00
Nick1200000 5ce55aff02 Resolving the Error 2025-06-08 14:11:01 +05:30
Nick1200000 aa1c0bb557 Resolving the Errors 2025-06-08 13:38:35 +05:30
Nick1200000 25bc2dce57 Resolving the Errors 2025-06-08 13:30:49 +05:30
Nick1200000 7e35d164dc Resolving the Errors 2025-06-08 13:26:40 +05:30
Nick1200000 8666ffaff3 Resolving the Errors 2025-06-08 13:24:38 +05:30
Nick1200000 020f6a123d Docker build CI/CD pipeline 2025-06-07 18:16:47 +05:30
grossmj 232b9c2806 Fix tests 2025-05-25 17:35:45 +02:00
Jeremy Grossmann f260f6e2b4 Merge pull request #2531 from PsyBlade42/docker-vnc-name
use GNS3 node name as vnc Desktop name
2025-05-23 14:26:08 +02:00
Thomas Schmidt a7108e1592 use GNS3 node name as vnc Desktop name
Most VNC clients use the Desktop name in their window title.
Currently this defaults to user@host which means all docker vnc
connections have identical window names of e.g.
  SSVNC: gns3@gns3server

This uses the node name instead.
2025-05-22 13:13:47 +02:00
grossmj 975ca254fd Release v3.0.5 2025-05-14 19:11:44 +02:00
grossmj 89cf5ea8e7 Bundle web-ui v3.0.5 2025-05-14 19:06:42 +02:00
grossmj bfbe2bf885 Sync appliances 2025-05-14 18:55:51 +02:00
grossmj 5c036dfd90 Upgrade uvicorn and pydantic 2025-05-14 18:54:55 +02:00
grossmj 2fbfe5385a Use Ubuntu 24.04 LTS in Dockerfile. Ref #2523 2025-05-14 18:30:43 +02:00
grossmj 2cdaa1cd06 Fix tests 2025-05-14 17:19:18 +02:00
grossmj f2080979a1 Fix tests 2025-05-14 16:56:46 +02:00
grossmj df576f0668 Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/schemas/template.py
2025-05-14 16:42:59 +02:00
grossmj c2c89b0ff3 Add missing 'nat' template type in schema. Fixes #2529 2025-05-13 20:52:44 +02:00
grossmj ef3570dc95 Merge branch 'master' into 2.2 2025-05-13 20:48:59 +02:00
grossmj 2bf3eff143 Remove debug message in tests 2025-05-13 20:47:38 +02:00
Jeremy Grossmann add8c4e8a2 Merge pull request #2526 from emmanuel-ferdman/master
Resolve deprecation warnings of regex library
2025-04-30 14:14:37 +07:00
Jeremy Grossmann 53eac771d6 Merge pull request #2528 from tobiasstein/fix-pci-bridges
Fix adding pci_bridges to qemu vms
2025-04-30 14:09:22 +07:00
grossmj 2b96e54629 Fix tests and require Qemu version >= 2.4 2025-04-30 13:38:52 +07:00
Tobias Stein cdf819f820 Fix adding pci_bridges to qemu vms
* Offset pci_device_id for network devices by 32 (formerly 4)
  to reserve first 32 IDs for non-netdev devices
  * This implies a new pci_bridge for the netdevs and
    the pci_device_ids starting at 0 (using modulo)
  * Fixes a bug in the creation of the qemu command
    when the number of qemu pcie devices (storage_controller, disks, …)
    was greater than 4 and the number of network devices
    saturated the 32 pcie ids of the root bridge
    causing qemu not to start.
2025-04-28 21:07:52 +02:00
Emmanuel Ferdman c05e6f4de4 Resolve deprecation warnings of regex library
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-04-26 00:15:16 -07:00
grossmj d9dcc2738d Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	Dockerfile
#	README.md
#	gns3server/appliances/infix.gns3a
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/gns3vm/virtualbox_gns3_vm.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.9bcf455e62558dedfd48.js
#	gns3server/version.py
2025-04-21 20:13:31 +07:00
grossmj e32576d5ed Development on 2.2.55.dev1 2025-04-21 19:35:13 +07:00
Jeremy Grossmann bd3657d8f3 Merge pull request #2524 from GNS3/release/v2.2.54
Release v2.2.54
2025-04-21 19:30:57 +07:00
grossmj 4418d6bb2b Release v2.2.54 2025-04-21 17:15:22 +07:00
grossmj dbcafdd314 Merge branch 'master' into 2.2 2025-04-21 17:08:59 +07:00
grossmj 4dd1803a70 Bundle web-ui v2.2.54 2025-04-21 16:40:59 +07:00
grossmj 99272fb7e0 Sync appliances 2025-04-21 16:30:32 +07:00
grossmj a24d2e25ed Add new method to find the IP address of a VBox GNS3 VM + allow NAT Network 2025-04-21 16:29:32 +07:00
grossmj a5a663bc99 Remove OVMF_CODE_4M.secboot.fd and associated code 2025-04-18 17:31:31 +07:00
grossmj 2b7eb91694 Add edk2-stable202502 UEFI firmwares and try to first use firmwares from the ovmf package if installed. Fixes #2494 2025-04-18 17:13:29 +07:00
grossmj 684770a220 Prettify TPM error message 2025-04-18 15:25:50 +07:00
grossmj f6546bf1de Fix bug in qemu_stdout message 2025-04-18 15:19:06 +07:00
grossmj 355b97398b Reduce matching error for TPM result 2025-04-18 15:13:41 +07:00
grossmj 6242a0be80 Try to detect swtpm and AppArmor issue. Ref https://github.com/GNS3/gns3-gui/issues/3725 2025-04-18 15:06:49 +07:00
grossmj 18413c923c Development on 2.2.54.dev1 2025-04-18 15:05:34 +07:00
grossmj ffd628902c Fix Docker logs decoding. Ref #2522 2025-04-18 13:58:56 +07:00
grossmj ca34053125 Add delay after starting a Docker container and adding connections in uBridge. Ref #2522 2025-04-18 13:50:20 +07:00
grossmj d06f93e772 Fix TypeError when reading Docker container logs. Ref #2522 2025-04-18 13:47:29 +07:00
grossmj 90cf73e434 Fix tests 2025-04-18 13:38:01 +07:00
grossmj aa8ccf4f82 Allow an image to be uploaded to the controller again even if it is already in the database 2025-04-17 19:07:22 +07:00
grossmj 0826b9c259 Fix controller not reporting an error if invalid options are passed to Qemu command line. Fixes #2517 2025-04-17 19:00:52 +07:00
grossmj 0e8d969cd2 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	requirements.txt
2025-04-16 17:53:44 +07:00
grossmj 0e89ff56a8 Replace "Docker hub" by "Docker repository" because it is possible to use different repositories 2025-04-16 17:42:40 +07:00
grossmj ffb5bc7ffd Upgrade aiohttp to v3.11.16 2025-04-16 17:09:09 +07:00
grossmj f00f21c4bd Upgrade dependencies 2025-04-16 17:08:08 +07:00
grossmj 773076c40e Fix unable to add NAT cloud after configuring “allowed_interfaces” in configuration file. Fixes #2508 2025-04-16 16:04:57 +07:00
grossmj 5019167098 Fix interface information API endpoint for Cloud/NAT devices 2025-04-16 15:26:56 +07:00
grossmj f525916195 Merge remote-tracking branch 'origin/3.0' into 3.0 2025-04-16 14:39:59 +07:00
grossmj 2ac3e0b39f Upgrade dependencies 2025-04-16 14:39:36 +07:00
Jeremy Grossmann e532c83538 Merge pull request #2518 from markparonyan/get-link-ifaces
Get iface/udp tunnel from links with Cloud,Nat
2025-03-23 20:10:23 +07:00
Mark Paronyan f21887dbab tests(get_iface): add unittests 2025-03-23 14:28:58 +00:00
Mark Paronyan bab173ee52 feat(get_iface): add type information in response 2025-03-23 14:28:27 +00:00
Mark Paronyan ea2856289a feat: add endpoint to get iface/udp tunnel from links with Cloud,Nat 2025-03-23 13:46:27 +00:00
grossmj 8e6f5d2b57 Merge branch '2.2' into 3.0
# Conflicts:
#	requirements.txt
2025-03-18 21:34:43 +07:00
grossmj 2e9127449c Upgrade Jinja2 to v3.1.6. Fixes #2515 2025-03-18 21:33:31 +07:00
grossmj ee9f974362 Fix packet capture for links connected to a cloud node. Fixes #2513 2025-03-16 21:12:33 +07:00
grossmj c9231d7b83 Upgrade dependencies 2025-03-16 20:26:26 +07:00
Jeremy Grossmann 483719568f Merge pull request #2511 from NAKNAO-nnct/feature/update-dockerfile-ubuntu-2404
Update Dockerfile base image to Ubuntu 24.04
2025-03-08 20:26:12 +07:00
NAKNAO-nnct 018598a300 refactor 2025-03-08 20:22:06 +09:00
NAKNAO-nnct e262a46cfd rm space 2025-03-08 20:19:37 +09:00
NAKNAO-nnct 00bf1c028b Update README to Run Docker Compose 2025-03-08 14:11:42 +09:00
NAKNAO-nnct 21ebb934f4 add compose.yaml 2025-03-08 14:08:42 +09:00
NAKNAO-nnct 2ecd2cfe3b update Ubuntu24.04 2025-03-08 13:59:05 +09:00
Jeremy Grossmann ce4b3091dd Merge pull request #2507 from GNS3/fix-remote-install-script
Improvements for remote-install.sh
2025-03-03 05:55:42 +07:00
grossmj f722816849 Improvements for remote-install.sh
* Use apt-add-repository to install repository
* Add option to not upgrade the system
* Check if Python version is >= 3.9 when installing from ppa-v3 repository
2025-03-02 22:27:53 +07:00
Jeremy Grossmann 4cb38b23eb Merge pull request #2506 from FedericoTorres233/patch-1
Check if remote-install.sh is being run as root
2025-03-02 16:14:33 +08:00
Federico Torres f3e46227d8 fix: check if remote-install.sh is being run as root 2025-03-01 16:56:21 -03:00
grossmj 3ba109c651 Development on 3.0.5.dev1 2025-02-25 22:39:38 +08:00
grossmj 3a1ad8c08b Release v3.0.4 2025-02-25 18:24:26 +08:00
grossmj edc855dcb5 Sync appliances 2025-02-25 17:12:28 +08:00
grossmj 59c2eeb536 Upgrade aiohttp to v3.11.13 2025-02-25 19:01:00 +10:00
grossmj a7f2b1fddc Require minimum 8 characters for passwords 2025-02-23 12:05:19 +10:00
grossmj 1f4071af93 Bundle web-ui v3.0.4 2025-02-23 12:04:22 +10:00
grossmj dbdb4a53c7 Sync appliances 2025-02-22 21:18:41 +10:00
grossmj 2659ab2c35 Upgrade dependencies 2025-02-22 21:10:33 +10:00
grossmj 0c3f6712b4 Fix auto idle-pc for IOS templates 2025-02-22 20:14:13 +10:00
grossmj 9122cab6c1 Update schemas to add constraints for values like ram, nvram etc. 2025-02-04 10:39:55 +10:00
grossmj 2516b1952c Install custom symbols. Fixes #2492 2025-01-29 18:32:04 +10:00
grossmj f2bb785037 Remove txt files in custom symbols 2025-01-29 18:25:06 +10:00
grossmj fc938a069b Sync appliances 2025-01-29 18:24:04 +10:00
grossmj 4fd41991db Fix VMware add ubridge connection. Fixes #2490 2025-01-27 12:12:43 +10:00
grossmj cfc4bb371a Upgrade FastAPI to v0.115.7 2025-01-23 13:32:11 +10:00
grossmj ce59e84e13 Development on 3.0.4 2025-01-23 13:31:32 +10:00
grossmj b5e2bb1561 Release v3.0.3 2025-01-22 19:06:42 +10:00
grossmj 3003ed1465 Bundle web-ui v3.0.3 2025-01-22 18:57:21 +10:00
grossmj 09774a3a56 Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/compute/virtualbox/virtualbox_vm.py
#	gns3server/controller/compute.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.c83939cdfe3af0ec27df.js
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
#	tests/controller/test_compute.py
2025-01-22 18:37:17 +10:00
Jeremy Grossmann 185cd01e19 Merge pull request #2488 from GNS3/release/v2.2.53
Release v2.2.53
2025-01-21 09:47:43 +07:00
grossmj 369fcaa512 Release v2.2.53 2025-01-21 11:52:11 +10:00
grossmj 7b7d3d676f Bundle web-ui v2.2.53 2025-01-21 11:43:11 +10:00
grossmj d1186b2acc Sync appliances 2025-01-21 11:29:28 +10:00
grossmj bd58196817 Add more information when patching .vbox file. Ref https://github.com/GNS3/gns3-gui/issues/3542 2025-01-20 13:22:22 +10:00
Jeremy Grossmann b3a822df8f Merge pull request #2487 from GNS3/upgrade-tests
Refactor tests and upgrade dev package requirements
2025-01-17 16:38:32 +07:00
grossmj ba4e0c945d Refactor tests and upgrade dev package requirements 2025-01-17 19:12:44 +10:00
Jeremy Grossmann f6725a37dd Merge pull request #2486 from GNS3/feature/args-parsing
Refactor command line arguments parsing
2025-01-17 08:26:05 +07:00
grossmj 8e96c4c2e8 Refactor command line arguments parsing 2025-01-17 07:57:42 +07:00
grossmj 035a104957 Fix capture on IOU/IOL links. Fixes #2477 2025-01-11 18:46:55 +07:00
grossmj 54c0b383cb Use Python 3.9 to publish API documentation 2025-01-08 00:03:18 +07:00
grossmj 7c0384a8d4 Development on 3.0.3.dev1 2025-01-07 11:12:02 +07:00
grossmj 469bd692a0 Release v3.0.2 2025-01-03 21:44:00 +07:00
grossmj d34c3a0ac7 Bundle web-ui v3.0.2 2025-01-03 21:40:11 +07:00
Jeremy Grossmann fb3409c1a1 Merge pull request #2474 from GNS3/install-all-images
Support to create templates based on image checksums
2025-01-03 21:38:59 +07:00
grossmj 08693871ae Support to create templates based on image checksums. 2025-01-03 21:35:14 +07:00
Jeremy Grossmann f5ea20347e Merge pull request #2472 from GNS3/builtin-disks-improvements
Improvements for built-in disks
2025-01-03 20:01:06 +07:00
grossmj ac4c5f5985 Improve tests for pruning images 2025-01-03 19:56:41 +07:00
grossmj e17a79e261 Fix tests 2025-01-02 23:17:55 +07:00
grossmj 4758431c76 Improvements for built-in disks
* Checksum is updated in the database for updated disks.
* It is not possible to prune them.
2025-01-02 23:10:51 +07:00
Jeremy Grossmann b472f6dbf8 Merge pull request #2471 from GNS3/watchdog-migration
Watchdog migration
2024-12-31 17:30:24 +07:00
grossmj b39c7541fb Add timeout for waiting watchdog observer thread to complete 2024-12-31 17:24:19 +07:00
grossmj 82779d816f Use watchdog instead of watchfiles to monitor for new images on the file system 2024-12-31 17:19:32 +07:00
grossmj ccc8974d92 Fix tests 2024-12-30 16:14:33 +07:00
grossmj 0090ff3722 Increase timeout to run compute HTTP queries. Fixes #2461 2024-12-30 16:10:04 +07:00
Jeremy Grossmann 96c6805ace Merge pull request #2469 from GNS3/joserfc-migration
Replace python-jose library by joserfc
2024-12-30 16:02:17 +07:00
grossmj efb84b3063 Add back ValidationError 2024-12-30 15:59:01 +07:00
Jeremy Grossmann 0be45c7da2 Merge branch '3.0' into joserfc-migration 2024-12-30 15:52:54 +07:00
Jeremy Grossmann a4222b4d03 Merge pull request #2470 from GNS3/drop-python3.8
Drop Python 3.8
2024-12-30 15:51:23 +07:00
grossmj 5f75fc7573 Add greenlet dependency 2024-12-30 15:45:17 +07:00
grossmj 5269d4386c Drop Python 3.8 2024-12-30 15:36:40 +07:00
grossmj 9d6cea665a Replace python-jose library by joserfc 2024-12-30 15:25:24 +07:00
grossmj 2c727c6bd2 Use 'allow_methods="*"' in aiohttp_cors.ResourceOptions(). Fixes #2459 2024-12-30 11:06:19 +07:00
grossmj 13b0caef4f Upgrade dependencies 2024-12-30 10:49:35 +07:00
grossmj 8b57fbaa0a Downgrade uvicorn to v0.33.0 2024-12-28 18:23:46 +07:00
grossmj d4a9a21af9 Upgrade dependencies 2024-12-28 18:21:18 +07:00
grossmj 8a900588ca Merge branch '2.2' into 3.0 2024-12-28 18:04:25 +07:00
grossmj 8ed1fa6ad5 Merge branch 'master' into 2.2 2024-12-28 18:03:39 +07:00
Jeremy Grossmann a689a55937 Merge pull request #2467 from GNS3/update-remote-install-script
Use iptables to block IOU home call
2024-12-28 18:01:25 +07:00
grossmj 1c0b0ae423 Remove blocking IOU phone home call. 2024-12-28 18:00:22 +07:00
grossmj ad7813d04b Use iptables to block IOU home call 2024-12-28 17:50:59 +07:00
grossmj 654b84cb7b Release v3.0.1 2024-12-27 21:05:24 +07:00
grossmj fc1acc58de Sync appliances 2024-12-27 21:01:23 +07:00
grossmj 07ac4f5834 Bundle web-ui v3.0.1 2024-12-27 21:00:58 +07:00
grossmj 249bf89b7e Allow for upgrading built-in disks 2024-12-26 23:04:47 +07:00
grossmj efc3ff62b5 Fix config parsing when configuring server protocol. Fixes https://github.com/GNS3/gns3-gui/issues/3681 2024-12-26 16:36:52 +07:00
grossmj a521e61efc Update empty Qemu disks with correct MD5 checksums 2024-12-23 22:45:36 +07:00
grossmj 9492fd0671 Fix tests 2024-12-22 22:34:23 +07:00
grossmj 512407939d Increase timeout to run compute HTTP queries. Fixes #3453 2024-12-22 22:29:56 +07:00
Jeremy Grossmann 685bf88005 Merge pull request #2457 from GNS3/update-remote-install-script
Update remote install script
2024-12-22 22:07:33 +07:00
grossmj a1090a3da8 Fallback when cannot use deb822 format 2024-12-22 21:52:18 +07:00
grossmj c8e5b41f39 Add compatibility for earlier Ubuntu versions 2024-12-22 21:29:05 +07:00
grossmj 94b5d3e636 Update remote-install.sh to support a custom repository and the deb822 source format 2024-12-22 20:26:24 +07:00
grossmj d54e6babe2 Release v3.0.0 2024-12-20 18:20:42 +07:00
grossmj a9b7869e04 Bundle web-ui v3.0.0 2024-12-19 19:49:40 +07:00
grossmj 72838a8108 Sync appliances 2024-12-19 19:04:19 +07:00
grossmj 7229707746 Use static favicon for API docs. Ref #3674 2024-12-19 17:25:42 +07:00
Jeremy Grossmann c9694a4e1d Merge pull request #2456 from GNS3/feature/self-hosted-static-files
Configure self-hosting JavaScript and CSS for docs
2024-12-19 17:10:48 +07:00
grossmj a792792128 Remove debug message 2024-12-19 17:09:00 +07:00
grossmj eca502c49c Do not test authentication on docs endpoints 2024-12-19 17:04:00 +07:00
grossmj 0ee73605c0 Configure self-hosting JavaScript and CSS for docs 2024-12-19 16:54:11 +07:00
grossmj 648ae231ef Fix project auto open feature. Fixes #2455 2024-12-18 18:40:31 +07:00
grossmj 0dd53d3178 Bump version to 3.0.0.dev14 2024-12-17 16:51:09 +07:00
grossmj 09d67ec1a8 Bump version to 3.0.0.dev13 2024-12-17 16:32:30 +07:00
grossmj c820a807ad Fix IOU node start 2024-12-17 16:24:42 +07:00
grossmj 014d3f2ad9 Store IOU licence in the secrets directory and disable the check by default 2024-12-17 16:12:17 +07:00
grossmj 5e1b8814b6 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/iou/iou_vm.py
2024-12-17 15:08:45 +07:00
grossmj df56955bf0 Use license instead of licence 2024-12-17 15:01:01 +07:00
grossmj b84bedffec Merge branch '2.2' into 3.0
# Conflicts:
#	tests/utils/test_images.py
2024-12-16 18:31:57 +07:00
grossmj 423d3fd82b Fix tests 2024-12-16 18:30:30 +07:00
grossmj e1b4d74f1e Merge branch '2.2' into 3.0 2024-12-16 18:17:01 +07:00
grossmj 86fbae00e1 Fix issue with iourc_path 2024-12-16 18:16:42 +07:00
grossmj f38efd311a Merge branch '2.2' into 3.0 2024-12-16 18:14:16 +07:00
grossmj 91e9fa1cbc Fix tests 2024-12-16 18:13:51 +07:00
grossmj db067579db Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/iou/iou_vm.py
2024-12-16 18:08:51 +07:00
grossmj 6314dd3c35 Fix: do not use the iourc file if IOU licence check is not enabled 2024-12-16 18:07:02 +07:00
grossmj 4e41aefbdb Require "Project.Audit" permission to duplicate a project and check if "Project.Allocate" permission for the destination. 2024-12-06 14:09:08 +10:00
grossmj bbff6974e6 Fix undefined name 'default_directory' 2024-12-02 14:36:58 +10:00
grossmj c05dcef54f Fix formatting issue 2024-12-02 13:18:12 +10:00
grossmj b7d43b29cd Fix tests after merging 2024-12-02 13:02:08 +10:00
grossmj cbaa563996 Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.9297104511b6616fc55c.js
#	gns3server/utils/images.py
#	gns3server/version.py
#	tests/api/routes/compute/test_dynamips_nodes.py
#	tests/handlers/api/compute/test_qemu.py
#	tests/utils/test_images.py
2024-12-02 12:16:34 +10:00
Jeremy Grossmann e94b55e3bf Merge pull request #2452 from GNS3/release/v2.2.52
release/v2.2.52
2024-12-02 11:36:09 +10:00
grossmj 6c521b5f7a Development on 2.2.53.dev1 2024-12-02 11:33:59 +10:00
grossmj a8014da10b Release v2.2.52 2024-12-02 11:14:23 +10:00
grossmj f6080013e3 Bundle web-ui v2.2.52 2024-12-02 11:09:30 +10:00
grossmj fc54c6e496 Sync appliances 2024-12-02 11:02:47 +10:00
Jeremy Grossmann 04cd107651 Merge pull request #2448 from GNS3/bugfix/3664
Fix listing images
2024-11-28 12:45:37 +10:00
grossmj 19cabdfde6 Use log.debug for some messages in images.py 2024-11-28 12:42:50 +10:00
grossmj af7fbe6bb4 Fix tests 2024-11-27 15:18:49 +10:00
grossmj 3d58b437b4 Remove restrictions based on file extension when listing images and fix ELF header checks 2024-11-27 14:51:34 +10:00
grossmj 83921a45df Fix use project name instead of ID for fast duplication when running local server. Fixes #2446 2024-11-26 12:07:06 +10:00
grossmj b2db8896ea Release v3.0.0rc2 2024-11-20 14:00:49 +10:00
grossmj a22f7ac3d2 Bundle web-ui v3.0.0rc2 2024-11-20 13:51:15 +10:00
grossmj e19af851c1 Sync appliances 2024-11-20 12:39:39 +10:00
grossmj a00f53fbaa Fix error 500 on PUT for cloud, nat, vmware and vpcs nodes. Fixes #2426 2024-11-19 12:21:35 +10:00
Jeremy Grossmann 8db81de153 Merge pull request #2445 from GNS3/bugfix/2426
Fix issue with asyncio.Queue
2024-11-18 14:00:20 +10:00
Jeremy Grossmann fa0d7d7529 Use call_soon_threadsafe() in notification manager 2024-11-18 12:13:41 +10:00
grossmj bd813b0a53 Merge branch '2.2' into 3.0
# Conflicts:
#	requirements.txt
#	setup.py
2024-11-18 11:46:42 +10:00
grossmj b37db57bb9 Fix tests 2024-11-17 15:00:13 +10:00
grossmj 31a2cb998d Fix issue with asyncio.Queue which is not thread safe. 2024-11-17 14:39:22 +10:00
grossmj e83e12b51a Add a duplicated project in the same resource pools as the original project if it is in any 2024-11-17 14:03:47 +10:00
grossmj a7da814b85 Upgrade FastAPI to v0.115.5 2024-11-13 12:10:04 +10:00
Jeremy Grossmann 11c9802268 Merge pull request #2443 from GNS3/feature/upgrade-resource-files
Overwrite user resources when the originals have changed
2024-11-10 18:30:13 +10:00
grossmj a60e0d424d Overwrite user resources when the originals have changed.
Excepting configs and disks which can be customized.
2024-11-09 12:17:06 +10:00
grossmj db1fb29c63 Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy 2024-11-08 12:46:55 +10:00
Jeremy Grossmann 1a6a729736 Merge pull request #2442 from Xatrekak/master
Fixed issues with installing on Ubuntu 24.04 via remote-install.sh
2024-11-08 10:02:43 +10:00
Dustin 77c356c82c Update remote-install.sh
Fixes for Ubuntu 24.04
2024-11-07 18:15:52 -05:00
Dustin b4819b5500 Update remote-install.sh
Fixing changes for Ubuntu 24.04
2024-11-07 17:44:42 -05:00
grossmj ec9dbd20b8 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/crash_report.py
#	gns3server/version.py
2024-11-07 23:18:42 +10:00
grossmj a5f0dba5cf Development on 2.2.52.dev1 2024-11-07 23:13:31 +10:00
Jeremy Grossmann 11a9451098 Merge pull request #2440 from GNS3/release/v2.2.51
release/v2.2.51
2024-11-07 23:13:03 +10:00
grossmj 754680d8e9 Release v2.2.51 2024-11-07 15:08:27 +10:00
grossmj 05773ce189 Sync appliances 2024-11-07 15:06:06 +10:00
grossmj aeae9deb01 Merge remote-tracking branch 'origin/2.2' into 2.2 2024-11-07 14:53:23 +10:00
grossmj f3749e83ec Catch error when cannot resize Docker container TTY. 2024-11-07 14:52:59 +10:00
Jeremy Grossmann c2db4e8542 Merge pull request #2439 from GNS3/bugfix/2438
Fix disk interface is being overriden when set to none
2024-11-07 14:52:08 +10:00
grossmj 52a7696618 Fix tests 2024-11-07 14:48:57 +10:00
grossmj 7bf17392dd Do not use "ide" if there is a disk image and no interface type has been explicitly configured. 2024-11-07 14:37:26 +10:00
grossmj 2718224dde Increase SQLite timeout. Ref #2422 2024-10-31 21:31:03 +10:00
Jeremy Grossmann 0122070b29 Merge pull request #2435 from GNS3/upgrade-dependencies
Upgrade dependencies
2024-10-31 20:56:30 +10:00
grossmj 345ecb7630 Upgrade dev dependencies 2024-10-31 20:49:12 +10:00
grossmj ae538dd11d Fix test user with wrong creds 2024-10-31 19:31:17 +10:00
grossmj ce4dd17409 Upgrade fastapi and fix tests 2024-10-31 19:23:28 +10:00
grossmj 8c7c17b889 Upgrade dependencies and fix Pydantic warnings 2024-10-31 17:09:52 +10:00
grossmj 1530bdfc2b Disable Python 3.13 testing 2024-10-31 13:53:25 +10:00
grossmj 74d07173c1 Upgrade aiohttp to v3.10.10. Fixes #2411 2024-10-31 13:48:22 +10:00
grossmj ec300d19d4 Replace aiohttp.web.HTTPConflict() 2024-10-31 13:11:01 +10:00
grossmj fb06eb3c0c Remove old debug message 2024-10-31 13:07:09 +10:00
grossmj 7e902726bf Fix issues after merge 2024-10-31 13:06:17 +10:00
grossmj c4fcb43e78 Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	README.md
#	dev-requirements.txt
#	gns3server/compute/docker/docker_vm.py
#	gns3server/controller/export_project.py
#	gns3server/controller/import_project.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.df8c319a3da6fb0e3629.js
#	gns3server/version.py
#	requirements.txt
#	setup.py
#	tests/compute/docker/test_docker_vm.py
#	tests/controller/test_import_project.py
2024-10-31 12:54:35 +10:00
grossmj 753135a80d Merge branch 'master' into 2.2 2024-10-28 17:32:34 +10:00
grossmj c05e1cb8e7 Use @locking when sending uBridge commands. Ref https://github.com/GNS3/gns3-gui/issues/3651 2024-10-28 13:02:04 +10:00
grossmj 48b7e6ca50 Fix run Docker containers with user namespaces enabled. Fixes #2414 2024-10-26 19:03:05 +10:00
grossmj dbe2b8a5fb Python 3.13 support 2024-10-26 18:38:07 +10:00
grossmj 80487eb62d Upgrade dependencies 2024-10-26 18:22:40 +10:00
grossmj 6e66b26b88 Fix errors in init.sh. Fixes #2431 2024-10-22 12:18:28 +10:00
grossmj 9990666076 Development on 2.2.51.dev1 2024-10-21 13:24:14 +10:00
Jeremy Grossmann 97e5a5edc3 Merge pull request #2430 from GNS3/2.2
Release v2.2.50
2024-10-21 13:21:24 +10:00
grossmj 2b5c6ce8fb Release v2.2.50 2024-10-21 12:14:18 +10:00
grossmj 0aac62d03a Bundle web-ui v2.2.50 2024-10-21 12:08:42 +10:00
grossmj 4058abf16e Sync appliances 2024-10-21 11:54:02 +10:00
grossmj 4357410b10 Do not run tests on Windows (temporarily) 2024-10-19 17:13:13 +10:00
grossmj 734365b216 Fix win10pcap installation in tests 2024-10-19 17:04:10 +10:00
grossmj abb7cc2075 Install win10pcap in tests 2024-10-19 17:00:32 +10:00
grossmj c273a78560 Upgrade pytest to v8.3.3 2024-10-19 16:33:54 +10:00
grossmj 718269e5b3 Fix syntax error in testing.yml 2024-10-19 16:23:46 +10:00
grossmj 19fd7d2193 Install Windows dependencies in GH Actions 2024-10-19 16:22:29 +10:00
grossmj e62ffb1b87 Fix testing on Windows with GH Actions 2024-10-19 16:12:06 +10:00
grossmj 42808161bf Replace AppVeyor testing with GH Actions 2024-10-19 16:07:53 +10:00
Jeremy Grossmann 45ee662c56 Merge pull request #2428 from GNS3/bugfix/2427
Symbolic links support for project export/import
2024-10-19 15:54:41 +10:00
grossmj 24bfc205db Symbolic links support for project export/import 2024-10-19 15:49:23 +10:00
grossmj cb46c0fbcc Merge remote-tracking branch 'origin/2.2' into 2.2 2024-10-14 17:48:42 +10:00
grossmj 35256901b5 Add comment to indicate sentry-sdk is optional. Ref https://github.com/GNS3/gns3-server/issues/2423 2024-10-14 17:46:53 +10:00
Jeremy Grossmann 6933c3d938 Merge pull request #2420 from GNS3/bugfix/2419
Fix issues with recent busybox versions
2024-10-01 17:37:44 +07:00
grossmj 8af71ee291 Formatting 2024-10-01 17:35:11 +07:00
grossmj c0be6875c2 Fix issues with recent busybox versions
* `busybox --install` does not exist
* `sleep` does not take float values (e.g. 0.5).
2024-10-01 17:31:29 +07:00
Jeremy Grossmann a1922ef067 Merge pull request #2413 from z5241248/master
Duplicate faster
2024-09-29 19:44:49 +07:00
grossmj cafdb2522b Add / update docstrings 2024-09-29 19:42:06 +07:00
grossmj f7996d5e98 Fix tests 2024-09-27 20:05:06 +07:00
grossmj 996dad2f5c Support to reset MAC addresses for Docker nodes and some adjustments for fast duplication. 2024-09-26 18:41:23 +07:00
Jeremy Grossmann 1332e940fd Merge branch '2.2' into master 2024-09-26 16:26:56 +07:00
grossmj 19bd953d31 Update README.md to change the minimum required Python version. 2024-09-26 16:25:26 +07:00
赵昕彧 3a896b6964 Duplicate faster - 2 2024-09-26 08:26:08 +08:00
grossmj 441f0fb1b5 Merge remote-tracking branch 'z5241248/master' into fork/z5241248/master 2024-09-25 19:45:44 +07:00
grossmj a02b57698a Add missing imports 2024-09-25 19:45:14 +07:00
Jeremy Grossmann 7582107ae5 Merge branch '2.2' into master 2024-09-25 19:41:40 +07:00
赵昕彧 2dbde5df22 Copying project files directly, rather than copying them in an import-export fashion, can make copying projects many times faster 2024-09-25 20:27:46 +08:00
grossmj a7b56739a9 Fixes after merging 2024-09-23 14:08:24 +07:00
grossmj 8ce0cbf7f7 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/dynamips/nodes/c1700.py
#	gns3server/compute/dynamips/nodes/c2600.py
#	gns3server/compute/dynamips/nodes/c2691.py
#	gns3server/compute/dynamips/nodes/c3600.py
#	gns3server/compute/dynamips/nodes/c3725.py
#	gns3server/compute/dynamips/nodes/c3745.py
#	gns3server/compute/dynamips/nodes/c7200.py
#	gns3server/compute/dynamips/nodes/router.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/node.py
#	gns3server/controller/topology.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/schemas/docker.py
#	gns3server/schemas/docker_template.py
#	gns3server/schemas/dynamips_template.py
#	gns3server/schemas/dynamips_vm.py
#	gns3server/schemas/node.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
2024-09-23 13:28:56 +07:00
grossmj 7b5d123ad8 Improve error message when a project cannot be parsed. 2024-09-23 13:23:03 +07:00
Jeremy Grossmann d1a7474ef6 Merge pull request #2418 from GNS3/revert-2417-backport-aux-console-support
Revert "Backport auxiliary console support for Qemu, Docker and Dynamips nodes"
2024-09-23 13:15:34 +07:00
Jeremy Grossmann af6f34b2ca Revert "Backport auxiliary console support for Qemu, Docker and Dynamips nodes" 2024-09-23 13:10:58 +07:00
grossmj d3138daa23 Fix Docker tests 2024-09-22 22:12:40 +07:00
grossmj 967c7d066d Delete old code after merging 2024-09-22 22:02:14 +07:00
grossmj 7619080a50 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/dynamips/nodes/c1700.py
#	gns3server/compute/dynamips/nodes/c2600.py
#	gns3server/compute/dynamips/nodes/c2691.py
#	gns3server/compute/dynamips/nodes/c3600.py
#	gns3server/compute/dynamips/nodes/c3725.py
#	gns3server/compute/dynamips/nodes/c3745.py
#	gns3server/compute/dynamips/nodes/c7200.py
#	gns3server/compute/dynamips/nodes/router.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/node.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/schemas/docker.py
#	gns3server/schemas/docker_template.py
#	gns3server/schemas/dynamips_template.py
#	gns3server/schemas/dynamips_vm.py
#	gns3server/schemas/node.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
2024-09-22 22:01:06 +07:00
Jeremy Grossmann f1294cf267 Merge pull request #2417 from GNS3/backport-aux-console-support
Backport auxiliary console support for Qemu, Docker and Dynamips nodes
2024-09-22 21:44:31 +07:00
grossmj 74782d413f Change method to allocate AUX console for existing Dynamips nodes 2024-09-22 21:41:10 +07:00
grossmj c41c11eb34 Backport auxiliary console support for Qemu, Docker and Dynamips nodes 2024-09-22 18:29:04 +07:00
Jeremy Grossmann 1f09a3e6bc Merge pull request #2416 from GNS3/bugfix/2414
Run Docker containers with user namespaces enabled
2024-09-19 11:01:11 +07:00
grossmj 22f022cc22 Fix for running Docker containers with user namespaces enabled 2024-09-19 10:40:22 +07:00
grossmj 8429494280 Test base MAC address for Docker VMs 2024-09-19 10:19:07 +07:00
grossmj a1666dd247 Fix MAC address support for Docker containers 2024-09-18 18:02:35 +07:00
grossmj 3214f52e9e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/schemas/docker.py
#	gns3server/schemas/docker_template.py
#	tests/compute/docker/test_docker_vm.py
2024-09-18 17:29:06 +07:00
grossmj ddd6235acd Merge branch 'master' into 2.2 2024-09-18 17:14:21 +07:00
Jeremy Grossmann bcc148bbd2 Merge pull request #2415 from GNS3/docker-mac-address
Support for custom MAC addresses in Docker containers
2024-09-18 04:05:18 -06:00
grossmj 3792901dc7 Support for configuring MAC address in Docker containers 2024-09-18 16:30:22 +07:00
赵昕彧 5ffe5fd9b3 Copying project files directly, rather than copying them in an import-export fashion, can make copying projects many times faster 2024-08-23 14:31:21 +08:00
grossmj 9bcf26b943 Release v3.0.0rc1 2024-08-11 11:35:19 -06:00
grossmj b80e1f3a22 Downgrade aiohttp to v3.9.5 2024-08-11 11:22:20 -06:00
grossmj ba13b0b078 Bundle web-ui v3.0.0rc1 2024-08-11 11:09:27 -06:00
grossmj 90c69d95ad Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.99a70a8d013fc974361c.js
#	gns3server/version.py
#	requirements.txt
2024-08-10 18:58:43 -06:00
grossmj 69a5b16bad Upgrade aiohttp to v3.10.3 2024-08-11 01:34:30 +02:00
grossmj 21a5c5d3f2 Development on 2.2.50.dev1 2024-08-06 20:33:54 +02:00
Jeremy Grossmann 225779bc11 Merge pull request #2409 from GNS3/2.2
Release v2.2.49
2024-08-06 20:32:41 +02:00
grossmj b1209155f5 Release v2.2.49 2024-08-06 12:55:15 +02:00
grossmj 7cebb9472a Bundle web-ui v2.2.49 2024-08-06 12:41:06 +02:00
grossmj 00c3b1abc1 Merge remote-tracking branch 'origin/master' into 2.2 2024-08-06 12:37:55 +02:00
grossmj b1c1c0520c Sync appliances 2024-08-06 12:34:07 +02:00
grossmj 2bb26075f0 Forbid -nic and -nicdev in Qemu additional options. Fixes https://github.com/GNS3/gns3-server/issues/2397 2024-08-05 17:51:46 +02:00
grossmj 54e436394f Upgrade packages in requirements.txt 2024-08-03 16:35:17 +02:00
grossmj 9046c60811 Fix tests by downgrading pytest-asyncio 2024-08-03 13:15:36 +02:00
grossmj 24cace8122 Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	dev-requirements.txt
#	requirements.txt
#	setup.py
2024-08-03 12:58:19 +02:00
grossmj 6746ef39be Upgrade development packages 2024-08-03 12:32:43 +02:00
grossmj 8889eaa439 Upgrade jsonschema and sentry-sdk packages 2024-08-03 12:32:06 +02:00
grossmj 95a4c284bc Update IOU base configs to use "no ip domain lookup". Fixes #2404 2024-07-22 19:07:17 +02:00
Jeremy Grossmann 9a3bd2ee0c Merge pull request #2406 from GNS3/feature/convert-invalid-node-names
Convert node hostnames for topologies
2024-07-20 18:01:50 +02:00
grossmj 2416069a6e Update _convert_2.2.0() with correct comments 2024-07-20 17:55:38 +02:00
grossmj eefb3d87b2 Fix tests and add conversion test 2024-07-20 17:47:25 +02:00
grossmj 999f41b03e Convert topologies < 3.0 to have valid node hostnames 2024-07-20 17:22:24 +02:00
grossmj ea339af1e9 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.a1204c9aa64b1cc15d28.js
2024-07-13 17:19:03 +02:00
grossmj 6951137a25 Development on 2.2.49.dev1 2024-07-13 16:32:13 +02:00
Jeremy Grossmann cccbca3d5e Merge pull request #2401 from GNS3/release/v2.2.48.1
Release v2.2.48.1
2024-07-13 14:43:53 +02:00
grossmj 8659439829 Release v2.2.48.1 2024-07-12 18:26:16 +02:00
grossmj 677bc389a5 Bundle web-ui v2.2.48.1 2024-07-11 23:44:24 +02:00
grossmj 3f7f5a3cda Fix to access resources_path and install_builtin_appliances settings 2024-07-09 12:28:39 +02:00
grossmj 59ad5c55ec Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/config_samples/gns3_server.conf
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.b65e52314df938ebe652.js
#	gns3server/version.py
2024-07-09 12:14:44 +02:00
grossmj 4a58ede550 Development on 2.2.49.dev1 2024-07-09 00:32:44 +02:00
Jeremy Grossmann 3f5b0bb514 Merge pull request #2395 from GNS3/2.2
Release v2.2.48
2024-07-09 00:30:55 +02:00
grossmj 6e8e0764c1 Release v2.2.48 2024-07-08 18:44:09 +02:00
grossmj eaa18ad624 Bundle web-ui v2.2.48 2024-07-08 18:24:02 +02:00
grossmj 0a32be276e Sync appliances 2024-07-08 18:18:25 +02:00
Jeremy Grossmann 271c958381 Merge pull request #2394 from GNS3/bugfix/2226
New path settings for the server config
2024-07-08 18:16:27 +02:00
grossmj ca1d99b112 Add 'install_builtin_appliances' and 'resources_path' settings in the server config 2024-07-08 18:06:33 +02:00
grossmj 6b14abc06f Add allow_unsafe_options for Qemu settings 2024-07-07 19:08:12 +02:00
grossmj 6ed18c561f Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/config_samples/gns3_server.conf
#	gns3server/controller/export_project.py
#	gns3server/controller/project.py
#	gns3server/controller/snapshot.py
#	gns3server/handlers/api/controller/project_handler.py
#	tests/controller/test_export_project.py
#	tests/controller/test_import_project.py
#	tests/controller/test_snapshot.py
2024-07-07 19:04:50 +02:00
Jeremy Grossmann 90dce03da2 Merge pull request #2392 from GNS3/bugfix/2385
Forbid unsafe Qemu additional options
2024-07-06 17:18:59 +02:00
Jeremy Grossmann b48bd92da3 Merge pull request #2393 from GNS3/feature/keep-compute-ids
Option to keep the compute IDs unchanged when exporting a project
2024-07-06 17:12:38 +02:00
grossmj d54c9db8c3 Option to keep the compute IDs unchanged when exporting a project 2024-07-06 17:08:16 +02:00
grossmj b194e48649 Forbid unsafe Qemu additional options 2024-07-06 12:24:22 +02:00
Jeremy Grossmann 29f848d833 Merge pull request #2391 from GNS3/bugfix/2388
Fix issues with invalid snapshot filenames
2024-07-05 12:49:59 +02:00
grossmj 08154e43aa Fix error when snapshot exists with an underscore in the name 2024-07-05 12:04:53 +02:00
grossmj 45a0644371 Upgrade request and sqlalchemy packages 2024-07-03 19:05:05 +02:00
grossmj 3a4ffb8786 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/utils/__init__.py
#	requirements.txt
2024-07-03 19:00:44 +02:00
grossmj 84efc55d02 Upgrade sentry-sdk, psutil and aiofiles packages 2024-07-03 18:53:14 +02:00
grossmj fec0220b55 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2024-07-01 18:53:21 +02:00
Jeremy Grossmann a58fb320ac Merge pull request #2387 from GNS3/bugfix/3588
Fix check to test if IPv6 is enabled on host
2024-06-17 16:54:20 +02:00
grossmj 39057bd781 Fix check for IPv6 enabled on host 2024-06-17 16:41:40 +02:00
grossmj 0f3b96f134 Development on 2.2.48.dev1 2024-05-23 12:19:15 +07:00
grossmj df210386dd Development on 3.0.0.dev14 2024-05-19 20:57:11 +07:00
grossmj 3e512e650a Release v3.0.0b3 2024-05-19 17:23:16 +07:00
grossmj e50e2c90bd Bundle web-ui v3.0.0b3 2024-05-19 17:16:52 +07:00
grossmj c1f9f1111d Sync appliances 2024-05-19 17:13:07 +07:00
grossmj 8c1dbf0084 Fix to allow duplicating IOS routers 2024-05-19 00:33:55 +07:00
grossmj 6f2b12c218 Fix to allow changing the auxiliary console for IOS router nodes. 2024-05-18 23:43:50 +07:00
grossmj 4b1068e02f Replace deprecated method datetime.utcnow() 2024-05-18 23:33:26 +07:00
grossmj d56acc5844 Upgrade FastAPI to v0.111.0 2024-05-18 23:31:22 +07:00
grossmj d477eb8366 Fix reset console for non running IOU devices 2024-05-18 23:30:58 +07:00
Jeremy Grossmann 35f94b0c73 Merge pull request #2382 from GNS3/update-ga-workflows
Update GitHub Action workflows
2024-05-17 12:22:43 +07:00
grossmj b82b9a64e6 Rename codeql.yml back to codeql-analysis.yml 2024-05-17 12:19:38 +07:00
grossmj 901652aaeb Update GitHub Action workflows 2024-05-17 12:14:47 +07:00
grossmj 990dabb7e4 Do not allow to create a builtin template using the API. 2024-05-17 00:05:25 +07:00
grossmj 3ab74b8094 Development on 3.0.0.dev13 2024-05-16 19:18:53 +07:00
grossmj 5cd540d94d Remove old files 2024-05-16 17:57:51 +07:00
grossmj d3860ba84b Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	dev-requirements.txt
#	gns3server/compute/qemu/__init__.py
#	gns3server/compute/vmware/__init__.py
#	gns3server/controller/snapshot.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/compute/atm_switch_handler.py
#	gns3server/run.py
#	gns3server/static/web-ui/26.77d4bfd104f37c42e028.js
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/runtime.415291667f70565cd8ef.js
#	gns3server/utils/__init__.py
#	gns3server/utils/images.py
#	gns3server/utils/interfaces.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	pytest.ini
#	requirements.txt
#	scripts/update-bundled-web-ui.sh
#	setup.py
#	tests/api/routes/compute/test_dynamips_nodes.py
#	tests/compute/builtin/nodes/test_cloud.py
#	tests/compute/docker/test_docker.py
#	tests/compute/docker/test_docker_vm.py
#	tests/compute/dynamips/test_dynamips_manager.py
#	tests/compute/dynamips/test_dynamips_router.py
#	tests/compute/iou/test_iou_vm.py
#	tests/compute/qemu/test_qcow2.py
#	tests/compute/qemu/test_qemu_manager.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/compute/test_base_node.py
#	tests/compute/test_manager.py
#	tests/compute/test_project.py
#	tests/compute/traceng/test_traceng_vm.py
#	tests/compute/virtualbox/test_virtualbox_manager.py
#	tests/compute/virtualbox/test_virtualbox_vm.py
#	tests/compute/vmware/test_vmware_manager.py
#	tests/compute/vmware/test_vmware_vm.py
#	tests/compute/vpcs/test_vpcs_vm.py
#	tests/conftest.py
#	tests/controller/gns3vm/test_remote_gns3_vm.py
#	tests/controller/gns3vm/test_virtualbox_gns3_vm.py
#	tests/controller/gns3vm/test_vmware_gns3_vm.py
#	tests/controller/test_export_project.py
#	tests/controller/test_gns3vm.py
#	tests/controller/test_import_project.py
#	tests/test_config.py
#	tests/utils/test_asyncio.py
#	tests/utils/test_images.py
#	tests/web/test_response.py
2024-05-16 17:53:39 +07:00
grossmj 3e133eda44 Bundle web-ui v3.0.0b3 2024-05-16 17:30:12 +07:00
grossmj e01256980c Sync appliances 2024-05-16 17:27:38 +07:00
grossmj aabfe9eadc Use cryptography backend for python-jose. Ref #2372 2024-05-16 15:01:05 +07:00
Jeremy Grossmann 6c9a3b634b Merge pull request #2381 from GNS3/release/v2.2.47
Release v2.2.47
2024-05-15 17:06:53 +07:00
grossmj 0561aba927 Release v2.2.47 2024-05-15 12:14:48 +07:00
grossmj 86a78f53cb Fix update-bundled-web-ui.sh script 2024-05-15 12:05:43 +07:00
grossmj f0bc74ff6e Bundle web-ui v2.2.47 2024-05-15 12:04:34 +07:00
grossmj f81128f717 Bundle web-ui v2.2.47 2024-05-15 11:55:47 +07:00
grossmj 9ce505cad3 Sync appliances 2024-05-15 11:43:04 +07:00
grossmj 314e01d2b4 Ensure Python >= 3.8 is used in pyproject.toml 2024-05-12 16:44:09 +07:00
Jeremy Grossmann 6b8635f7d5 Merge pull request #2380 from GNS3/drop-python3.7
Drop Python 3.7
2024-05-09 19:10:04 +07:00
grossmj 388ffe9f00 Change sentry-sdk version 2024-05-09 19:03:08 +07:00
grossmj d01129a3cf Upgrade aiohttp, sentry-sdk and truststore 2024-05-09 18:58:37 +07:00
grossmj 535ea0ad9f Upgrade jsonschema and aiohttp 2024-05-09 18:37:40 +07:00
grossmj ccb5de6df1 Drop Python 3.7 2024-05-09 18:23:58 +07:00
Jeremy Grossmann cdcfc652db Merge pull request #2379 from GNS3/fix-warnings-in-tests
Fix warnings in tests
2024-05-09 18:13:13 +07:00
grossmj 7030dadbcb Remove dev requirements for Python 3.6 2024-05-09 18:04:19 +07:00
grossmj 46a9fdb61d Remove event_loop 2024-05-09 17:53:02 +07:00
grossmj 9958b876cf Do not run Docker VM tests on Windows 2024-05-09 17:36:58 +07:00
grossmj 259d3a0155 Fix cannot import UTC 2024-05-09 17:23:32 +07:00
grossmj 33499be425 Fix warnings in tests 2024-05-09 17:11:12 +07:00
grossmj 3fd44f5260 Do not wait for the server to close when shutting down. 2024-05-09 16:37:45 +07:00
grossmj c076275bd0 Fix test create image with not supported characters by filesystem. Fixes #2375 2024-05-09 16:01:55 +07:00
grossmj 081447ba2e Fix tests. Ref #2376 2024-05-09 15:37:42 +07:00
grossmj 3df7af12e1 Allow listing x86_64 IOU images. Fixes #2376 2024-05-09 15:21:05 +07:00
grossmj d9e4ce5639 Upgrade Jinja2 to version 3.1.4. Fixes #2378 2024-05-08 18:08:00 +07:00
grossmj 689d476b71 Fix tests 2024-04-28 18:03:06 +07:00
grossmj f1701e3f09 Upgrade fastapi and platformdirs 2024-04-27 23:21:58 +07:00
grossmj 38df4bea2e Do not return an error if an image has already been uploaded 2024-04-26 19:02:50 +07:00
grossmj 35b75f0f7f Fix link capture for ATM switch. Fixes https://github.com/GNS3/gns3-gui/issues/3570 2024-04-23 18:35:36 +07:00
grossmj 2609849507 Fix tests after updating error message when busybox is not installed. 2024-04-23 18:00:37 +07:00
grossmj 448b94f701 Add more details to error message when busybox is not installed. Fixes https://github.com/GNS3/gns3-gui/issues/3569 2024-04-23 17:54:06 +07:00
grossmj 18002a7580 Fix invalid escape sequences 2024-04-23 16:52:28 +07:00
grossmj 644e659729 Use NAT symbol for builtin NAT template 2024-04-22 19:11:58 +07:00
grossmj 1c37e8bd32 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/symbol_themes.py
#	gns3server/controller/template_manager.py
2024-04-22 19:08:45 +07:00
Jeremy Grossmann 1414bdcadf Merge pull request #2369 from GNS3/feature/nat-symbols
NAT symbols
2024-04-22 19:00:19 +07:00
grossmj b6e68ba1a8 Add NAT symbols 2024-04-22 18:51:29 +07:00
Jeremy Grossmann 19142d97bb Merge pull request #2366 from GNS3/bugfix/block-iou-call
Block IOU phone home call using IPtable
2024-04-20 15:53:39 +07:00
grossmj faf7e09ebb Only use iptable to block xml.cisco.com on Ubuntu Focal. 2024-04-20 15:45:28 +07:00
grossmj 84f7337cb1 Release v3.0.0b2 2024-04-07 18:52:24 +07:00
grossmj e11621467b Remove old files 2024-04-07 18:28:00 +07:00
grossmj 123123d767 Bundle web-ui v3.0.0b2 2024-04-07 18:23:59 +07:00
grossmj b3bdeb611e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2024-04-07 12:44:01 +07:00
grossmj 7a229e33f9 Sync appliances 2024-04-07 12:43:15 +07:00
grossmj 4959a51ce7 Block IOU phone home call using IPtable 2024-04-06 13:04:20 +07:00
grossmj 5b1ba5a57c Fix cannot stop Docker VM while console connection is still active. 2024-04-04 22:57:33 +07:00
grossmj bc1a8c99d1 Fix cannot stop Docker VM while console connection is still active. 2024-04-04 22:17:21 +07:00
Jeremy Grossmann ae64f15386 Merge pull request #2365 from GNS3/feature/custom-qemu-path
Support for custom Qemu paths
2024-04-03 21:24:13 +07:00
grossmj 123b5d0800 Support for custom Qemu path in templates and nodes 2024-04-03 21:16:40 +07:00
Jeremy Grossmann e1d3ee12b9 Merge pull request #2364 from GNS3/bugfix/3572
Fix CPUs limitation for Docker containers does not allow fractional values
2024-04-03 17:37:07 +07:00
grossmj 998898a471 Fix CPU fractional values for Docker VMs. 2024-04-03 17:15:10 +07:00
grossmj 9b66d939d2 Support for cooperative signal handling of uvicorn v0.29.0 2024-04-03 15:58:10 +07:00
grossmj fd60bda2c2 Downgrade pytest-asyncio to v0.21.1 2024-04-02 13:28:18 +07:00
grossmj c5f4e25756 Upgrade uvicorn, fastapi and sqlalchemy packages 2024-04-02 13:18:22 +07:00
grossmj 16bad6e0b5 Downgrade httpx_ws to v0.4.2 2024-03-24 18:37:31 +01:00
grossmj 8e661df981 Upgrade dev packages 2024-03-24 18:31:56 +01:00
grossmj 31c7fe88f1 Remove websocket.close() 2024-03-16 16:00:27 +01:00
Jeremy Grossmann 03b491f7b1 Merge pull request #2362 from GNS3/feature/use-bcrypt
Use bcrypt direcrtly instead of passlib
2024-03-08 01:33:41 +08:00
grossmj fa41d9ba75 Use bcrypt directly instead of passlib 2024-03-07 18:17:17 +01:00
grossmj a80aed5420 Development on 2.2.47.dev1 2024-03-05 01:07:16 +08:00
grossmj e9827653ae Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/version.py
#	tests/compute/docker/test_docker_vm.py
2024-03-05 01:05:46 +08:00
grossmj 9da8d1ec0f Upgrade uvicorn, fastapi, python-multipart, sqlalchemy, aiosqlite and email-validator dependencies 2024-03-05 01:03:59 +08:00
grossmj a53fd2e8b1 Upgrade sentry-sdk to version 1.40.6 2024-03-05 00:45:26 +08:00
Jeremy Grossmann 5bab4131e1 Merge pull request #2361 from GNS3/release/v2.2.46
Release v2.2.46
2024-02-26 17:51:46 +08:00
grossmj e8a7e80456 Release v2.2.46 2024-02-26 16:55:12 +08:00
grossmj ab05784c33 Sync appliances 2024-02-26 16:45:37 +08:00
grossmj 6983e686ca Bundle web-ui v2.2.46 2024-02-26 16:42:46 +08:00
grossmj 3631202ce5 Merge remote-tracking branch 'origin/2.2' into 2.2 2024-02-26 16:36:21 +08:00
grossmj 8d8a3247c4 Bundle web-ui v2.2.46 2024-02-26 16:35:47 +08:00
Jeremy Grossmann d100a132d6 Merge pull request #2360 from GNS3/bugfix/3555
Fix export project
2024-02-26 16:27:39 +08:00
Jeremy Grossmann 52638a9a8d Merge branch '2.2' into bugfix/3555 2024-02-26 16:22:15 +08:00
grossmj 9a5af82a28 Save empty directories when exporting a project 2024-02-24 19:02:16 +08:00
Jeremy Grossmann 14a618766d Merge pull request #2359 from GNS3/bugfix/2357
Fix Docker VM hasn't access to all resources
2024-02-22 19:37:55 +08:00
grossmj 0137688ba7 Test busybox is installed 2024-02-22 13:05:48 +08:00
grossmj 84db3b9996 Fix not all Docker resources are copied to a writable location 2024-02-22 12:59:44 +08:00
grossmj 800920e3df Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/run.py
#	requirements.txt
#	setup.py
#	tests/compute/docker/test_docker_vm.py
2024-02-21 12:24:30 +08:00
grossmj 14917580ac Downgrade to alembic v1.12.1 2024-02-15 18:42:05 +08:00
grossmj 4c65426e97 Revert "Downgrade platformdirs to v4.0.0"
This reverts commit fd85e49220.
2024-02-15 15:22:28 +08:00
grossmj fd85e49220 Downgrade platformdirs to v4.0.0 2024-02-15 15:17:25 +08:00
Jeremy Grossmann 0a08031d85 Merge pull request #2355 from GNS3/refactor/busybox
Install Docker resources in writable location
2024-02-14 16:18:25 +08:00
grossmj 1a53c9aabf Backport from v3: install Docker resources in a writable location at runtime. 2024-02-14 16:13:45 +08:00
grossmj 1f5085608c Use Docker API v1.24 to get version. 2024-02-14 15:40:19 +08:00
Jeremy Grossmann 16f72b4d3d Merge pull request #2347 from SpikefishSolutions/DeadTelnetConsoleFix
Address the telnet console death bug.
2024-02-09 20:33:16 +11:00
grossmj 3ced41633f Upgrade dependencies 2024-02-09 17:07:35 +11:00
Jeremy Grossmann 4fa10be5aa Merge pull request #2353 from GNS3/feature/drop-python-3.6
Drop Python 3.6 support
2024-02-09 17:01:40 +11:00
grossmj f050fc7e00 Change runtime checks for Python version 2024-02-09 16:49:58 +11:00
grossmj c93aafc9af Fix aiohttp dependency for Python 3.7 2024-02-09 16:45:46 +11:00
grossmj 93520b4d6c Do not test with Python 3.6 2024-02-09 16:34:44 +11:00
grossmj 1fb0260ae6 Drop support for Python 3.6 2024-02-09 16:28:23 +11:00
grossmj 91fd543321 Upgrade dependencies 2024-02-09 16:15:19 +11:00
John Fleming 763ef24108 Address the telnet console bug. Add wait_for for drain() call. If we're stuck on drain then the buffer isn't getting emptied. 5 seconds after drain() blocks, exception will be thrown and client will be removed from connection table and will no longer be a problem. 2024-02-02 22:09:31 -05:00
grossmj 17aabd6cda Merge branch 'master' into 2.2 2024-01-28 20:04:19 +11:00
grossmj d94adf4c8f Merge remote-tracking branch 'origin/master' 2024-01-28 19:56:40 +11:00
Jeremy Grossmann 4dd9cf2da2 Merge pull request #2340 from spikefishjohn/patch-3
Update telnet_server.py
2024-01-28 19:56:26 +11:00
grossmj d6f8069739 Remove files from 2.2 doc 2024-01-28 13:03:06 +11:00
grossmj 0037f31553 Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	docs/api/notifications/link.updated.json
#	docs/api/notifications/log.warning.json
#	docs/api/v2/compute/ethernet_switch/projectsprojectidethernetswitchnodes.rst
#	docs/api/v2/compute/ethernet_switch/projectsprojectidethernetswitchnodesnodeid.rst
#	docs/api/v2/compute/iou/projectsprojectidiounodes.rst
#	docs/api/v2/compute/project/projects.rst
#	docs/api/v2/compute/qemu/projectsprojectidqemunodes.rst
#	docs/api/v2/compute/qemu/projectsprojectidqemunodesnodeid.rst
#	docs/api/v2/compute/qemu/projectsprojectidqemunodesnodeidstart.rst
#	docs/api/v2/controller/link/projectsprojectidlinks.rst
#	docs/api/v2/controller/link/projectsprojectidlinkslinkid.rst
#	docs/api/v2/controller/link/projectsprojectidlinkslinkidstartcapture.rst
#	docs/api/v2/controller/project/projects.rst
#	docs/api/v2/controller/project/projectsprojectidduplicate.rst
#	docs/controller_notifications.rst
#	docs/curl.rst
#	docs/gns3_file.json
#	docs/project_notifications.rst
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/schemas/ethernet_hub.py
#	gns3server/schemas/ethernet_switch.py
#	gns3server/static/web-ui/3rdpartylicenses.txt
#	gns3server/static/web-ui/index.html
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
#	tests/controller/test_project.py
#	tests/controller/test_topology.py
#	tests/handlers/api/controller/test_project.py
2024-01-28 12:30:43 +11:00
grossmj e2a3d391d8 Merge remote-tracking branch 'origin/2.2' into 2.2 2024-01-28 12:14:28 +11:00
John Fleming 6c5f54fe57 Update telnet_server.py
Maybe use the correct object name this time for the socket objects.
2024-01-28 12:14:07 +11:00
John Fleming 082fbee1bd Update telnet_server.py
Set tcp keepalive timers to 60 seconds. Seems to default to 2 hours on ubuntu 22. Most firewalls will age out an idle tcp session at 1 hour.

Will not address telnet console failing after a tcp session has failed (TimeoutError).
2024-01-28 12:14:07 +11:00
Xatrekak 6d97feaced Fixed updating system and GNS3. 2024-01-28 12:14:01 +11:00
Dustin 8d35089661 Update welcome.py
Fixed an issue where the shell option in dialog failed to drop you back to bash.
2024-01-28 12:13:55 +11:00
Dustin 6455f62447 Update remote-install.sh
Removed an extra slash at the end when setting the user home directory. This was causing unexpected behavior for other scrips as ~ was aliased to /opt/gns3/ instead of the expected  /opt/gns3.

This caused an extra / to appear in commands unexpectedly.
2024-01-28 12:13:55 +11:00
grossmj 2fb3b1ebab Use Python 3.8 to publish API doc 2024-01-28 12:13:46 +11:00
grossmj 58399a9fa8 Upgrade sentry-sdk, psutil and distro dependencies 2024-01-28 12:13:12 +11:00
grossmj 907b305ecf Development on 2.2.46.dev1 2024-01-28 12:13:12 +11:00
grossmj 57f92db124 Release v2.2.45 2024-01-28 12:13:12 +11:00
grossmj 0f6f943a83 Bundle web-ui v2.2.45 2024-01-28 12:13:12 +11:00
grossmj 2cb76b2274 Remove old web-ui files 2024-01-28 12:13:11 +11:00
grossmj 2d2db52a8b Bundle web-ui v2.2.45 2024-01-28 12:13:11 +11:00
grossmj a8d0818e07 Sync appliances 2024-01-28 12:13:11 +11:00
grossmj f7eb2492d9 Fix mouse offset issues with VNC in Qemu. Fixes #2335 2024-01-28 12:13:11 +11:00
grossmj 218522b08c Fix issues when generating docs 2024-01-28 12:13:10 +11:00
grossmj 470f13f448 Update readthedocs.yml to use Python 3.12 2024-01-28 12:13:10 +11:00
grossmj 317aa669ac Update readthedocs.yml 2024-01-28 12:13:10 +11:00
grossmj 8d160ad5ed Update documentation 2024-01-28 12:13:10 +11:00
grossmj e3493870b2 Add project.created, project.opened and project.deleted controller notification stream.
Move project.updated and project.closed from project notification to controller notification stream.
2024-01-28 12:13:09 +11:00
grossmj d466c85385 Do not stop searching for Qemu binaries if one binary cannot be executed. Ref #2306 2024-01-28 12:13:09 +11:00
grossmj 35d4391fc0 Fix Ethernet switch and Ethernet hub port validations. Fixes #2334 2024-01-28 12:13:09 +11:00
grossmj eea0ab69bd Bundle dev version of the web-ui 2024-01-28 12:13:09 +11:00
grossmj 22ade94118 Update CORS policy 2024-01-28 12:13:08 +11:00
grossmj 08ee40548f Add custom executable paths on Windows 2024-01-28 12:13:08 +11:00
grossmj 7f05a06766 Upgrade sentry-sdk and aiohttp 2024-01-28 12:13:08 +11:00
grossmj 9fd2f58ef7 Development in 2.2.45.dev3 2024-01-28 12:13:08 +11:00
grossmj b9b802ebab Release v2.2.44.1 2024-01-28 12:13:08 +11:00
grossmj 1d86e322e9 Do not compute checksums on macOS 2024-01-28 12:13:07 +11:00
grossmj 8eb5f10971 Add multiprocessing.set_start_method() 2024-01-28 12:13:07 +11:00
grossmj cc4783ab98 Bump version to v2.2.45.dev2 2024-01-28 12:13:07 +11:00
grossmj 19792f328d Have freeze support for macOS as well 2024-01-28 12:13:07 +11:00
grossmj 596d1274a3 Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228 2024-01-28 12:13:07 +11:00
grossmj 2f765747b8 Add freeze_support() for multiprocessing 2024-01-28 12:13:06 +11:00
grossmj 4fe57b6a15 Development on 2.2.45.dev1 2024-01-28 12:13:06 +11:00
grossmj 1177626a53 Release v2.2.44 2024-01-28 12:13:06 +11:00
grossmj c4cc346864 Sync appliances 2024-01-28 12:13:06 +11:00
grossmj 8915dfffa5 Bundle web-ui v2.2.44 2024-01-28 12:13:05 +11:00
grossmj ff027ebd17 Upgrade sentry-sdk 2024-01-28 12:13:05 +11:00
grossmj 27d5ac537f Non-blocking checksums computation when server starts. Fixes #2228 2024-01-28 12:13:05 +11:00
grossmj fe246cd413 Fix timeout issue when creating Qemu disk image. Fixes https://github.com/GNS3/gns3-server/issues/2313 2024-01-28 12:13:05 +11:00
grossmj 2bbb560b8e Support for web socket console over HTTPS 2024-01-28 12:13:04 +11:00
grossmj 1624c7d6ad Add back script create_cert.sh 2024-01-28 12:13:04 +11:00
grossmj 2a3bb81076 Bundle web-ui 2024-01-28 12:13:04 +11:00
grossmj e0a0dd83d7 Use Python 3.8 in appveyor.yml 2024-01-28 12:13:04 +11:00
grossmj 16ea395618 Upgrade sentry-sdk, psutil and distro dependencies 2024-01-27 17:04:02 +11:00
Jeremy Grossmann 9dd8da4f6e Merge pull request #2340 from spikefishjohn/patch-3
Update telnet_server.py
2024-01-26 17:55:11 +11:00
John Fleming 54abf85523 Update telnet_server.py
Maybe use the correct object name this time for the socket objects.
2024-01-25 01:41:57 -05:00
Jeremy Grossmann 385fffec56 Merge pull request #2339 from spikefishjohn/patch-2
Update telnet_server.py
2024-01-24 11:53:59 +11:00
John Fleming ac86717bc0 Update telnet_server.py
Set tcp keepalive timers to 60 seconds. Seems to default to 2 hours on ubuntu 22. Most firewalls will age out an idle tcp session at 1 hour.

Will not address telnet console failing after a tcp session has failed (TimeoutError).
2024-01-23 13:15:17 -05:00
grossmj 7b7af33920 Development on 2.2.46.dev1 2024-01-14 23:45:35 +11:00
Jeremy Grossmann 85fd3ef4a4 Merge pull request #2338 from GNS3/2.2
Release v2.2.45
2024-01-14 22:02:14 +11:00
grossmj fbd8f6ce28 Release v2.2.45 2024-01-12 21:38:26 +11:00
grossmj 195da24910 Bundle web-ui v2.2.45 2024-01-12 21:34:11 +11:00
grossmj b4c7609aeb Remove old web-ui files 2024-01-12 21:29:04 +11:00
grossmj cd9c4c84b6 Bundle web-ui v2.2.45 2024-01-12 21:21:18 +11:00
grossmj 2566de0f5a Sync appliances 2024-01-12 21:13:52 +11:00
grossmj 6a069d0af6 Fix mouse offset issues with VNC in Qemu. Fixes #2335 2024-01-12 16:18:32 +11:00
grossmj 2789b3802a Fix issues when generating docs 2024-01-12 16:14:01 +11:00
grossmj 9e1a1337d4 Update readthedocs.yml to use Python 3.12 2024-01-12 15:27:41 +11:00
Jeremy Grossmann 466eb8128e Merge pull request #2336 from GNS3/fix/2319
Refactor project notifications
2024-01-12 13:38:51 +11:00
grossmj e41227b5bd Update readthedocs.yml 2024-01-12 13:32:15 +11:00
grossmj 78a3b8e824 Update documentation 2024-01-12 13:21:34 +11:00
grossmj 4c149e1614 Add project.created, project.opened and project.deleted controller notification stream.
Move project.updated and project.closed from project notification to controller notification stream.
2024-01-12 13:16:55 +11:00
grossmj 473fa98eda Do not stop searching for Qemu binaries if one binary cannot be executed. Ref #2306 2024-01-11 23:11:56 +11:00
grossmj 13d9afd8bc Fix Ethernet switch and Ethernet hub port validations. Fixes #2334 2024-01-11 22:40:38 +11:00
grossmj b4edbbbaa7 Bundle dev version of the web-ui 2023-12-07 12:34:52 +10:00
grossmj 02e19800fb Update CORS policy 2023-12-06 22:33:55 +10:00
grossmj bc1016474e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
2023-12-05 22:15:50 +10:00
grossmj 24bb0ca419 Add custom executable paths on Windows 2023-12-05 21:24:40 +10:00
grossmj 42f668ffc4 Development on 3.0.0.dev12 2023-11-27 11:33:22 +10:00
grossmj 646f0fd837 Release v3.0.0b1 2023-11-27 11:13:39 +10:00
grossmj 3d383b25f0 Bundle web-ui v3.0.0b1 2023-11-27 11:10:37 +10:00
grossmj 8d28178e56 Upgrade sentry-sdk to v1.37.1 2023-11-27 11:05:20 +10:00
grossmj 0d63bf5128 Upgrade aiohttp to v3.9.1 2023-11-27 10:49:45 +10:00
grossmj 37f720ac73 Fix bug when listing endpoints for opened project 2023-11-23 15:38:42 +10:00
grossmj 9509d3a713 Make images executable after importing a project 2023-11-23 11:30:46 +10:00
grossmj 061ee1491d Disable IOS hostname check for Dynamips ghost instances 2023-11-22 18:47:05 +10:00
grossmj c8245e81be Upgrade sentry-sdk 2023-11-22 12:44:56 +10:00
grossmj ff7e10fa7f Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/crash_report.py
#	gns3server/main.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
2023-11-22 12:42:04 +10:00
grossmj 6c5f75bf43 Upgrade sentry-sdk and aiohttp 2023-11-22 10:32:50 +10:00
grossmj 24d958d9ec Release v3.0.0a6 2023-11-15 12:07:48 +10:00
grossmj 48dab4af61 Bundle web-ui v3.0.0a6 2023-11-15 12:03:04 +10:00
grossmj 67be4259ff Fix tests 2023-11-15 11:57:14 +10:00
grossmj 4e9bc190a4 Upgrade to aiohttp v3.9.0rc0 2023-11-15 11:47:48 +10:00
grossmj 261dd1d6d5 Upgrade dependencies 2023-11-15 10:30:15 +10:00
Jeremy Grossmann e80e80a080 Merge pull request #2326 from GNS3/fix/2325
Install Docker resources in writable location
2023-11-13 11:28:56 +10:00
grossmj 09ff807055 Install Docker resources in writable location 2023-11-13 11:23:26 +10:00
grossmj 303cbf3642 Fix tests 2023-11-12 18:11:41 +10:00
grossmj e367b3a148 Default compute username is "gns3" 2023-11-12 18:02:19 +10:00
grossmj 7afdcbb3d3 Development in 2.2.45.dev3 2023-11-07 19:11:57 +10:00
Jeremy Grossmann de27a57a00 Merge pull request #2322 from GNS3/release-v2.2.44.1
Release v2.2.44.1
2023-11-07 18:35:29 +10:00
grossmj c88f76b740 Release v2.2.44.1 2023-11-07 14:59:28 +10:00
grossmj b81cc14cef Do not compute checksums on macOS 2023-11-07 14:30:39 +10:00
grossmj aa133c3b8a Add multiprocessing.set_start_method() 2023-11-07 13:33:43 +10:00
grossmj 7449064ea2 Bump version to v2.2.45.dev2 2023-11-07 12:21:39 +10:00
grossmj db315e3c3c Have freeze support for macOS as well 2023-11-07 11:17:48 +10:00
grossmj c437482e85 Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228 2023-11-07 11:08:47 +10:00
Jeremy Grossmann 46d9ada6d8 Merge pull request #2321 from Xatrekak/master
Fixed updating system and GNS3 via welcome.py.
2023-11-07 10:49:00 +10:00
grossmj aac6fbfc31 Add freeze_support() for multiprocessing 2023-11-07 10:42:53 +10:00
Xatrekak 76bd5921c5 Fixed updating system and GNS3. 2023-11-06 19:02:29 -05:00
grossmj 8a208dbf04 Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/compute/qemu/__init__.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.383fdade2fd9dbccffbc.js
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
2023-11-06 17:09:34 +10:00
Jeremy Grossmann af3a618306 Merge pull request #2316 from GNS3/release-v2.2.44
Release v2.2.44
2023-11-06 17:05:54 +10:00
grossmj 3c4b5db1ca Development on 2.2.45.dev1 2023-11-06 17:00:17 +10:00
grossmj 5c8abdc6fd Release v2.2.44 2023-11-06 16:02:23 +10:00
grossmj f80f41b5b3 Sync appliances 2023-11-06 15:58:21 +10:00
grossmj 503373a6e9 Bundle web-ui v2.2.44 2023-11-06 15:53:51 +10:00
grossmj 8236c85b5f Upgrade sentry-sdk 2023-11-06 15:44:30 +10:00
Jeremy Grossmann 531499bbfb Merge pull request #2314 from Xatrekak/master
[Fix] an issue where the shell option in dialog failed to drop you back to bash.
2023-11-06 13:01:35 +10:00
grossmj ae825b0080 Non-blocking checksums computation when server starts. Fixes #2228 2023-11-06 12:32:23 +10:00
Dustin 7ad3afbdef Update welcome.py
Fixed an issue where the shell option in dialog failed to drop you back to bash.
2023-11-05 13:35:06 -05:00
grossmj 191feed669 Fix timeout issue when creating Qemu disk image. Fixes https://github.com/GNS3/gns3-server/issues/2313 2023-11-05 15:41:46 +10:00
grossmj cd785e0d17 Fix broken link to Web UI in 3.0 branch. Fixes #2312 2023-11-03 20:56:31 +10:00
grossmj e1bd4638c8 Fix sample config: VMware section declared twice. Fixes #2311 2023-11-03 20:46:36 +10:00
grossmj 61dede72f9 Fix ws console and packet capture over SSL 2023-11-03 15:35:49 +10:00
grossmj 13630179b2 Merge branch '2.2' into 3.0
# Conflicts:
#	appveyor.yml
#	gns3server/compute/project_manager.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.febf2f1259a67875a3e3.js
2023-11-03 14:56:55 +10:00
grossmj 3b22bcfe96 Support for web socket console over HTTPS 2023-11-03 14:40:40 +10:00
grossmj 0f07b9e019 Add back script create_cert.sh 2023-11-03 12:31:34 +10:00
grossmj 8676a3dccf Bundle web-ui 2023-11-02 17:40:47 +10:00
grossmj b0dbf59ac4 Use Python 3.8 in appveyor.yml 2023-10-31 14:48:08 +10:00
Jeremy Grossmann 0e18762b36 Merge pull request #2308 from Xatrekak/master
Update remote-install.sh
2023-10-31 09:19:55 +10:00
Dustin cbc7e59d3f Update remote-install.sh
Removed an extra slash at the end when setting the user home directory. This was causing unexpected behavior for other scrips as ~ was aliased to /opt/gns3/ instead of the expected  /opt/gns3.

This caused an extra / to appear in commands unexpectedly.
2023-10-30 11:00:45 -04:00
Jeremy Grossmann 14fd165f2a Merge pull request #2307 from GNS3/fix/3521
Allow disabling hardware virtualization check
2023-10-30 15:03:50 +10:00
grossmj 7c49a9160c Allow disabling hardware virtualization check 2023-10-30 14:57:11 +10:00
Jeremy Grossmann 5a6e945db2 Merge pull request #2304 from GNS3/upgrade-python-api-doc
Upgrade to Python 3.8 for API doc publishing
2023-10-27 14:46:52 +10:00
grossmj 86c0b90951 Use Python 3.8 to publish API doc 2023-10-27 14:42:22 +10:00
grossmj 23b1c7a989 Development on 3.0.0.dev10 2023-10-27 14:12:23 +10:00
grossmj 399e925f2e Release v3.0.0a5 2023-10-27 13:38:14 +10:00
grossmj ac11c984cb Bundle web-ui v3.0.0a5 2023-10-27 13:32:31 +10:00
grossmj 0e8e4fd2f7 Merge branch '2.2' into 3.0 2023-10-27 13:28:32 +10:00
grossmj ed99a98fe1 Sync appliances 2023-10-27 13:20:15 +10:00
Jeremy Grossmann 19edc193f9 Merge pull request #2303 from GNS3/fix/1484
Fix L2IOU "failed code signing checks"
2023-10-26 15:13:12 +10:00
grossmj 3f50319990 Fix L2IOU "failed code signing checks" when IOU base file name is >= 63 characters 2023-10-26 15:05:10 +10:00
grossmj fb6d29aeff Python 3.12 support 2023-10-24 18:37:13 +10:00
grossmj 5475eedce7 Add igb Qemu adapter 2023-10-24 18:33:26 +10:00
grossmj d680bbbc77 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/schemas/qemu_template.py
#	requirements.txt
#	tests/compute/qemu/test_qemu_vm.py
#	tests/handlers/api/compute/test_qemu.py
2023-10-24 18:31:51 +10:00
Jeremy Grossmann 248737c34b Merge pull request #2296 from ventaquil/feature/add-qemu-igb-nic
Add Qemu IGB network device
2023-10-24 17:23:00 +10:00
Jeremy Grossmann 240708112c Merge branch '2.2' into feature/add-qemu-igb-nic 2023-10-24 17:14:27 +10:00
grossmj c759c4e3f6 Upgrade to actions/checkout@v3 and actions/setup-python@v3 2023-10-23 16:17:31 +10:00
grossmj 34ee75e1f1 Fix tests running on Python 3.12 2023-10-23 16:12:12 +10:00
grossmj 4af5edbc03 Install aiohttp 3.9.0b0 when running on Python 3.12 2023-10-23 15:21:06 +10:00
grossmj 0d15f40930 Change "ip cef" to "no ip cef" in IOU default configs. Fixes #2298 2023-10-23 15:16:49 +10:00
Jeremy Grossmann f3ad97c398 Merge pull request #2300 from GNS3/fix/1468
Fix compute authentication for websocket endpoints
2023-10-22 16:03:21 +10:00
Jeremy Grossmann a55e1cbc99 Update dev-requirements.txt 2023-10-22 15:47:21 +10:00
Jeremy Grossmann 9c369a2597 Merge branch '3.0' into fix/1468 2023-10-22 15:44:25 +10:00
Jeremy Grossmann 4dcb0dce57 Merge pull request #2301 from GNS3/drop-python-3.7
Drop Pyhton 3.7 support (end-of-life)
2023-10-22 15:43:26 +10:00
grossmj 0f0412158d Drop support for Python 3.7 and upgrade dependencies 2023-10-22 15:37:00 +10:00
grossmj 2f3689588e Fix httpx-ws dependency on Python 3.7 2023-10-22 12:53:47 +10:00
grossmj 44c066ac68 Fix compute authentication for websocket endpoints 2023-10-22 12:44:39 +10:00
grossmj ffc49ea954 Development on 3.0.0.dev9 2023-10-18 20:15:11 +10:00
grossmj d610c933fb Release v3.0.0a4 2023-10-18 19:01:13 +10:00
grossmj 8f35b871d5 Downgrade watchfiles to v0.20.0 2023-10-18 18:35:02 +10:00
grossmj 29c9d2c2e9 Revert "Temporary support for Python 3.12"
This reverts commit 9911b5199b.
2023-10-18 18:31:44 +10:00
grossmj 5ad7761337 Upgrade FastAPI, watchfiles and platformdirs dependencies 2023-10-18 18:01:59 +10:00
grossmj 9911b5199b Temporary support for Python 3.12 2023-10-18 17:58:24 +10:00
grossmj edcc69f617 Remove old web-ui files 2023-10-18 17:58:11 +10:00
grossmj fe8b61373c Bundle web-ui v3.0.0a4 2023-10-18 17:51:41 +10:00
grossmj 87960f1ff0 Merge branch '2.2' into 3.0
# Conflicts:
#	README.md
2023-10-18 17:48:09 +10:00
grossmj 3b0d89be5a Merge branch 'master' into 2.2 2023-10-18 17:46:51 +10:00
grossmj 5ff3043fb4 Sync appliances 2023-10-18 17:45:17 +10:00
grossmj 47d3f3f349 Do not enforce Compute.Audit and Template.Audit privileges due to current web-ui limitations 2023-10-18 15:51:43 +10:00
grossmj 109feeb647 Revert to aiohttp v3.8.6 2023-10-18 15:00:42 +10:00
grossmj 56839413fa Remove testing with Python 3.6 (not supported) 2023-10-18 14:58:19 +10:00
grossmj 18012dc18a Upgrade aiohttp and sqlalchemy dependencies 2023-10-18 14:56:19 +10:00
grossmj 46c02ad2f3 Merge branch '2.2' into 3.0
# Conflicts:
#	requirements.txt
2023-10-18 14:54:39 +10:00
grossmj 08ac80e451 Upgrade sentry and psutil dependencies 2023-10-18 14:53:25 +10:00
grossmj 6ca15cbcff Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	requirements.txt
#	setup.py
2023-10-18 14:49:49 +10:00
grossmj 722512d851 Remove model validator. Fixes https://github.com/GNS3/gns3-gui/issues/3522
Default port name and port segment size are already set in the code when a new node is created.
2023-10-15 11:16:05 +10:00
Konrad Goławski 737664a3d4 Add Qemu IGB network device 2023-10-12 11:35:53 +02:00
grossmj 29f4b238b0 Add Python 3.12 support. Fixes https://github.com/GNS3/gns3-server/issues/2273 2023-10-09 16:54:47 +10:00
Jeremy Grossmann b6127af067 Merge pull request #2294 from GNS3/list-items-closed-project
[API] Allow listing items from a closed project
2023-10-09 13:28:58 +10:00
grossmj 5092bd2fdf List elements when a project is closed 2023-10-09 13:16:12 +10:00
grossmj a27db6b4eb Fix deleting resource from resource pool. Ref #2293 2023-09-28 18:38:38 +10:00
grossmj 66b66cc3e1 Bump version to 3.0.0.dev8 2023-09-25 21:38:20 +10:00
Jeremy Grossmann 7215b150dd Merge pull request #2292 from GNS3/fix/3422
Support to create empty disk images on the controller
2023-09-25 21:29:24 +10:00
grossmj 674381f1be Fix tests 2023-09-25 21:08:23 +10:00
grossmj 1ae6d13022 Support to create empty disk images on the controller 2023-09-25 17:51:14 +10:00
Jeremy Grossmann 6886f1f566 Merge pull request #2290 from GNS3/fix/2147
Fix issue when using importlib.resources.files()
2023-09-23 20:54:57 +10:00
grossmj 999a47f747 Fix issue with importlib.resources.files() and Python 3.9 2023-09-23 20:44:00 +10:00
grossmj c1507b4155 Upgrade sqlalchemy 2023-09-23 15:56:42 +10:00
grossmj d9214a3c67 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/virtualbox/__init__.py
#	gns3server/controller/gns3vm/virtualbox_gns3_vm.py
#	gns3server/crash_report.py
#	gns3server/version.py
#	requirements.txt
2023-09-23 15:54:54 +10:00
grossmj f675f24ba7 Revert "Install importlib-resources only with Python < '3.9'. Ref #2147"
This reverts commit dc1eed42da.
2023-09-23 14:48:04 +10:00
grossmj dc1eed42da Install importlib-resources only with Python < '3.9'. Ref #2147 2023-09-23 14:35:50 +10:00
Jeremy Grossmann 2c5a9ef9b7 Merge pull request #2288 from Quanterm/master
Update README.md
2023-09-21 11:44:36 +10:00
Vieta e75d151611 Update README.md
The release cycle of NixOs is around every half of the year. 
On the unstable channel you have the latest gns3-server version. 
Do not worry to use unstable because it mostly just the latest stable version. You can also do overlays to keep your other systems pkgs on the regular release version.
2023-09-20 11:41:05 +00:00
Jeremy Grossmann d87cff7fd5 Merge pull request #2287 from munahaf/Inappropriate_Logic-5node.py11635999804432162276.diff
Update a test expression to remove a logical short circuit
2023-09-20 14:31:04 +07:00
Jeremy Grossmann ffb58a4ed2 Merge branch 'master' into Inappropriate_Logic-5node.py11635999804432162276.diff 2023-09-20 14:17:58 +07:00
munahaf 4d7b3fb9d6 Comment: Updated a test expression to remove a logical short circuit. 2023-09-20 06:51:41 +00:00
grossmj 94abdfc9f0 Development on 2.2.44.dev1 2023-09-19 21:08:24 +07:00
Jeremy Grossmann 6f345bb1ec Merge pull request #2286 from GNS3/release-v2.2.43
Release v2.2.43
2023-09-19 21:04:52 +07:00
grossmj 89ec458f5c Release v2.2.43 2023-09-19 20:16:52 +07:00
grossmj 80bc1a726b Sync appliances 2023-09-19 20:12:32 +07:00
grossmj 6265d3d55f Upgrade sentry-sdk and truststore 2023-09-19 20:07:57 +07:00
grossmj a96a82821c Merge branch 'master' into 2.2 2023-09-19 20:04:15 +07:00
grossmj ad47ffbe29 Force English output for VBoxManage. Fixes #2266 2023-09-19 18:14:05 +07:00
Jeremy Grossmann eca1243fc0 Merge pull request #2285 from Orange-OpenSource/3.0
rbac fix: cannot add multiple time same privilege to a role
2023-09-18 18:41:01 +07:00
Sylvain MATHIEU OBS 0d834ee2a0 rbac fix: cannot add multiple time same privilege to a role 2023-09-18 13:34:46 +02:00
Jeremy Grossmann e1c5c05492 Merge pull request #2280 from GNS3/resource-pools
Resource pools support
2023-09-14 22:47:02 +07:00
grossmj 7534718a1c Remove privileges endpoint from roles 2023-09-14 22:41:08 +07:00
Jeremy Grossmann 63c1defd9a Merge branch '3.0' into resource-pools 2023-09-14 22:38:52 +07:00
grossmj 1f90bb14b6 Require users to be logged in for privilege API endpoints 2023-09-14 22:36:21 +07:00
Jeremy Grossmann ae00dd422f Merge pull request #2283 from Orange-OpenSource/3.0
API: add endpoint to expose availables privileges to web UI
2023-09-13 22:51:05 +07:00
Sylvain MATHIEU OBS 10eeefc1f5 API: add endpoint to expose availables privileges to web UI 2023-09-12 15:24:54 +02:00
grossmj 702fea89fb Automatically add vboxnet and DHCP server if not present for VirtualBox GNS3 VM. Ref #2266 2023-09-12 16:14:44 +07:00
grossmj a95dda0d1d Complete resource pool support for projects 2023-09-11 18:15:03 +07:00
grossmj d53ef175f8 DB and API for resource pools 2023-09-07 17:31:11 +07:00
grossmj f7d287242f Upgrade platformdirs 2023-09-07 16:32:04 +07:00
grossmj c11b3c3911 Fix tests after merge 2023-09-06 23:42:50 +07:00
grossmj 1ec056c1a6 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/web/route.py
#	requirements.txt
#	tests/compute/docker/test_docker_vm.py
2023-09-06 23:30:00 +07:00
Jeremy Grossmann 285b19d97f Merge pull request #2272 from GNS3/fix/2271
Correctly install built-in appliances
2023-09-06 23:16:34 +07:00
grossmj 709aa46074 Fix issue with controller config saved before checking current version with previous one 2023-09-06 16:48:24 +07:00
grossmj 0c12849d0d Use controller vars file to store version and appliance etag 2023-09-06 16:28:46 +07:00
grossmj 8aa9d1aae6 Upgrade dependencies and fix user group tests 2023-09-03 17:58:51 +07:00
grossmj 66047b3431 Fix OAuth2PasswordBearer token URL 2023-09-03 17:31:05 +07:00
Jeremy Grossmann 71d06abaf4 Merge pull request #2278 from GNS3/update-publish-api-doc
Update publish api doc with GitHub Actions
2023-09-03 17:00:13 +07:00
grossmj 05ef9f2a7c No need for dev dependencies 2023-09-03 16:59:48 +07:00
grossmj 476658b829 Update publish-api-documentation.yml 2023-09-03 16:52:30 +07:00
grossmj 6ec97a704f Put user, groups, roles and ACL under /access 2023-09-02 19:10:02 +07:00
grossmj a358369606 Move notifications under controller router 2023-09-02 18:57:53 +07:00
grossmj 5155aea923 Upgrade dependencies 2023-09-02 18:49:16 +07:00
Jeremy Grossmann b0c4fc17ad Merge pull request #2275 from GNS3/rbac-new-implementation
New RBAC implementation
2023-09-02 18:47:35 +07:00
grossmj e72b07bf5c Prepare resource pools table for future development 2023-09-02 18:42:40 +07:00
grossmj 170f476733 Add more built-in roles 2023-09-02 18:15:00 +07:00
grossmj 0077fd98aa Add required privileges to all endpoints 2023-09-02 17:54:24 +07:00
grossmj f3a4ad49f4 Check for group ACEs to find user privileges 2023-08-28 18:14:34 +10:00
grossmj 3e0592520b Handle ACE propagate and allowed 2023-08-28 12:06:01 +10:00
Jeremy Grossmann d3d0cc039d Merge pull request #2277 from GNS3/fix/2276
Prevent X11 socket file to be modified by Docker container
2023-08-27 19:53:50 +10:00
grossmj c2783d355f Fix test_create_vnc test 2023-08-27 18:41:25 +10:00
grossmj d6e1ee5dbb Prevent X11 socket file to be modified by Docker container 2023-08-27 18:30:37 +10:00
grossmj 57197c3d1c Comment unused code 2023-08-27 18:23:10 +10:00
grossmj 60ce1172e0 Use an ACL table to check for privileges 2023-08-27 18:20:42 +10:00
grossmj 6bd855b3c5 New database schema for better RBAC 2023-08-21 21:32:23 +10:00
grossmj 74cb3be910 Merge remote-tracking branch 'origin/3.0' into 3.0 2023-08-19 12:29:53 +10:00
grossmj 425ad845fc Speed up tests 2023-08-19 12:29:25 +10:00
grossmj 1ce0c13fc9 Better mocking in Docker tests 2023-08-18 12:20:54 +10:00
grossmj e9e2dc2ca7 Fix validation issues and improve exceptions logs 2023-08-17 17:36:50 +10:00
Jeremy Grossmann e61ada69bb Merge pull request #2274 from lethedata/openwrt-18.06.5-18.06.2-hashfix
Hash Update openwrt.gns3a
2023-08-17 10:00:14 +10:00
Echo Nar a6b0f32b57 Hash Update openwrt.gns3a
Update hashes for openwrt-18.06.5 and openwrt-18.06.2 based hashes from download links.
2023-08-16 18:37:55 -05:00
grossmj a69feb3682 Use an older version of platformdirs 2023-08-12 19:15:29 +10:00
grossmj 090d1c8c84 Only use platformdirs with Python >= '3.7' 2023-08-12 19:04:14 +10:00
grossmj df2f96828e Use the user data dir to store built-in appliances 2023-08-12 18:48:43 +10:00
grossmj 6a614fbd78 Downgrade jsonschema 2023-08-12 17:51:24 +10:00
grossmj 2d7438446c Upgrade dependencies 2023-08-12 17:47:48 +10:00
grossmj 77d4eabadc Catch ConnectionResetError exception when client disconnects 2023-08-12 17:31:58 +10:00
grossmj ca48efa5be Upgrade SQLAlchemy to v2.0.18 and fix async_timeout warning 2023-08-11 22:52:29 +10:00
grossmj b0657b39ef Upgrade dependencies 2023-08-11 18:54:05 +10:00
grossmj cefa459721 Fix command line issue with certfile and certkey 2023-08-11 18:34:16 +10:00
grossmj 66dd8bdadb Merge branch '2.2' into 3.0 2023-08-11 18:14:16 +10:00
grossmj bbb0a407e0 Upgrade to PyQt 5.15.9 and pywin32 2023-08-11 18:13:41 +10:00
Jeremy Grossmann 96ce5eac8d Merge pull request #2270 from GNS3/packaging-migration
Packaging migration
2023-08-11 18:09:31 +10:00
grossmj 2f2aabeb5a Fix tests when running Python 3.7 2023-08-11 17:58:00 +10:00
grossmj d9eb61efc4 Fix tests with asyncio_patch 2023-08-11 17:37:11 +10:00
grossmj 1fd8444d22 Add tests for install_busybox() 2023-08-11 17:32:05 +10:00
grossmj f3b6825e40 Test if busybox is not dynamically linked 2023-08-11 14:10:25 +10:00
grossmj 719458764f Fix tests 2023-08-10 23:23:11 +10:00
grossmj 483db91851 Use dev for optional development dependencies 2023-08-10 23:16:57 +10:00
grossmj f3d43aeb39 Fix testing.yml 2023-08-10 22:52:35 +10:00
grossmj 1cb433c5bc New packaging relying only pyproject.toml 2023-08-10 22:44:37 +10:00
grossmj 17f71f970e Add truststore inject_into_ssl 2023-08-10 15:01:49 +10:00
grossmj fe90d2b146 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/crash_report.py
#	gns3server/run.py
#	gns3server/static/web-ui/index.html
#	gns3server/utils/images.py
#	gns3server/version.py
#	requirements.txt
#	scripts/update-bundled-web-ui.sh
2023-08-10 15:00:22 +10:00
grossmj 35e1519073 Development on v2.2.43.dev1 2023-08-09 22:15:15 +10:00
Jeremy Grossmann 9f5aece8b6 Merge pull request #2267 from GNS3/release-v2.2.42
Release v2.2.42
2023-08-09 22:09:29 +10:00
grossmj 08139ebdd1 Release v2.2.42 2023-08-09 21:11:57 +10:00
grossmj cd87ac4474 Bundle web-ui v2.2.42 2023-08-09 21:03:40 +10:00
grossmj 77744cc31d Handle API version key in VirtualBox 7. Fixes #2266 2023-08-09 20:51:53 +10:00
grossmj df9d642a56 Sync appliances 2023-08-08 19:07:04 +10:00
grossmj fad28c766a Enable system certificate store later in the code and bump version to 2.2.42.dev4 2023-08-08 17:22:27 +10:00
grossmj 21d9d968c4 Revert "Use truststore in appliance_manager.py instead"
This reverts commit a2628042e8.
2023-08-07 20:44:37 +10:00
grossmj 945a2c98cd Revert "Use finer-grained control for truststore"
This reverts commit 5e1792ff4d.
2023-08-07 20:44:33 +10:00
grossmj 5e1792ff4d Use finer-grained control for truststore 2023-08-07 19:15:14 +10:00
grossmj a2628042e8 Use truststore in appliance_manager.py instead 2023-08-07 19:04:55 +10:00
grossmj e616b09028 Use truststore 2023-08-07 18:40:03 +10:00
grossmj 958865e919 Upgrade dependencies 2023-08-06 20:39:27 +10:00
grossmj 7f595b089b Use certifi to get SSL root certificates 2023-08-06 20:37:10 +10:00
grossmj a76d7576c6 Bump version to 2.2.42.dev3 2023-08-06 18:14:21 +10:00
grossmj 533c4544ea Use certifi on Windows and macOS 2023-08-06 18:09:56 +10:00
Jeremy Grossmann 04a302a389 Merge pull request #2265 from GNS3/use-bundled-cacert
Use bundled cacert file for frozen app
2023-08-05 22:37:06 +10:00
grossmj 5da742394e Use bundled cacert file on Windows and macOS 2023-08-05 22:21:08 +10:00
grossmj 962c5eed8e Add log message for comparing controller version with config version. Ref https://github.com/GNS3/gns3-gui/issues/3486 2023-08-05 20:24:11 +10:00
grossmj f4dab1482f Bump version to 2.2.42.dev2 2023-08-05 20:16:30 +10:00
grossmj 05d594f3cf Upgrade FastAPI version to 0.101.0 2023-08-05 20:13:30 +10:00
Jeremy Grossmann d44f6eb2f1 Merge pull request #2262 from GNS3/fix/2257
Support for Pydantic v2
2023-08-04 18:27:18 +10:00
grossmj 9c456532d0 Pydantic v2 migration 2023-08-04 18:20:06 +10:00
grossmj 7ef9b7600c Use DEFAULT_BUFFER_SIZE for md5sum 2023-08-03 12:09:24 +10:00
grossmj 11f51b3809 Allow connection to ws console over IPv6 2023-08-02 18:29:01 +10:00
grossmj 1d59afa9fb Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/utils/images.py
2023-08-02 18:26:50 +10:00
grossmj c51d71a4fa Fix version check when installing appliances. Ref https://github.com/GNS3/gns3-gui/issues/3486 2023-08-02 17:58:53 +10:00
grossmj af83adfdf6 Add debug message when calculating MD5 checksum 2023-08-02 17:41:51 +10:00
grossmj 658bfb7624 Allow connection to ws console over IPv6. Fixes https://github.com/GNS3/gns3-web-ui/issues/1400 2023-08-02 15:28:32 +10:00
grossmj 88a1cef21f Revert "Support for Python 3.12"
This reverts commit 1ced862c08.
2023-07-30 17:50:25 +10:00
grossmj 1ced862c08 Support for Python 3.12 2023-07-30 17:48:30 +10:00
grossmj 6097166055 Remove import urllib3 and let sentry_sdk import and patch it. Fixes https://github.com/GNS3/gns3-gui/issues/3498 2023-07-30 17:42:52 +10:00
grossmj 46b8ee3279 Downgrade sqlalchemy 2023-07-23 12:56:30 +10:00
grossmj d82a07600b Downgrade uvicorn 2023-07-23 12:50:29 +10:00
grossmj 2991899d50 Upgrade dependencies 2023-07-23 12:47:34 +10:00
grossmj 9238c52f97 Merge branch '2.2' into 3.0 2023-07-23 12:36:35 +10:00
grossmj 38ee79c15f Merge remote-tracking branch 'origin/master' into 2.2 2023-07-23 12:35:46 +10:00
grossmj 3f691b60c9 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/crash_report.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.1379a5647e8bc6d3e401.js
#	gns3server/version.py
#	tests/compute/qemu/test_qemu_vm.py
2023-07-13 10:09:26 +10:00
grossmj a6ca7c4e36 Development on 2.2.42.dev1 2023-07-12 18:26:26 +10:00
Jeremy Grossmann b76d2c2150 Merge pull request #2258 from GNS3/release-v2.2.41
Release v2.2.41
2023-07-12 18:24:40 +10:00
grossmj d2a0632ec4 Release v2.2.41 2023-07-12 17:07:39 +10:00
grossmj fde5f5cbe2 Merge remote-tracking branch 'origin/master' into 2.2 2023-07-12 17:04:12 +10:00
grossmj 7dc5628845 Bundle web-ui v2.2.41 2023-07-12 16:31:54 +10:00
grossmj 723b519e8f Sync appliance files 2023-07-12 16:20:29 +10:00
grossmj 9c653f7dbf Bump version to 2.2.41.dev3 2023-07-12 13:26:22 +10:00
grossmj c226b2a9ef Catch urllib3 exceptions when sending crash report. Ref https://github.com/GNS3/gns3-gui/issues/3483 2023-07-06 17:16:05 +10:00
Jeremy Grossmann c5c4e1ad56 Merge pull request #2255 from GNS3/fix/2243
Only add speed/duplex params when using Qemu >= v2.12
2023-07-06 16:43:54 +10:00
grossmj 8e2989d747 Fix issue with tests and Qemu version on Windows 2023-07-06 16:36:36 +10:00
grossmj c181df6935 Only fetch Qemu version once when starting Qemu + only add speed/duplex for virtio-net-pci with Qemu version >= 2.12 2023-07-06 16:29:55 +10:00
Jeremy Grossmann 24c03406e7 Merge pull request #2253 from GNS3/uefi-boot-mode
Bundle recent OVMF firmware and improve UEFI boot mode
2023-07-04 13:38:47 +10:00
grossmj 6c8c5c1787 Ignore uefi test on Windows 2023-07-04 13:31:21 +10:00
grossmj f541c03b94 Fix uefi test on Windows 2023-07-04 13:22:18 +10:00
grossmj 0a14a08d54 Use recent OVMF firmware (stable-202305) and use flash drives to configure Qemu command line 2023-07-04 13:06:34 +10:00
grossmj 9357ac6035 Add builtin field in Appliance model 2023-07-03 21:02:17 +10:00
grossmj 785eff869d Fix issue with appliance API returning unset data 2023-07-03 18:55:19 +10:00
grossmj 24db2a039d Upgrade FastAPI to v0.99.1 2023-07-03 17:12:46 +10:00
grossmj bfb317a302 Upgrade dependencies 2023-06-30 17:47:55 +10:00
Jeremy Grossmann 29b4e89d21 Merge pull request #2252 from Raizo62/rights_empty8G.qcow2
- remove executable permissions to empty8G.qcow2
2023-06-28 19:55:56 +09:30
Raizo62 bbb68cb148 - remove the useless executable permissions to the file gns3server/disks/empty8G.qcow2
https://github.com/GNS3/gns3-gui/issues/3491
2023-06-28 08:30:13 +02:00
grossmj 427bbc40b9 Fix websocket authentication after upgrade to FastAPI 0.97.0 + tests 2023-06-24 14:55:43 +09:30
grossmj 4b791d4924 Fix websocket compute notifications after upgrade to FastAPI 0.97.0 2023-06-23 23:26:08 +09:30
Jeremy Grossmann 6f132a2e09 Merge pull request #2248 from GNS3/backport-uefi-boot-mode
Backport UEFI boot mode support for Qemu VMs
2023-06-23 11:31:52 +09:30
grossmj d5cfb85de5 Backport UEFI boot mode support for Qemu VMs 2023-06-23 11:18:25 +09:30
Jeremy Grossmann d366d77ff7 Merge pull request #2247 from GNS3/dynamic-compute-allocation
Allow computes to be dynamically or manually allocated
2023-06-21 22:41:56 +09:30
grossmj 21049d73a5 Allow computes to be dynamically or manually allocated 2023-06-21 22:28:09 +09:30
Jeremy Grossmann c290d75eec Merge pull request #2246 from GNS3/add-uefi-boot-mode
Add UEFI boot mode option for Qemu VMs
2023-06-21 18:12:31 +09:30
grossmj 40c265152b Add UEFI boot mode option for Qemu VMs 2023-06-21 17:56:34 +09:30
grossmj e5eeab662e Check if server config file is readable 2023-06-20 21:26:21 +09:30
grossmj a7a946c067 Upgrade dev dependencies 2023-06-20 16:17:13 +09:30
grossmj b762d1e60d Upgrade dependencies 2023-06-20 16:13:35 +09:30
grossmj 1ff23348d3 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/compute.py
#	gns3server/controller/gns3vm/virtualbox_gns3_vm.py
#	gns3server/controller/node.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/template_handler.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.8448c96e4facbe79a613.js
#	gns3server/version.py
#	tests/compute/iou/test_iou_vm.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/handlers/api/controller/test_template.py
2023-06-20 16:06:53 +09:30
grossmj 3dbc714f37 Developement on v2.2.41.dev2 2023-06-10 21:40:39 +09:30
Jeremy Grossmann 682af449f8 Merge pull request #2240 from GNS3/release-v2.2.40.1
Release v2.2.40.1
2023-06-10 21:36:51 +09:30
grossmj 60f1d76eab Release v2.2.40.1 2023-06-10 20:06:40 +09:30
grossmj 16b619066a Merge branch 'master' into 2.2 2023-06-10 17:22:33 +09:30
grossmj d44038305f Add missing web-ui files. Fixes #2239 2023-06-10 15:50:28 +09:30
grossmj 3641742930 Development on v2.2.41.dev1 2023-06-06 12:43:20 +09:30
Jeremy Grossmann 4bf7838543 Merge pull request #2238 from GNS3/release-v2.2.40
Release v2.2.40
2023-06-06 12:41:40 +09:30
Jeremy Grossmann 998fe6d8a4 Merge branch 'master' into release-v2.2.40 2023-06-06 12:28:30 +09:30
grossmj aa79f4cb25 Release v2.2.40 2023-06-06 10:23:42 +09:30
grossmj 2602602193 Merge branch 'master' into 2.2 2023-06-06 10:20:07 +09:30
grossmj 8d969349c8 Bundle web-ui v2.2.40 2023-06-06 10:18:18 +09:30
grossmj bf67fec242 Sync appliances 2023-06-06 10:07:50 +09:30
Jeremy Grossmann a070a72f66 Merge pull request #2235 from Raizo62/virtio-net-pci
qemu : with "virtio-net-pci", fix the speed and duplex
2023-06-03 21:03:04 +09:30
grossmj 71d1aefb65 Test Qemu command with virtio-net-pci adapter 2023-06-03 20:57:23 +09:30
Raizo62 0b6436d2cb qemu : with network adapter_type equal to "virtio-net-pci", fix the speed to 10000 and duplex to full.
The values are actually fake.
	(https://github.com/GNS3/gns3-gui/issues/3476)
2023-06-03 11:48:55 +02:00
Jeremy Grossmann 77f5044aec Merge pull request #2234 from GNS3/fix-tests
Fix tests
2023-06-02 20:32:25 +09:30
Jeremy Grossmann 088ae699de Merge pull request #2223 from GNS3/fix/2214
Use proc.communicate() when checking for subprocess output
2023-06-02 20:29:40 +09:30
grossmj 21dc2a8dbc Fix tests 2023-06-02 20:25:33 +09:30
Jeremy Grossmann aae7bf9865 Merge pull request #2231 from GNS3/fix/3452
Fix Docker + VNC issues
2023-06-02 20:24:55 +09:30
grossmj 4338afab7f Fix tests 2023-06-02 20:16:06 +09:30
Jeremy Grossmann ef62eba4e8 Merge pull request #2233
Fix unexpected indent
2023-06-02 20:08:55 +09:30
grossmj cc4ead40e2 Fix unexpected indent 2023-06-02 20:08:21 +09:30
Jeremy Grossmann 67943c4727 Merge pull request #2232 from Mlastawi/master
Parse name for request to node creation from template
2023-06-02 18:16:29 +09:30
Mlastawi 045c0c4c14 Add missing comma 2023-06-02 10:38:42 +02:00
Maciej Łastawiecki a0943b0b5a Parse name for request to node creation from template 2023-06-02 09:39:08 +02:00
grossmj 84c886b058 Remove left over Xvfb related code 2023-05-31 21:33:39 +09:30
grossmj e59b5fb95b Remove Xvfb + x11vnc support 2023-05-31 21:28:06 +09:30
Jeremy Grossmann cc4d6759e3 Merge pull request #2229 from GNS3/fix/3472
Fix support for the GNS3 VM on macOS with VirtualBox 7
2023-05-31 20:46:39 +09:30
grossmj e45467af57 Use the correct VirtualBox host-only type 2023-05-31 20:39:25 +09:30
grossmj c6d6fcfe66 Search for correct VirtualBox network type 2023-05-31 20:19:13 +09:30
grossmj 73bcd019cc Require a Host-Only Network to start the VirtualBox GNS3 VM on macOS with VirtualBox 7 2023-05-30 21:22:57 +09:30
grossmj 2361e138ec Properly catch aiohttp client exception. Ref #2228 2023-05-30 16:17:12 +09:30
grossmj 0f02cff5f2 Catch ConnectionResetError when waiting for the wrap console 2023-05-25 18:29:19 +08:00
grossmj 72af145a23 Fix open IPv6 address for HTTP consoles on controller. Fixes https://github.com/GNS3/gns3-gui/issues/3448 2023-05-22 19:42:01 +08:00
grossmj 8cc0244c5a Upgrade dependencies 2023-05-22 15:21:57 +08:00
grossmj b3dfb87622 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.96be36058f5df0ca7e7f.js
#	gns3server/utils/images.py
#	gns3server/version.py
#	requirements.txt
#	tests/compute/docker/test_docker_vm.py
#	tests/controller/test_controller.py
2023-05-22 15:11:17 +08:00
grossmj d03e7ac9c5 Fix tests 2023-05-14 14:20:45 +08:00
grossmj af2fc8c111 Use proc.communicate() when checking for subprocess output
As recommended in https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process.stderr
2023-05-14 13:58:50 +08:00
Jeremy Grossmann 25c03b7823 Merge pull request #2220 from GNS3/release-v2.2.39
Release v2.2.39
2023-05-08 20:27:28 +08:00
grossmj b4bfb24a80 Development on v2.2.40.dev1 2023-05-08 20:26:40 +08:00
grossmj d6ea546ff7 Release v2.2.39 2023-05-08 19:17:02 +08:00
grossmj 68f9c55f3d Install web-ui v2.2.39 2023-05-08 19:10:22 +08:00
Jeremy Grossmann 9868c28bc6 Merge pull request #2219 from GNS3/install-qemu-empty-disks
Install empty Qemu disks
2023-05-08 16:58:26 +08:00
grossmj f3f7921525 Add generic function to install resource files 2023-05-07 21:57:44 +08:00
grossmj 65cc12c850 Sync appliance files 2023-05-05 22:46:42 +08:00
grossmj 161f62d083 Install empty Qemu disks on first start 2023-05-05 22:40:58 +08:00
grossmj af2b5c3448 Upgrade dependencies 2023-04-30 23:17:01 -10:00
grossmj 1591ca114d Upgrade dependencies 2023-04-23 05:33:12 -10:00
grossmj d6141d4652 Fix checking for ":" in project dir on Windows for Docker containers 2023-03-23 22:17:29 -10:00
grossmj 8bf5eb2754 Upgrade sentry-sdk 2023-03-23 21:41:50 -10:00
Jeremy Grossmann ce220e5ae4 Merge pull request #2211 from eantowne/master
remote-install.sh: added variable declaration
2023-03-24 03:03:12 +08:00
eantowne 791ce6a56e Added declaration for in remote-install.sh to resolve 'unary operator operator expected' error 2023-03-23 07:59:20 -04:00
Jeremy Grossmann 66157a335d Merge pull request #2207 from GNS3/pyproject-migration
Support for pyproject.toml
2023-03-21 18:00:13 +08:00
grossmj 513bc0fb16 Do not use setup.py directly 2023-03-21 18:56:00 +10:00
grossmj ffe35b6559 Migrate to pyproject.toml 2023-03-21 17:41:01 +10:00
grossmj f08ce9d3f1 Check for colon in project name. Fixes #2203 2023-03-19 18:26:26 +10:00
Jeremy Grossmann 2bb71838ac Merge pull request #2204 from GNS3/fix/2203
Allow ':' in project name when using Docker containers
2023-03-19 16:00:04 +08:00
grossmj f347e21100 Fix Docker tests 2023-03-19 17:56:07 +10:00
grossmj 3fb138b9a1 Allow ':' in project name when Docker containers are used 2023-03-19 17:29:29 +10:00
grossmj 9de847fc45 Upgrade Fastapi to v0.95.0 2023-03-19 11:18:58 +10:00
grossmj ea550508f6 Fix uvicorn dependency version 2023-03-17 17:48:14 +10:00
grossmj 267c4cbbbb Merge branch '2.2' into 3.0
# Conflicts:
#	README.md
#	gns3server/compute/base_node.py
#	gns3server/compute/dynamips/__init__.py
#	gns3server/compute/dynamips/hypervisor.py
#	gns3server/compute/qemu/__init__.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/schemas/qemu_template.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.11410ae4eaf4d4c08cd0.js
#	gns3server/version.py
#	requirements.txt
2023-03-17 17:44:32 +10:00
grossmj c33a13fd45 Upgrade dependencies 2023-03-17 16:23:48 +10:00
grossmj ceb8208002 Upgrade distro and aiohttp dependencies 2023-03-01 18:03:28 +10:00
grossmj 42767eff56 Development on 2.2.39.dev1 2023-02-28 17:09:39 +10:00
Jeremy Grossmann 0406083991 Merge pull request #2192 from GNS3/2.2
Release v2.2.38
2023-02-28 14:41:03 +08:00
grossmj 91dba66800 Release v2.2.38 2023-02-28 15:35:17 +10:00
grossmj 69b741a01e Sync appliance files 2023-02-28 15:31:02 +10:00
grossmj 8903ab8a47 Bundle web-ui v2.2.38 2023-02-28 15:29:17 +10:00
grossmj 4d62c6943b Merge branch 'master' into 2.2 2023-02-28 15:07:48 +10:00
grossmj 2a66f67b5f Merge remote-tracking branch 'origin/2.2' into 2.2 2023-02-27 22:59:08 +10:00
grossmj 8ef59c7832 Fix c7200_i0_log.txt is created in the current directory. Fixes #2191 2023-02-27 22:58:52 +10:00
Jeremy Grossmann cbdab1f0d7 Merge pull request #2190 from GNS3/check_tpm
Check swtpm version and start it before qemu
2023-02-26 18:59:08 +08:00
grossmj 7968ee7ff2 Check swtpm version and start swtpm before qemu 2023-02-26 20:51:24 +10:00
Jeremy Grossmann be557abba9 Merge pull request #2185 from Xatrekak/master
Update remote-install.sh and add welcome.py
2023-02-19 13:02:54 +08:00
Jeremy Grossmann 3040e87a7d Merge pull request #2189 from GNS3/fix/2188
Fix broken websocket console with Python 3.11
2023-02-18 15:44:06 +08:00
grossmj 1f85abb036 Fix broken websocket console with Python 3.11 2023-02-18 15:32:57 +08:00
grossmj d867e1f1c1 Fix tests 2023-02-17 21:25:19 +08:00
grossmj 1490e458b6 Upgrade fastapi to v0.92.0. Fixes #2186 2023-02-17 18:52:18 +08:00
grossmj 30c85703c8 Attempt to fix "cannot reopen console". Ref #2182 2023-02-13 19:32:44 +08:00
Xatrekak 4bdd405bc5 Merge branch 'final_stacked_merge'
This updates the script to assume that welcome.py has been merged into the GNS3 master repo
2023-02-12 18:46:38 -05:00
Xatrekak 229168367b Merge branch 'remote_install_changes'
Changes to remote-install to make it compatible with the latest versions of ubuntu server. Also adds an option to install the welcome dialog from gns3vm
2023-02-12 18:44:12 -05:00
Xatrekak e257fb425e This commit is stacked and assumes welcome.py has already been merged into the GNS3 master repo 2023-02-12 18:30:01 -05:00
Xatrekak fac224ac48 Updated to latest welcome.py commit. Raw cache still bugged 2023-02-12 17:26:53 -05:00
Xatrekak 62c2ca9be1 Added Web UI to Dialog 2023-02-12 17:20:25 -05:00
Xatrekak f98a60fc74 added an OS update to end when using welcome option 2023-02-12 14:42:53 -05:00
Xatrekak 42a5f1956e Changed mechanism used to set gns3 user password that works on all shells. 2023-02-12 14:21:01 -05:00
Xatrekak 13df828ca7 switched to a direct link to the latest commit instead of the branch alias to bypass github raw caching issues. 2023-02-12 13:12:20 -05:00
Dustin 19a8d1caed Update welcome.py 2023-02-12 12:59:06 -05:00
Xatrekak 290df5290a fixed transcription 2023-02-12 02:48:17 -05:00
Xatrekak fbe10360c2 Finished gns3 user setup 2023-02-12 02:44:15 -05:00
Xatrekak ac042b02c4 changes self.d to self.display so it would be more intuitive. 2023-02-12 02:30:28 -05:00
Xatrekak e44999f588 Refactored welcome.py to use a class so its functions would be callable by remote-install.sh. This ensure the setup uses the same IP address that will be displayed by Dialog. 2023-02-12 02:07:18 -05:00
Xatrekak 952b4e7249 fixed some shell bugs 2023-02-11 23:24:23 -05:00
Xatrekak 3b0336bd7e fixed typo 2023-02-11 22:23:45 -05:00
Xatrekak 7689b7841f switched to modifed welcome by and full path to it 2023-02-11 21:00:37 -05:00
Xatrekak bf5970b904 Update install and welcome to support running it 2023-02-11 19:57:54 -05:00
Xatrekak 2eca92e34d The legacy get_ip function no longer worked on new versions of ubuntu LTS. 2023-02-11 18:05:03 -05:00
Xatrekak 70d3f991ed Add welcome.py script from GNS3vm 2023-02-11 17:57:12 -05:00
Jeremy Grossmann 77b6ef1a1b Merge pull request #2179 from GNS3/vmware-virtualbox-deprecated
Mark VMware and VirtualBox support as deprecated
2023-02-06 06:26:28 +05:45
grossmj aaa6ca9445 Mark VMware and VirtualBox support as deprecated 2023-02-05 10:09:55 +08:00
Jeremy Grossmann 2b6bec1b93 Merge pull request #2178 from GNS3/fix/2177
Fix Qemu binary not set when adding appliance from template
2023-02-04 10:12:30 +05:45
grossmj 0f49911432 Fix Qemu binary not set when adding appliance from template 2023-02-04 12:18:52 +08:00
grossmj 9c158848bd Make port name for custom adapters optional. Fixes https://github.com/GNS3/gns3-web-ui/issues/1430 2023-02-01 16:19:39 +08:00
grossmj 3a6ff9b44f Add long description content type in setup.py 2023-02-01 09:56:02 +08:00
grossmj 83cb8693e6 Automatically add new issues to GNS3 project 2023-01-31 09:31:52 +08:00
grossmj e5ecdd270d Development 2.2.38.dev1 2023-01-25 18:36:39 +08:00
grossmj 260ac44e87 Release v2.2.37 2023-01-25 15:06:12 +08:00
grossmj 1fa4632b55 Merge branch 'master' into 2.2 2023-01-25 14:44:54 +08:00
grossmj a0cf711634 Bump version to 2.2.37.dev3 2023-01-25 14:13:07 +08:00
grossmj b83645c531 Add web-ui v2.2.37 2023-01-24 15:06:21 +08:00
grossmj a7daae1c6a Sync appliances 2023-01-24 14:57:58 +08:00
grossmj a7d19fd89a Fix StreamWriter doesn't have the wait_closed() method in Python3.6. Fixes #2170 2023-01-20 13:14:57 +08:00
grossmj 3c2ae5363c Install built-in appliances when no previous version has been detected. Fixes #2168 2023-01-17 13:39:01 +08:00
grossmj 24d1aeee32 Bump version to 2.2.37.dev2 2023-01-17 13:30:09 +08:00
grossmj 8d56b7b18c Fix sync_appliances.sh 2023-01-17 13:11:56 +08:00
grossmj 90d7478679 Sync appliances 2023-01-17 13:11:18 +08:00
grossmj fb4c04ac41 Update documentation to install gns3-server. Fixes #2124 2023-01-17 09:45:14 +08:00
Jeremy Grossmann dc1b98a1d0 Merge pull request #2166 from GNS3/fix/2165
Find Dynamips version before hypervisor is started
2023-01-17 07:15:33 +05:45
grossmj c57b0cbb53 Find Dynamips version before hypervisor launch and do not require Dynamips v0.2.23 2023-01-16 18:04:46 +08:00
grossmj ab1f9a4385 Handle Alembic CommandError exceptions 2023-01-13 12:52:31 +08:00
Jeremy Grossmann ce3bf9930c Merge pull request #2160 from GNS3/db-migrations
Support for database schema migrations
2023-01-11 08:21:44 +05:45
grossmj a033080418 Support for database schema migrations using alembic 2023-01-11 10:15:04 +08:00
grossmj af9b883c08 Fix and adjustments after merge 2023-01-10 12:09:36 +08:00
grossmj f09594ae4c Merge branch '2.2' into 3.0
# Conflicts:
#	README.md
#	README.rst
#	tests/handlers/api/compute/test_nat.py
2023-01-10 11:52:58 +08:00
grossmj 5a3b502024 Fix NIO update UDP test 2023-01-10 11:39:18 +08:00
grossmj 997e0ad6ee Fix more tests 2023-01-10 11:22:12 +08:00
grossmj eb3fc1bb3a Fix more tests 2023-01-10 11:09:27 +08:00
grossmj e9c95ff299 Fix tests 2023-01-10 10:07:26 +08:00
grossmj 78c301653f Convert README to Markdown 2023-01-10 08:23:06 +08:00
grossmj 2a392ef991 Merge branch '2.2' into 3.0 2023-01-06 20:09:41 +08:00
grossmj 535f89e29e Give udhcpc executable right. Fixes #2159 2023-01-06 20:09:17 +08:00
grossmj 72e3d8f0c1 Fix tests after merge 2023-01-05 12:57:00 +08:00
grossmj 27d9063e56 Merge 2.2 2023-01-05 12:38:00 +08:00
grossmj f8f5d7ec07 Development on 2.2.37.dev1 2023-01-05 09:13:30 +08:00
grossmj d0141c351b Merge branch '2.2' 2023-01-05 09:12:11 +08:00
grossmj 8e2992fbc7 Release v2.2.36 2023-01-04 19:46:30 +08:00
grossmj 8986f10506 Install web-ui v2.2.36 2023-01-04 19:05:24 +08:00
grossmj 10f3adcb60 Sync appliance files 2023-01-04 18:28:14 +08:00
grossmj 5459543eb5 Fix issue when detecting Dynamips version (version is not set until after Dynamips has started) 2023-01-04 18:21:17 +08:00
grossmj e15c36f05c Merge remote-tracking branch 'origin/2.2' into 2.2 2023-01-04 15:12:26 +08:00
grossmj da7c7d16e4 Fix starting Dynamips on Windows 2023-01-04 15:12:09 +08:00
Jeremy Grossmann 8d69f7f792 Merge pull request #2157 from GNS3/qemu-tpm-support
Trusted Platform Module (TPM) support for Qemu VMs
2023-01-04 10:55:52 +05:45
grossmj 297ada529c Prevent TPM to run on Windows 2023-01-04 12:57:48 +08:00
grossmj ae200d9add Add Trusted Platform Module (TPM) support for Qemu VMs 2023-01-04 12:13:19 +08:00
Jeremy Grossmann eb1b70456f Merge pull request #2155 from GNS3/fix/2143
Binding address for console
2023-01-04 07:00:33 +05:45
grossmj 9132002b80 Fix typos 2023-01-04 09:08:40 +08:00
grossmj 771a9a5ddb Require Dynamips 0.2.23 and bind Dynamips hypervisor on 127.0.0.1 2023-01-02 15:26:59 +08:00
Jeremy Grossmann 04ba3b6549 Merge pull request #2154 from GNS3/fix/2069
Use a stock BusyBox for the Docker integration
2023-01-01 16:18:37 +05:45
grossmj 8f9800f444 Update README.rst about static busybox 2023-01-01 18:24:42 +08:00
Jeremy Grossmann 90c971ed74 Merge pull request #2152 from GNS3/fix/2151
Install built-in appliance files at the first start of a newer version of the server
2023-01-01 15:40:48 +05:45
grossmj d2ad9dc5e2 Delete the built-in appliance directory before installing updated files 2023-01-01 17:49:00 +08:00
grossmj e5c8ae4bde Use a stock BusyBox for the Docker integration 2023-01-01 17:04:48 +08:00
grossmj 5bccf4841d Overwrite built-in appliance files when starting a more recent version of the server 2023-01-01 15:57:41 +08:00
grossmj b3a6b9173b Fix reset console. Fixes #1619 2022-12-31 09:43:17 +08:00
grossmj 2d6b260188 Revert "Install importlib-resources==1.3 with Python < 3.9"
This reverts commit 343022c63b.
2022-12-30 21:13:59 +08:00
grossmj c814245426 Revert "Change importlib-resources dependency to v1.4.0"
This reverts commit d787f38c21.
2022-12-30 21:13:49 +08:00
grossmj d787f38c21 Change importlib-resources dependency to v1.4.0 2022-12-30 21:09:54 +08:00
grossmj 343022c63b Install importlib-resources==1.3 with Python < 3.9 2022-12-30 21:05:18 +08:00
grossmj 1148dbc48e Fix issue when calling reset_console with running VPCS and Qemu nodes. Ref #1619 2022-12-30 20:54:37 +08:00
grossmj 85679aaa94 Try importlib-resources for Python 3.9 2022-12-30 11:44:29 +08:00
grossmj 5bcc247881 Make gns3server.appliances a package 2022-12-30 11:37:34 +08:00
grossmj b8d595928b Try to fix tests 2022-12-30 10:35:29 +08:00
grossmj 3804249d89 Fix tests 2022-12-30 10:01:43 +08:00
grossmj c56a8ef8f7 Only use importlib_resources for Python < 3.9. Fixes #2147 2022-12-30 09:15:40 +08:00
grossmj 076e85ddb3 Update sentry-sdk dependency 2022-12-28 15:13:26 +08:00
grossmj 2550fb3495 Support when the user field defined in Docker container is an ID. Fixes #2134 2022-12-28 11:05:22 +08:00
grossmj f837912ebc Development on 3.0.0.dev7 2022-12-28 08:29:26 +08:00
grossmj 830cc108d0 Release v3.0.0a3 2022-12-27 15:22:16 +08:00
grossmj 36ffe2bb59 Sync appliances 2022-12-27 13:40:07 +08:00
grossmj f8739eb5e1 Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	gns3server/crash_report.py
#	gns3server/version.py
#	requirements.txt
2022-12-27 13:28:11 +08:00
grossmj 5bc030688e Sync web-ui v3.0.0a3 2022-12-27 13:17:12 +08:00
grossmj 9f75a49e0a Fix syntax error in .whitesource 2022-12-27 12:27:26 +08:00
grossmj 7f440f43d8 Add more base branches for Mend to scan 2022-12-27 12:25:49 +08:00
grossmj 3e29ae4276 Add config option to change the server name. Ref #2149 2022-12-27 10:05:13 +08:00
Jeremy Grossmann 91b50eb5f2 Merge pull request #2146 from GNS3/fix/2126
Improve image discovery process
2022-12-26 10:23:57 +05:45
grossmj c6e31d98db Option to disable image discovery and do not scan parent directory 2022-12-26 12:32:40 +08:00
grossmj 9a7b3bed25 Allow raw images by default. Fixes https://github.com/GNS3/gns3-server/issues/2097 2022-12-26 11:28:51 +08:00
grossmj 8ad7b3f613 Fix bug when creating Dynamips router with chassis setting 2022-12-24 18:03:00 +08:00
Jeremy Grossmann 00691390eb Merge pull request #2145 from GNS3/fix/2144
Stricter checks to create/update an Ethernet switch and add tests
2022-12-24 06:16:18 +05:45
grossmj 17e0b2e259 Stricter checks to create/update an Ethernet switch and add tests 2022-12-24 08:20:51 +08:00
grossmj 5666b43ee0 Fix schema for removing WICs from Cisco routers. Fixes #3392 2022-12-22 20:02:28 +08:00
grossmj 84f256dd88 Downgrade to flake8 v5.0.4 2022-12-22 09:46:11 +08:00
grossmj 1bbecf1ceb Update dependencies 2022-12-22 09:42:14 +08:00
grossmj 72a4d0df4e Update GH actions checkout and setup-python 2022-12-22 09:35:45 +08:00
grossmj 93449c942f Fix tests 2022-12-22 09:24:17 +08:00
grossmj 649173b293 Merge remote-tracking branch 'origin/master' 2022-12-21 17:14:00 +08:00
grossmj 1c183e660f Downgrade Ubuntu to 20.04 to fix missing Python 3.6 2022-12-21 17:12:09 +08:00
Jeremy Grossmann 634e6a3549 Update SECURITY.md 2022-12-20 21:28:46 +08:00
grossmj a91ed34f43 Downgrade Ubuntu to 20.04 to fix missing Python 3.6 2022-12-18 14:24:50 +08:00
grossmj 5209009df9 Upgrade dependencies 2022-12-18 14:14:56 +08:00
grossmj 5ba526e175 Development on v2.2.36.dev2 2022-11-11 00:36:47 +08:00
grossmj d17c243b13 Release v2.2.35.1 2022-11-10 22:21:13 +08:00
grossmj 9e4ae6bc24 Sync appliance files 2022-11-10 22:10:21 +08:00
grossmj 4b410cfa42 Merge branch 'master' into 2.2 2022-11-10 22:06:09 +08:00
grossmj b9e415b6fe Push missing file for Web-Ui v2.2.35 2022-11-10 13:09:10 +08:00
grossmj d2d327cc76 Re-release Web-Ui v2.2.35 2022-11-10 12:38:33 +08:00
grossmj 7643185fa2 Add missing importlib_resources 2022-11-09 23:14:38 +08:00
grossmj 263febecbc Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	appveyor.yml
#	dev-requirements.txt
#	gns3server/compute/base_node.py
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/utils/get_resource.py
#	gns3server/version.py
#	gns3server/web/route.py
#	requirements.txt
#	tests/handlers/api/compute/test_qemu.py
#	win-requirements.txt
2022-11-09 20:30:28 +08:00
grossmj 0a046e43d7 Development on 2.2.36.dev1 2022-11-09 20:02:20 +08:00
grossmj a7036d14d5 Merge branch '2.2' 2022-11-09 20:00:48 +08:00
grossmj 1aca7dbe04 Release v2.2.35 2022-11-08 23:40:25 +08:00
grossmj 338128ca3e Upgrade pywin32 to v305 2022-11-08 23:39:10 +08:00
grossmj e165cc48e3 Use Visual Studio 2022 in appveyor.yml 2022-11-08 23:09:23 +08:00
grossmj c80a55b18c Install appliances and configs without importlib_resources for Windows only 2022-11-08 23:07:45 +08:00
grossmj 284a4b62fb Fix copying appliances and configs when app is frozen 2022-11-08 22:50:59 +08:00
grossmj d33fefa183 Merge branch 'master' into 2.2 2022-11-08 19:29:39 +08:00
grossmj dfb48c884b Release web-ui v2.2.35 2022-11-08 19:29:21 +08:00
grossmj 18ba60d1a3 Downgrade psutil to v5.9.2 2022-11-08 19:18:07 +08:00
grossmj 521132726e Upgrade psutil to v5.9.4 2022-11-08 18:49:31 +08:00
grossmj f80aca7633 Sync appliance files 2022-11-08 18:40:27 +08:00
grossmj 84914ecfa4 Add debug messages to fix VMnet interface list refresh. Ref https://github.com/GNS3/gns3-gui/issues/3381 2022-11-08 12:54:47 +08:00
grossmj 5696d1ccb7 Fix issues with VMnet interface on macOS >= 11.0. Ref #3381 2022-11-07 23:59:33 +08:00
grossmj 18b0863ba8 Merge remote-tracking branch 'origin/2.2' into 2.2
# Conflicts:
#	requirements.txt
2022-11-07 21:50:59 +08:00
grossmj ece47dc279 Upgrade dependencies 2022-11-07 21:48:45 +08:00
Jeremy Grossmann 6e1d49d8ca Merge pull request #2133 from GNS3/use-importlib-resources
Migrate to importlib_resources
2022-11-07 21:24:35 +08:00
grossmj 2e550d839e Fix tests 2022-11-07 20:33:02 +08:00
grossmj a4b24eaceb Use importlib_resources instead of pkg_resources and install built-in appliances in config dir. 2022-11-07 20:12:03 +08:00
grossmj f04702d607 Fix console vnc don't use configured ports in some case. Fixes #2111 2022-11-06 19:36:31 +08:00
grossmj 6f11df6189 Add missing VMware settings in gns3_server.conf 2022-11-06 19:30:24 +08:00
grossmj 9cf2e4f5a6 Make version PEP 440 compliant 2022-11-06 17:51:31 +08:00
Jeremy Grossmann 9316876f97 Merge pull request #2123 from blueneekone/patch-1
Update gns3.service.systemd
2022-11-04 23:01:57 +08:00
grossmj f3b8f43689 Fix creating asyncio task in Python 3.6 2022-10-30 22:21:28 +08:00
grossmj 2d74d1ad94 Fix tests for Python 3.11 2022-10-30 22:07:44 +08:00
grossmj ec50cc7c0d Support for Python 3.11 2022-10-30 19:04:54 +08:00
grossmj f8ee3b3d50 Upgrade pywin32 to v304 2022-10-19 18:31:17 +08:00
grossmj bbf9c04d20 Upgrade pywin32 to v304 2022-10-19 18:30:28 +08:00
Jeremy Grossmann 67e42f9353 Merge pull request #2128 from GNS3/fix/3393
Update requirements.txt
2022-10-18 22:31:56 +08:00
Jeremy Grossmann 31a490211b Merge branch '2.2' into fix/3393 2022-10-18 22:31:04 +08:00
grossmj c7df8331ed Upgrade to Visual Studio 2022 in appveyor.yml 2022-10-18 21:47:10 +08:00
grossmj de1654a50f Upgrade pip and setuptools in appveyor.yml 2022-10-18 21:40:08 +08:00
grossmj a6959de1f8 Upgrade pytest. Fixes #2130 2022-10-18 21:14:53 +08:00
grossmj 8cfedce468 Use jsonschema v3.2.0 for Python 3.6 2022-10-12 22:13:34 +08:00
grossmj 77dd772314 Allow for more dependency versions at patch level 2022-10-12 22:07:37 +08:00
grossmj 9ff302592c Upgrade to aiohttp 3.8.3 2022-10-12 21:40:23 +08:00
grossmj 6b3d4feab8 Replace deprecated distro.linux_distribution() call 2022-10-11 23:28:11 +08:00
grossmj 78b2b93540 Update dev-requirements.txt 2022-10-11 23:23:15 +08:00
grossmj 0303e21059 Update requirements.txt 2022-10-11 23:01:24 +08:00
grossmj e20d1adb0e Downgrade aiohttp to v3.8.1 2022-10-10 16:30:28 +08:00
grossmj e5bee8ff52 Downgrade Jinja2 to support Python 3.6 2022-10-10 15:52:36 +08:00
grossmj 58471ea7f4 Downgrade aiofiles to support Python 3.6 2022-10-10 15:50:35 +08:00
grossmj 9fb0ba5a71 Upgrade dependencies 2022-10-10 14:29:04 +08:00
Evan Waechtler 3d738e83f5 Update gns3.service.systemd
In reference to bug #1918, the gns3.service.systemd file references ExecPath /usr/bin/gns3server which needs to be changed to /usr/local/bin/gns3server for the daemon/service to run without failure.

Please see the change I made to the service above.
2022-10-02 23:25:58 -06:00
grossmj 19de2732f2 Upgrade to FastAPI 0.85.0 and check embedded web-ui index.html can be found. 2022-09-29 15:11:15 +02:00
grossmj 40c22e389e Merge branch 'master' into 2.2 2022-09-29 14:56:35 +02:00
Jeremy Grossmann 0419c081fe Merge pull request #2083 from a60814billy/fix/binding-on-wrong-interface-in-windows
fix: binding to wrong interface in windows
2022-09-28 17:36:31 +02:00
grossmj dced70a565 Merge branch 'master' into 2.2 2022-09-27 11:55:53 +02:00
grossmj 9a7222b83e Upgrade FastAPI to v0.84.0 2022-09-14 21:09:29 +02:00
grossmj b0e646b97d Fix some issues with HTTP notification streams 2022-09-13 22:10:01 +02:00
grossmj e8973b9c44 Development on 3.0.0dev5 2022-09-07 01:16:14 +02:00
grossmj 317e2b164c Release v3.0.0a2 2022-09-07 01:05:41 +02:00
grossmj 8976a751fa Add web-ui v3.0.0a2 2022-09-07 00:57:08 +02:00
grossmj bcac7874c1 Upgrade FastAPI to v0.82.0 2022-09-04 22:09:48 +02:00
Jeremy Grossmann 0f4c98c7e4 Merge pull request #2110 from GNS3/locked-project
API endpoint to get the locked status of a project
2022-09-03 23:13:06 +02:00
grossmj 2976e220dc Return a boolean directly from API endpoint for project locked status 2022-09-03 23:08:13 +02:00
grossmj 27debfff8d API endpoint to get the locked status of a project 2022-09-03 22:58:44 +02:00
Jeremy Grossmann 3014bd0216 Merge pull request #2108 from GNS3/project-lock-unlock
Global project lock and unlock
2022-08-30 22:54:47 +02:00
grossmj ca3bf592d6 Global project lock and unlock 2022-08-30 22:49:47 +02:00
grossmj 43e60c31c7 Remove empty files after merge 2022-08-30 12:21:05 +02:00
grossmj 426c16e296 Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	appveyor.yml
#	dev-requirements.txt
#	gns3server/controller/compute.py
#	gns3server/crash_report.py
#	gns3server/version.py
#	gns3server/web/route.py
#	pytest.ini
#	requirements.txt
#	tests/compute/dynamips/test_dynamips_router.py
#	tests/compute/test_base_node.py
#	tests/compute/vmware/test_vmware_manager.py
#	tests/compute/vmware/test_vmware_vm.py
#	tests/controller/gns3vm/test_virtualbox_gns3_vm.py
2022-08-30 11:53:12 +02:00
grossmj 0d0a06799d Development on 2.2.35dev1 2022-08-29 11:14:44 +02:00
grossmj eeae27ae0d Merge branch '2.2' 2022-08-29 11:11:29 +02:00
grossmj 8d4df08150 Release v2.2.34 2022-08-28 23:28:12 +02:00
grossmj fd1d8d9d86 Update appliance files 2022-08-28 22:51:26 +02:00
grossmj 4ddce880ea Merge remote-tracking branch 'origin/2.2' into 2.2 2022-08-28 22:32:49 +02:00
grossmj e0209a0491 Downgrade Jinja2 to v3.0.3 2022-08-28 22:32:42 +02:00
grossmj 829eb42c7f Revert "Downgrade Jinja2 to v3.0.3"
This reverts commit ad3d73a7f1.
2022-08-28 22:31:28 +02:00
grossmj ad3d73a7f1 Downgrade Jinja2 to v3.0.3 2022-08-28 22:30:47 +02:00
Jeremy Grossmann e96d8ae497 Merge pull request #2089 from SpikefishSolutions/spikefishjohn-patch-3
Update compute.py
2022-08-28 22:09:44 +02:00
grossmj d996a87246 Require name for custom adapters. Fixes #2098 2022-08-28 17:33:33 +02:00
grossmj b58a54ae7c Allow empty adapter slots for Dynamips templates. Ref https://github.com/GNS3/gns3-gui/issues/3373 2022-08-28 17:05:28 +02:00
grossmj 129f0a631c Use original $PATH in init.sh for Docker containers. Ref #2069 2022-08-28 12:06:56 +02:00
grossmj ad1f1cdb96 Merge remote-tracking branch 'origin/2.2' into 2.2 2022-08-28 00:03:03 +02:00
grossmj ab6c6535c6 Upgrade Sentry dependency 2022-08-28 00:02:54 +02:00
Jeremy Grossmann 3444615253 Merge pull request #2101 from GNS3/upgrade-dev-dependencies
Upgrade dev dependencies
2022-08-28 00:01:53 +02:00
grossmj 028f977823 Revert "Don't install nmap"
This reverts commit b6cf3aabca.
2022-08-28 00:01:26 +02:00
grossmj b6cf3aabca Don't install nmap 2022-08-27 23:55:42 +02:00
grossmj 6546407e5d Upgrade to Python 3.7 for Windows tests 2022-08-27 23:52:59 +02:00
grossmj 46b022f726 Restore missing loop 2022-08-27 23:45:30 +02:00
grossmj 8f296e54f4 Add back loop 2022-08-27 23:41:52 +02:00
grossmj fc7d5be736 Use pytest-asyncio auto mode 2022-08-27 21:10:17 +02:00
grossmj 600c18f04b Remove pytest.ini from tests dir 2022-08-27 21:00:31 +02:00
grossmj 852de03d43 Install latest dev dependencies for Python >= 3.7 2022-08-27 20:40:35 +02:00
grossmj 470e6cb901 Add pytest-asyncio 0.19.0 2022-08-27 19:41:46 +02:00
grossmj e8273fb19e Downgrade to pytest-aiohttp v0.3.0 2022-08-27 19:39:02 +02:00
grossmj 4b3d6572d4 Downgrade to pytest v7.0.1 (last version to support 2022-08-27 19:35:36 +02:00
grossmj fad3df453d Run tests on 2.2 branch 2022-08-27 19:31:24 +02:00
grossmj d1c8f33fc5 Upgrade dev dependencies and fix issues after upgrading to pytest-aiohttp v1.0.4 2022-08-27 19:16:02 +02:00
grossmj 94c617ef1c Upgrade dependencies 2022-08-26 21:41:49 +02:00
Jeremy Grossmann c4b10ac4da Merge pull request #2099 from GNS3/strict-pytest-asyncio
Support for pytest-asyncio strict mode
2022-08-24 21:11:55 +02:00
grossmj 86c44cd6e7 Upgrade dev dependencies and fix tests to support pytest-asyncio strict mode 2022-08-24 21:03:16 +02:00
grossmj 2e91eac1eb Upgrade dependencies 2022-08-23 22:12:01 +02:00
Jeremy Grossmann 3634cc8307 Merge pull request #2094 from mm1ke/master
gns3.service.openrc: make openrc script posix compliant
2022-08-08 19:29:30 +02:00
Michael Mair-Keimberger 3b108563a0 gns3.service.openrc: make openrc script posix compliant 2022-08-08 19:23:29 +02:00
grossmj 6fa3f85b83 Custom adapters should not be in node (compute) properties returned to clients. Fixes https://github.com/GNS3/gns3-gui/issues/3366 2022-08-06 12:37:05 +02:00
grossmj 3948637a46 Fix typo in requirements.txt 2022-08-06 12:21:27 +02:00
grossmj 93b71f806e Development on v3.0.0dev4 2022-08-04 12:29:49 +02:00
grossmj 3ddbd0de64 Release v3.0.0a1 2022-08-04 11:38:17 +02:00
grossmj 541e9702bf Bundle gns3-web-ui v3.0.0a1 2022-08-04 11:12:42 +02:00
grossmj f4b44e072d Merge remote-tracking branch 'origin/3.0' into 3.0 2022-08-04 11:08:13 +02:00
grossmj 64c6000470 Update appliance files 2022-08-04 11:08:00 +02:00
grossmj 33087a6c21 Do not use build-optimizer when bundling web-ui. Ref https://github.com/GNS3/gns3-web-ui/issues/1366 2022-08-04 11:04:33 +02:00
grossmj 8670377e3b Do not use build-optimizer when bundling web-ui. Ref https://github.com/GNS3/gns3-web-ui/issues/1366 2022-07-31 12:39:42 +02:00
grossmj 31ae70894e Fix enum use in schemas 2022-07-26 23:17:39 +02:00
Jeremy Grossmann bd9af3fe90 Merge pull request #2091 from GNS3/use-themed-symbols
Let the controller allocate symbols
2022-07-25 20:45:04 +02:00
grossmj 6d0c375323 Use default symbol theme if none is provided when loading appliances 2022-07-25 20:39:03 +02:00
grossmj 72eb13d941 Allow default symbol theme to be configured 2022-07-25 20:22:12 +02:00
grossmj bfbac2e93a Use generic symbol names 2022-07-25 12:33:40 +02:00
grossmj b7f4a4cbda Fix VMware VM addition 2022-07-25 11:10:01 +02:00
grossmj e693edc7c1 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2022-07-23 12:55:03 +02:00
grossmj 5824f0797a Update web-ui bundled script to use master-3.0 2022-07-23 12:18:50 +02:00
grossmj 725942157e Optionally allow Qemu raw images 2022-07-22 12:39:52 +02:00
Jeremy Grossmann d08a052f94 Merge pull request #2086 from GNS3/iou-user-loader-libraries
Support user defined loader/libraries to run IOU
2022-07-20 17:03:18 +02:00
Jeremy Grossmann da626d334f Merge branch '3.0' into iou-user-loader-libraries 2022-07-20 16:44:48 +02:00
grossmj 7f5ad8e225 Ignore image detection for IOU user libraries in image directory 2022-07-20 16:39:24 +02:00
grossmj 037c659f9b Don't show optional token param in API docs 2022-07-20 00:29:42 +02:00
John Fleming 7277d526e3 Update compute.py
Remove check for open project. Without this check a remote can be rebooted and will be usable once the main server polls it again. Without this the main server would need to open a project that already uses the remote server or restart the main server's gns3 process.
2022-07-18 18:43:57 -04:00
grossmj d022b211dc Fix check for 32-bit in ELF header 2022-07-17 23:55:34 +02:00
Jeremy Grossmann 5d4645b2c1 Merge pull request #2087 from GNS3/enhancement/2076
Checks for valid hostname on server side for Dynamips, IOU, Qemu and Docker nodes
2022-07-17 11:59:09 +02:00
grossmj 80f5ca0c3f Checks for valid hostname on server side for Dynamips, IOU, Qemu and Docker nodes 2022-07-17 11:51:29 +02:00
grossmj 86368a1177 Sync appliance files 2022-07-17 00:04:55 +02:00
grossmj e9f4fad0bd Merge remote-tracking branch 'origin/3.0' into 3.0 2022-07-16 12:11:41 +02:00
grossmj b2ba561c0d Only check files (not directories) when looking for new images on file system. 2022-07-16 12:11:26 +02:00
Jeremy Grossmann 83ea96c08d Merge pull request #2085 from GNS3/remove-explicit-204-responses
Remove explicit Response for endpoints returning HTTP 204 status code
2022-07-16 12:07:36 +02:00
grossmj f5e1956dfa Support user defined loader/libraries to run IOU 2022-07-16 11:38:51 +02:00
grossmj 9462bca124 Remove explicit Response for VPCS endpoints returning HTTP 204 status code 2022-07-16 00:14:31 +02:00
grossmj fc6aeb715a Remove explicit Response for endpoints returning HTTP 204 status code 2022-07-16 00:12:18 +02:00
grossmj 5b478fc331 Upgrade dependencies 2022-07-15 11:32:18 +02:00
grossmj 4a1da00601 Make 'vendor_url' and 'maintainer_email' optional for template validation. 2022-07-12 11:55:18 +02:00
Jeremy Grossmann 56734b171b Merge pull request #2084 from GNS3/token-as-a-param
Allow JWT token to be passed as a URL param
2022-07-11 14:27:37 +02:00
grossmj f4b67f2e59 Allow auth token to be passed as a URL param 2022-07-11 14:19:47 +02:00
BoHong Li 790bf4521d fix: use exact match to find interface in windows to avoid get wrong interface 2022-07-06 14:22:11 +08:00
Jeremy Grossmann dd6ca38035 Merge pull request #2082 from GNS3/import-project
Project importation
2022-07-05 23:08:15 +02:00
grossmj 149d086fd8 Reactivate project importation 2022-07-05 23:01:44 +02:00
grossmj 9e5ca50302 Bump version to v2.2.34dev2 2022-06-23 10:55:19 +02:00
grossmj c5f441e1d3 Remove wrong reset_console() method 2022-06-21 17:22:47 +02:00
grossmj 410f062721 Fix config option to disable built-in templates. 2022-06-21 17:17:44 +02:00
grossmj d8b928f1c1 Fix tests. 2022-06-21 16:52:25 +02:00
grossmj d303d13045 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/iou/iou_vm.py
#	gns3server/controller/template_manager.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/iou_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/compute/virtualbox_handler.py
#	gns3server/handlers/api/compute/vmware_handler.py
#	gns3server/handlers/api/compute/vpcs_handler.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/version.py
#	requirements.txt
#	tests/controller/test_controller.py
#	tests/controller/test_project.py
#	tests/handlers/api/controller/test_node.py
2022-06-21 16:45:25 +02:00
grossmj 35ec8bed6e Back to development on v2.2.34dev2 2022-06-21 11:52:58 +02:00
grossmj 0433065b8b Revert "Development on v2.2.34dev2"
This reverts commit 7c5a5a9001.
2022-06-21 11:51:01 +02:00
grossmj 7c5a5a9001 Development on v2.2.34dev2 2022-06-21 11:38:09 +02:00
grossmj 1b32ef7854 Release v2.2.33.1 2022-06-21 10:48:02 +02:00
grossmj f5b1920f8c Add missing web-ui file 2022-06-21 10:24:19 +02:00
grossmj 4341db0ff3 Development on v2.2.34dev1 2022-06-20 21:47:42 +02:00
grossmj 162a8baf7b Release v2.2.33 2022-06-20 20:53:21 +02:00
grossmj 4280655b3a Merge branch 'master' into 2.2 2022-06-20 20:49:51 +02:00
grossmj d47e546fce Release web-ui v2.2.33 2022-06-20 20:37:51 +02:00
grossmj 2b4d623f13 Upgrade sentry-sdk and psutil 2022-06-20 20:05:34 +02:00
grossmj 3c901a84bf Sync appliance files. 2022-06-20 20:02:04 +02:00
grossmj ec3c36d6da Fix Docker tests 2022-06-19 21:18:54 +02:00
grossmj 908911e764 Remove parameter "Name" not useful to create a Docker container 2022-06-18 19:41:20 +02:00
grossmj bdd703a0dc Support to reset all console connections. Ref https://github.com/GNS3/gns3-server/issues/1619 2022-06-15 15:30:44 +02:00
Jeremy Grossmann 4acc457674 Merge pull request #2073 from GNS3/disable-builtin-templates
Config setting to disable builtin templates
2022-06-15 15:08:21 +02:00
grossmj 67bf14776f Config option to disable built-in templates 2022-06-15 14:48:52 +02:00
grossmj 2eb64200a4 Add spaces before hostname for Docker network config. Ref #2039 2022-06-12 19:32:34 +08:00
grossmj 988ca7574c Add hostname entry to sample network config for Docker nodes. Fixes #2039 2022-06-08 01:07:31 +08:00
grossmj 527d4bb3ea Run Xtigervnc with MIT-SHM extension disabled for Docker VNC console support. Fixes #2071 2022-06-08 00:05:24 +08:00
grossmj 7d49b80e6b Add controller endpoints to get VirtualBox VMs, VMware VMs and Docker images 2022-06-07 00:38:59 +08:00
Jeremy Grossmann 3b7dfe5929 Merge pull request #2055 from GNS3/remove-qemu-binaries-requirement
Remove Qemu binary requirement
2022-06-06 14:51:07 +08:00
grossmj 30f7c0ce74 Fix issues when discovering images 2022-06-03 15:35:33 +07:00
Jeremy Grossmann 466aaf5c13 Merge pull request #2070 from GNS3/project-export-zstd
zstandard compression support for project export
2022-06-03 11:31:25 +07:00
grossmj c98a10dcfd Do not tweak zstd compression params 2022-06-03 11:26:26 +07:00
grossmj 162af5bb7a Checks for compression levels + tests 2022-06-01 20:26:59 +07:00
grossmj 015e17338c HTTP middleware create issues when streaming project archive 2022-06-01 15:31:59 +07:00
grossmj 940d22f2aa Add missing zstandard dependency 2022-05-31 18:12:32 +07:00
grossmj 8a964390f8 Add zstandard compression support for project export 2022-05-31 18:08:34 +07:00
grossmj 37c7bc4956 Add missing response() method in ComputeConflictError 2022-05-27 16:03:54 +07:00
grossmj 85cdd7d9a5 Fix reading response embedded in ComputeConflictError 2022-05-27 15:58:14 +07:00
grossmj 944a72254c Revert "Sync dev version of web-ui v3"
This reverts commit a9d58e337f.
2022-05-27 14:00:18 +07:00
grossmj a9d58e337f Sync dev version of web-ui v3 2022-05-26 19:37:23 +07:00
grossmj 2d4e9fdd64 Upgrade dependencies 2022-05-26 19:21:37 +07:00
Jeremy Grossmann 1e4075ec37 Merge pull request #2066 from wowpetr/add-openrc-init
Add OpenRC init script
2022-05-26 19:02:23 +07:00
Petr Losev 9d8ddea577 Added OpenRC init script 2022-05-16 07:06:29 +03:00
grossmj df50b46952 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/version.py
#	requirements.txt
2022-04-27 22:23:05 +07:00
grossmj bccfb64958 Development on 2.2.33dev1 2022-04-27 19:51:24 +07:00
grossmj 99813b3cfa Release v2.2.32 2022-04-27 18:47:20 +07:00
grossmj 1837850894 Docker: load custom interface files from /etc/network/interfaces (commented by default). Ref #2052 2022-04-27 18:37:09 +07:00
grossmj fe037a5f1c Merge branch 'master' into 2.2 2022-04-27 18:25:31 +07:00
grossmj b03ec6e3fe Release web Ui 2.2.32 with correct version displayed 2022-04-27 18:24:36 +07:00
grossmj 732c5deeff Revert "Release web UI 2.2.32"
This reverts commit db1443dd08.
2022-04-27 18:19:44 +07:00
grossmj db1443dd08 Release web UI 2.2.32 2022-04-27 18:11:26 +07:00
grossmj 54e638f3ea Update appliance files 2022-04-27 17:26:36 +07:00
grossmj 89c67790ae Make sure that the temporary image file is removed after uploading an image 2022-04-27 16:00:02 +07:00
grossmj cd096ac6e6 Backward compatibility for --log argument 2022-04-27 14:15:29 +07:00
grossmj f5c20b2549 Require Python >= 3.7 2022-04-26 19:11:37 +07:00
grossmj 890dbd9f77 Create /etc/network/interfaces.d in Docker container. Fixes #2052 2022-04-20 22:59:51 +07:00
grossmj 460fe5ed95 Prettify Docker '/etc/network/interfaces' file. Ref #2040 2022-04-20 19:29:56 +07:00
grossmj 653539d2b0 Use public DSNs for Sentry 2022-04-20 18:41:18 +07:00
grossmj 56b5c1d237 Fix VMware Fusion VM does not start on macOS >= 11. Fixes #2027 2022-04-20 18:26:45 +07:00
grossmj f21d5062fc Upgrade some packages 2022-04-20 17:38:54 +07:00
grossmj 2535e5508d Remove Qemu binary requirement 2022-04-19 18:21:39 +07:00
Jeremy Grossmann 2ee9232ac5 Merge pull request #2053 from GNS3/image-md5sum-management
New images detection and checksum handling
2022-04-18 17:22:08 +07:00
grossmj 8b5558ba94 Fix merge error 2022-04-18 17:18:30 +07:00
Jeremy Grossmann b94f01fe4e Merge branch '3.0' into image-md5sum-management 2022-04-18 17:15:21 +07:00
grossmj 3106c8a6a2 Do not cache to md5sum file in some situations 2022-04-18 17:13:52 +07:00
grossmj 34233e48d9 Upgrade FastAPI to version 0.75.2 2022-04-18 13:25:29 +07:00
grossmj 010d7aa49f Upgrade SQLAlchemy version and dispose of db engine 2022-04-17 17:32:44 +07:00
grossmj e6c8144210 Detect new images added to the default image directory.
* Images can be present before the server starts or while it is running
* Images are recorded in the database
2022-04-17 16:58:20 +07:00
Jeremy Grossmann 6af1f2afaa Merge pull request #2049 from GNS3/qemu-disk-images
New implementation to create/resize Qemu disk images
2022-04-14 17:15:55 +07:00
grossmj e50bed5bee Support delete Qemu disk image from API
Return the real disk image name in the 'hdx_disk_image_backed' property for Qemu VMs
2022-04-14 17:01:54 +07:00
grossmj a1c76ec4f2 Fix ComputeConflictError import 2022-04-07 16:34:48 +08:00
grossmj fda2a37b98 Handle creating Qemu disk images and resizing 2022-04-07 16:21:47 +08:00
grossmj 888c773dc0 Finish to clean up local setting usage. Ref #1460 2022-03-31 12:05:47 +08:00
Jeremy Grossmann 2cddb2c05a Merge pull request #2047 from GNS3/local-server-param-refactoring
"Local" command line parameter only for one purpose
2022-03-30 18:51:27 +08:00
grossmj 900d4f79ee "Local" command line parameter is only for stopping
a server that has been started by the desktop GUI
2022-03-30 18:38:34 +08:00
grossmj ce6d1e10d8 Include conf file in MANIFEST.in Ref #2044 2022-03-28 14:45:29 +10:30
grossmj a0fcb18395 Use Python 3.7 to publish API documentation 2022-03-28 11:27:53 +10:30
Jeremy Grossmann 611193b25a Merge pull request #2042 from kaivogelgesang/master
Fix typo
2022-03-23 17:43:48 +10:00
Kai Vogelgesang 73dff4b9c6 Fix typo 2022-03-23 08:38:14 +01:00
grossmj 8975f63e2f Fix AsyncSession handling after breaking changes in FastAPI 0.74.0
See https://github.com/tiangolo/fastapi/releases/tag/0.74.0 for details.
2022-03-20 16:25:48 +10:00
grossmj 9b39bfb845 Detect image type instead of requesting it from user 2022-03-20 16:20:17 +10:00
grossmj 2a5a4b5f77 Use README.md in setup.py 2022-03-16 11:22:28 +10:00
grossmj db739775d0 Drop Python 3.6 support and require Python >= 3.7 2022-03-14 15:13:26 +10:30
grossmj 3edfa53e9e Update README.md 2022-03-14 14:46:29 +10:30
Jeremy Grossmann 4b4f19c415 Create SECURITY.md 2022-03-14 14:27:32 +10:30
Jeremy Grossmann 70e36be4fd Create codeql-analysis.yml 2022-03-14 14:21:50 +10:30
grossmj e897ab6163 Uvicorn version 0.17.6 does not support Python 3.6 2022-03-13 15:46:38 +10:30
grossmj 0a10b41418 Convert README to markdown 2022-03-13 15:44:26 +10:30
grossmj f8a83e7ff9 Merge branch '2.2' into 3.0
# Conflicts:
#	dev-requirements.txt
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/version.py
#	requirements.txt
2022-03-13 14:50:02 +10:30
grossmj 1a535371b6 Upgrade dependencies 2022-03-12 16:23:17 +10:30
grossmj 53f89a7fe5 Development on 2.2.32dev1 2022-02-26 20:39:26 +10:30
grossmj 22c16e3608 Release v2.2.31 2022-02-26 18:22:29 +10:30
grossmj bb26ef2c3d Development on 2.2.31dev1 2022-02-25 15:59:40 +10:30
grossmj 59e4e694e5 Install setuptools v59.6.0 when using Python 3.6 2022-02-25 15:50:45 +10:30
grossmj 74018fae7b Release v2.2.30 2022-02-25 14:52:27 +10:30
grossmj f963e63d16 Merge branch 'master' into 2.2 2022-02-25 14:45:47 +10:30
grossmj 7490be6d5e Support GNS3 variables in Docker environment variables. Fixes #2033 2022-02-23 14:33:30 +10:30
piotrpekala7 fa96c1845c Release web UI 2.2.30 2022-02-16 01:08:59 +01:00
grossmj 4891dc9eee Set setuptools to v60.6.0 2022-02-06 21:02:43 +10:30
grossmj f7cc4e9574 Upgrade dependencies 2022-02-06 17:35:52 +10:30
Jeremy Grossmann 5e4870b008 Merge pull request #2025 from GNS3/drop-windows-support
Drop Windows support
2022-01-19 22:03:06 +10:00
grossmj 74c675d5b0 Drop Windows support 2022-01-19 22:28:36 +10:30
grossmj 4fb0cd9321 Remove unused code 2022-01-18 19:55:36 +10:30
Jeremy Grossmann 4121aa31ac Merge pull request #2024 from SpikefishSolutions/master
Update qemu_vm.py linked node error
2022-01-18 08:16:00 +10:00
John Fleming 7dcc80ff39 Merge pull request #1 from SpikefishSolutions/spikefishjohn-patch-1
qemu_vm.py Linked node test.
2022-01-17 14:38:02 -05:00
John Fleming 511ac73d4f qemu_vm.py Linked node test.
Include project name in error. This should help identify which project the none linked node is located in.
2022-01-17 14:19:49 -05:00
grossmj 63b2b205ab Upgrade FastAPI to version 0.72.0 2022-01-17 18:53:27 +10:30
grossmj 841d3028d6 Upgrade dependencies 2022-01-16 21:31:12 +10:30
grossmj 03f8ea9a6e Fix dead link in README.rst Fixes #2022 2022-01-15 18:49:24 +10:30
grossmj f9312764ba Merge branch 'master' into 3.0
# Conflicts:
#	gns3server/version.py
2022-01-11 22:42:25 +10:30
grossmj 6544f2e8e4 Development on 2.2.30dev1 2022-01-08 22:53:27 +10:30
grossmj aff06572d4 Release v2.2.29 2022-01-08 22:15:15 +10:30
grossmj 35781e9b39 Sync appliance files 2022-01-08 22:11:32 +10:30
grossmj 3251badfa5 Merge branch 'master' into 2.2 2022-01-08 22:02:37 +10:30
piotrpekala7 9559741d1f Release web UI 2.2.29 2022-01-07 21:03:19 +01:00
Jeremy Grossmann 04287a7100 Merge pull request #2018 from tournemire/patch-1
Add NixOS in list of distributions with a package
2022-01-06 21:02:53 +10:00
deltadelta 31352f9a4c Add NixOS in list of distributions with a package 2022-01-06 11:57:00 +01:00
grossmj 10fdd8fcf4 Add connect endpoint for computes
Param to connect to compute after creation
Report compute unauthorized HTTP errors to client
2021-12-24 13:05:39 +10:30
grossmj 36cf43475d Replace CORS origins by origin regex 2021-12-19 18:10:15 +10:30
grossmj d1d36ce254 Change default config settings 2021-12-17 12:26:02 +10:30
grossmj c5a6cd8d33 Update Docker image for tests 2021-12-17 12:20:46 +10:30
grossmj f5301e5f14 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2021-12-16 12:35:11 +10:30
grossmj ef36b340b0 Development on 2.2.29dev1 2021-12-15 21:38:06 +10:30
grossmj bbcc28bbfc Release v2.2.28 2021-12-15 13:54:14 +10:30
grossmj d96d11746e Merge branch 'master' into 2.2
# Conflicts:
#	init/gns3.service.systemd
2021-12-15 13:36:04 +10:30
grossmj 87c1df1639 Fix compute Docker test. Fixes #2003 2021-12-15 13:30:38 +10:30
grossmj b400ae240d Sync appliance files 2021-12-15 13:23:48 +10:30
grossmj ff64f86289 Fix calls to static methods in server.py 2021-12-15 13:08:18 +10:30
piotrpekala7 466584f074 Release web UI 2.2.28 2021-12-13 23:49:42 +01:00
grossmj ab4d964d69 Do not require the local server param to open a .gns3 file. Fixes https://github.com/GNS3/gns3-gui/issues/2421 Ref #1460 2021-12-10 15:52:57 +10:30
grossmj 16fcf6141e Fix tests 2021-12-08 00:43:54 +10:30
grossmj 05d2579907 Do not automatically install appliance after uploading image 2021-12-08 00:01:25 +10:30
grossmj 01a9e83f08 Ignore OSError when closing websocket 2021-12-08 00:00:54 +10:30
grossmj af9860f965 Fix compute Docker test 2021-12-02 22:15:23 +10:30
grossmj 296446189f Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/appliances/Simulator.gns3a
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/version.py
2021-12-02 19:57:04 +10:30
grossmj 5797de8f2d Fix tests 2021-12-02 19:14:55 +10:30
grossmj 8bae921587 Fix packet capture 2021-12-02 18:07:09 +10:30
grossmj 928966ea5f Upgrade dependencies 2021-11-24 17:48:58 +10:30
grossmj 25466a9958 Allow empty compute_id. Ref #1657 2021-11-24 17:25:55 +10:30
Jeremy Grossmann 8995ed37a4 Merge pull request #1990 from GNS3/scalability
Scalability and option to use templates across all computes
2021-11-24 16:38:41 +10:30
grossmj 0d25727ca6 Simpler Systemd service file. Ref #1996 2021-11-20 16:18:09 +10:30
Jeremy Grossmann 488146e802 Merge pull request #1999 from GNS3/compute-authentication
Secure controller to compute communication
2021-11-18 18:48:04 +10:30
grossmj 38388f7ae5 Secure controller to compute communication using HTTP basic authentication 2021-11-18 18:37:10 +10:30
grossmj 8d5d480077 Development on 2.2.28dev1 2021-11-13 16:31:21 +10:30
grossmj 950b43a9cf Merge branch '2.2' 2021-11-13 16:29:40 +10:30
grossmj 2469468c5d Release v2.2.27 2021-11-12 15:33:53 +10:30
Jeremy Grossmann 0d19a742d0 Merge pull request #1997 from jak-sdk/issue-1996
update /var/run -> /run to meet FHS spec & Systemd best practices
2021-11-12 15:26:16 +10:30
grossmj 02a19b230f Sync appliance files 2021-11-12 15:12:15 +10:30
grossmj c077a15137 Merge branch 'master' into 2.2 2021-11-12 14:46:30 +10:30
piotrpekala7 ce08b8914f Release web UI 2.2.27 fixed version 2021-11-10 00:14:25 +01:00
piotrpekala7 f7b7b1e59f Release web UI 2.2.27 2021-11-08 18:13:12 +01:00
jak 6b9511b36a update /var/run -> /run to meet FHS spec & Systemd best practices 2021-11-06 10:00:06 +00:00
grossmj b1a62dfdc2 Fix unhandled KeyError exception when starting Docker container. Ref #1991 2021-11-04 16:59:35 +10:30
Jeremy Grossmann 55e50dae4b Merge pull request #1992 from GNS3/secure-websocket-endpoints
Secure websocket endpoints
2021-11-01 17:10:41 +10:30
grossmj 717a400a11 Fix tests 2021-11-01 17:05:27 +10:30
grossmj 741fc4a557 Secure websocket endpoints 2021-11-01 16:45:14 +10:30
grossmj 7ce5e19a6e Fix issue when updating a template 2021-10-23 16:23:19 +10:30
grossmj 6165778576 Allocate compute when compute_id is unset 2021-10-22 22:03:51 +10:30
grossmj 45738f262b Downgrade to fastapi 0.68.2 because of BrokenResourceError exception
Ref https://github.com/tiangolo/fastapi/issues/4041
2021-10-22 16:16:34 +10:30
Jeremy Grossmann f2d940497b Merge pull request #1989 from GNS3/controller-ip-from-compute
Return the current controller hostname/IP from any compute
2021-10-21 21:54:52 +10:30
grossmj 442a23836e Fix version output test 2021-10-21 21:48:53 +10:30
grossmj bb15b13a9d Return the current controller hostname/IP from any compute 2021-10-21 21:38:36 +10:30
grossmj dddfe7c531 Upgrade dependencies 2021-10-20 16:03:28 +10:30
Jeremy Grossmann 16ac9358df Merge pull request #1986 from GNS3/remove-qemu-legacy-networking
Remove Qemu legacy networking support
2021-10-20 15:44:31 +10:30
Jeremy Grossmann 52d4804e03 Merge pull request #1985 from GNS3/appliances-refactoring
Appliance management refactoring
2021-10-20 15:43:09 +10:30
grossmj eab4c8c770 Remove Qemu legacy networking support 2021-10-19 15:32:27 +10:30
grossmj a31e5615a4 Add a custom version to an appliance 2021-10-19 15:15:10 +10:30
grossmj be473aaaf7 Remove from __future__ import annotations 2021-10-18 22:16:57 +10:30
grossmj 88d98cf02e Fix tests and workaround issue with flake8 2021-10-18 22:12:10 +10:30
grossmj 01da25a7c7 Fix appliance validation with Pydantic 2021-10-18 21:53:29 +10:30
grossmj 13ff7df9fa Validate appliance files with Pydantic 2021-10-18 21:46:50 +10:30
grossmj 04934691df Appliance management refactoring:
* Install an appliance based on selected version
* Each template have unique name and version
* Allow to download an appliance file
2021-10-18 18:04:30 +10:30
grossmj 8a643cf4a4 Sync appliance files 2021-10-18 16:17:27 +10:30
grossmj 48745b5996 Update README.rst for Docker support. Ref #1908 2021-10-18 14:04:31 +10:30
grossmj 7563e4ef29 Update appliance files 2021-10-17 15:09:49 +10:30
Jeremy Grossmann 9ac6bd1e59 Merge pull request #1908 from GNS3/busybox-docker
Use a stock BusyBox for the Docker Integration
2021-10-16 19:47:24 +10:30
Jeremy Grossmann 7d626c3be8 Merge pull request #1911 from GNS3/image-management-refactoring
Images management refactoring
2021-10-10 17:40:10 +10:30
grossmj bc36d95060 Finalize image management refactoring and auto install appliance if possible 2021-10-10 17:35:11 +10:30
grossmj 0b200def88 Merge branch 'master' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	Dockerfile
#	gns3server/version.py
2021-10-09 12:16:50 +10:30
grossmj 1067e60284 Development on 2.2.27dev1 2021-10-08 21:49:11 +10:30
grossmj 6cb8b9a75e Release v2.2.26 2021-10-08 21:02:04 +10:30
grossmj 7009459b0c Merge branch 'master' into 2.2 2021-10-08 20:14:09 +10:30
grossmj 03c94c0bc5 Sync appliance files. 2021-10-08 20:13:32 +10:30
grossmj 568df7e476 Fix running tests with Python 3.10
https://github.com/actions/setup-python/issues/249#issuecomment-934299359
2021-10-07 15:11:53 +10:30
grossmj d485a857a2 Fix running tests with Python 3.10
https://github.com/actions/setup-python/issues/249#issuecomment-934299359
2021-10-07 15:07:36 +10:30
grossmj b59b6816c3 Upgrade dependencies and test using Python 3.10 2021-10-07 14:59:53 +10:30
piotrpekala7 482b46d343 Release web UI 2.2.26 2021-10-06 17:53:00 +02:00
grossmj 94ee197a6e Tests with Python 3.10 2021-10-06 20:27:57 +10:30
grossmj b683659d21 Sqlite doesn't allow BigInteger to be used as an primary key with autoincrement 2021-09-23 11:05:03 +09:30
grossmj faddc5a6b1 Upgrade dependencies 2021-09-23 10:39:27 +09:30
Jeremy Grossmann c386b2d046 Merge pull request #1978 from SDN-Projects/optimization/pip-no-cache-dir
chore : use --no-cache-dir flag to pip in dockerfiles to save space
2021-09-23 09:58:04 +09:30
Pratik Raj de2d72248e chore : use --no-cache-dir flag to pip in dockerfiles to save space
using --no-cache-dir flag in pip install ,make sure downloaded packages
by pip don't cached on system . This is a best practice which make sure
to fetch from repo instead of using local cached one . Further , in case
of Docker Containers , by restricting caching , we can reduce image size.
In term of stats , it depends upon the number of python packages
multiplied by their respective size . e.g for heavy packages with a lot
of dependencies it reduce a lot by don't caching pip packages.

Further , more detail information can be found at

https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2021-09-22 15:17:21 +05:30
grossmj 5ece48500c Sort symbols by theme. Fixes https://github.com/GNS3/gns3-gui/issues/3230 2021-09-20 20:09:58 +09:30
grossmj 5eb5658a74 Fix memory percentage left warning. Fixes #1966 2021-09-20 18:08:02 +09:30
grossmj 3286348a95 Update affinity symbols. Fixes https://github.com/GNS3/gns3-gui/issues/3232 2021-09-20 17:46:19 +09:30
Jeremy Grossmann 395852f203 Merge pull request #1970 from hb9cwp/patch-1
Fix wrong comment for default admin password in config file
2021-09-20 17:17:53 +09:30
Jeremy Grossmann 488a3d0d39 Update gns3_server.conf 2021-09-20 17:09:46 +09:30
grossmj d8bceaad5d Merge branch '3.0' into image-management-refactoring
# Conflicts:
#	gns3server/api/routes/controller/permissions.py
2021-09-20 17:06:46 +09:30
grossmj 5807dd068e Revert "No need to add permissions when the super admin creates templates or projects"
This reverts commit 3d1c3303f9.
2021-09-20 10:36:56 +09:30
grossmj 3d1c3303f9 No need to add permissions when the super admin creates templates or projects 2021-09-18 12:49:54 +09:30
grossmj c8ed96d91b Add isolate and unisolate endpoints. Ref https://github.com/GNS3/gns3-gui/issues/3190 2021-09-15 18:04:43 +09:30
grossmj 898af32cd1 Package websockets 10.0 requires Python >= 3.7 2021-09-15 17:11:24 +09:30
grossmj 0b4dbf27e0 Upgrade dependencies 2021-09-15 17:04:39 +09:30
grossmj 541a906f49 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/node.py
#	gns3server/handlers/api/compute/server_handler.py
#	gns3server/version.py
2021-09-15 16:59:56 +09:30
grossmj 67661616cf Development on v2.2.26dev1 2021-09-14 21:13:04 +09:30
grossmj 6beab9433b Release v2.2.25 2021-09-14 19:20:10 +09:30
grossmj e59e051961 Merge branch 'master' into 2.2 2021-09-14 18:42:39 +09:30
piotrpekala7 6b3f703f94 Release web UI 2.2.25 2021-09-14 10:35:10 +02:00
grossmj d44a6756c1 Sync appliance files 2021-09-12 18:13:21 +09:30
grossmj cdc4cf796b Bump version to 3.0.0dev3 2021-09-11 22:18:01 +09:30
Jeremy Grossmann 4916567ff6 Merge pull request #1971 from hb9cwp/patch-2
REST API example needs additional parameter
2021-09-09 23:03:15 -07:00
Rolf Sommerhalder 6e88d4816f REST API example needs additional parameter
While try this example with GNS3 branch 3.0 on Ubuntu 20.04 LTS, the API call 
```$ curl http://172.17.46.114:3080/v3/users/authenticate -d '{"username": "admin", "password": "admin"}' ```  fails with ```{"detail":[{"loc":["body"],"msg":"value is not a valid dict","type":"type_error.dict"}]}```.

The additional parameter appended to curl fixes this ```{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTYzMTI4NTc4NX0.kT1dAN4v1vHMTBJO2UaI2I7yAFhnSpBU9iqmdDuwtAQ","token_type":"bearer"} ```
Found after googling for the error above in 
FastAPI 0.65.2 POST request fails with "value is not a valid dict" when using the Requests library; 0.65.1 works (with a caveat) #3373
https://github.com/tiangolo/fastapi/issues/3373#issuecomment-886745123
2021-09-09 17:08:26 +02:00
grossmj 6d10d92af2 Fix images_path -> symbols_path 2021-09-09 16:58:42 +09:30
grossmj a8aeb63c91 No need to find the mountpoint first for disk usage. 2021-09-09 16:58:02 +09:30
grossmj 986010446a Remove empty files after merge 2021-09-09 16:55:00 +09:30
grossmj 43ca53a089 Fix tests 2021-09-09 16:54:16 +09:30
grossmj a324459152 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/compute/server_handler.py
#	gns3server/utils/path.py
#	gns3server/version.py
#	requirements.txt
#	tests/compute/qemu/test_qemu_vm.py
#	tests/compute/test_manager.py
2021-09-09 16:36:17 +09:30
Rolf Sommerhalder 6805a61729 Remove duplicate configuration lines 2021-09-09 08:17:58 +02:00
grossmj 6f1feed265 Fix issue preventing to use custom nested symbols. Fixes #1969 2021-09-08 15:13:51 +09:30
Jeremy Grossmann e026c1e91f Merge pull request #1967 from GNS3/affinity-symbols
Update affinity symbols
2021-09-07 19:30:53 -07:00
grossmj 40e565d968 Add comment for svgo 2021-09-08 11:33:04 +09:30
grossmj 5162ef2e22 Updated affinity symbols 2021-09-08 01:08:01 +09:30
grossmj 1923c37092 Shell script to update affinity symbols 2021-09-08 01:05:56 +09:30
grossmj 611570a863 Fix qemu-img rebase code to support Qemu 6.1. Ref https://github.com/GNS3/gns3-server/pull/1962 2021-09-05 22:18:46 +09:30
grossmj 99d7d0c769 Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
2021-09-05 21:53:36 +09:30
Jeremy Grossmann e42b8cb97c Merge pull request #1963 from GNS3/run-with-qemu-6.1
Qemu 6.1 support
2021-09-05 05:15:23 -07:00
grossmj ed336da304 Qemu 6.1 support
Handle the deprecated use of backing file without explicit backing format issue.
2021-09-05 18:34:37 +09:30
Jeremy Grossmann bcf34d0ec8 Merge pull request #1962 from candlerb/candlerb/1955
Reinstate qemu-img rebase
2021-09-04 22:28:52 -07:00
Brian Candler 21e9f38437 Reinstate qemu-img rebase
This allows importing portable projects with images and/or snapshots,
regression introduced by #1927.

Fixes #1955
2021-09-04 12:34:22 +01:00
grossmj f1ecb02160 Small db tables adjustments 2021-09-04 15:23:25 +09:30
grossmj fdc3774fff Add index for "name" field in role table 2021-09-03 15:21:41 +09:30
grossmj a55c9a5c6a Return disk usage for partition that contains the default project directory. Fixes #1947 2021-09-03 12:04:10 +09:30
Jeremy Grossmann 041d2bd2d6 Merge pull request #1953 from GNS3/revert-1951-disk-usage-all-partitions
Revert "List disk usage for all mount points"
2021-09-02 05:29:53 -07:00
Jeremy Grossmann 51c6f3fa31 Revert "List disk usage for all mount points" 2021-09-02 21:59:09 +09:30
Jeremy Grossmann 83cbcac01b Merge pull request #1951 from GNS3/disk-usage-all-partitions
List disk usage for all mount points
2021-09-01 23:21:19 -07:00
grossmj b1224ce9f6 Update schema description for disk_usage_percent. 2021-09-02 15:48:13 +09:30
grossmj a2367d3c04 List disk usage for all mount points. 2021-09-02 15:43:38 +09:30
grossmj 45e0cbeca2 Merge branch 'master' into 2.2 2021-09-02 14:44:39 +09:30
grossmj 1eaabd6b25 Merge remote-tracking branch 'origin/master' 2021-09-01 19:31:46 +09:30
grossmj 4eb8491cfa Fix tests. Fixes #1950 2021-09-01 19:31:37 +09:30
grossmj d606553e20 Allow images to be stored in subdirs and used by templates. 2021-08-30 16:53:41 +09:30
Jeremy Grossmann b843f94068 Merge pull request #1880 from hrnciar/setuptools
Explicitly require setuptools, utils/get_resource.py imports pkg_resources
2021-08-29 22:06:35 -07:00
Jeremy Grossmann f71e7aac9f Merge branch 'master' into setuptools 2021-08-29 22:01:30 -07:00
grossmj 75bb06563a Fix tests 2021-08-30 13:04:24 +09:30
grossmj afdda427d2 Merge branch 'master' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	gns3server/compute/builtin/nodes/nat.py
#	gns3server/compute/qemu/__init__.py
#	gns3server/controller/link.py
#	gns3server/utils/asyncio/embed_shell.py
#	gns3server/utils/asyncio/raw_command_server.py
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2021-08-29 19:23:51 +09:30
grossmj 945e3e3e8e Development on 2.2.25dev1 2021-08-25 21:23:19 +09:30
grossmj 59a89c5f88 Release v2.2.24 2021-08-25 20:31:25 +09:30
grossmj 78c2ded2aa Merge branch 'master' into 2.2 2021-08-25 20:08:26 +09:30
piotrpekala7 6ba40bd5fb Release web UI 2.2.24 2021-08-25 11:57:52 +02:00
grossmj 6005e89181 Fix issue when searching for image with relative path. Fixes #1925 2021-08-25 17:23:21 +09:30
grossmj 27bcb60580 Sync appliance files. 2021-08-24 21:21:18 +09:30
grossmj 93711fe060 Update dependencies 2021-08-24 21:12:27 +09:30
grossmj 363fdb7d10 Fix wrong error when NAT interface is not allowed. Fixes #1943 2021-08-24 20:40:06 +09:30
grossmj 92150fba71 Fix incorrect Qemu binary selected when importing template. Fixes https://github.com/GNS3/gns3-gui/issues/3216 2021-08-24 17:26:06 +09:30
grossmj c4c71cc838 Fix error when updating a link style. Fixes https://github.com/GNS3/gns3-gui/issues/2461 2021-08-24 11:35:33 +09:30
grossmj 332fa47b50 Option to prune images when deleting template. 2021-08-23 10:27:10 +09:30
grossmj bf9a3aee20 Associate images when creating or updating a template. 2021-08-22 15:16:02 +09:30
grossmj 4d9e4e1059 Add prune images endpoint.
Use many-to-many relationship between images and templates.
2021-08-20 15:58:41 +09:30
grossmj 8f30b466e0 Merge remote-tracking branch 'origin/3.0' into 3.0 2021-08-19 14:48:29 +09:30
grossmj 07d4892faf Check if user has the right to add a permission 2021-08-19 14:47:48 +09:30
Jeremy Grossmann 1a5fb1abcc Only use the necessary HTTP methods for default permissions 2021-08-17 23:47:32 +09:30
grossmj 4c6135fe88 Add /permissions/prune to delete orphaned permissions 2021-08-17 21:55:59 +09:30
grossmj 9df586d5d5 Check a permission matches an existing route before it is allowed to be created. 2021-08-17 16:14:15 +09:30
grossmj 8aada49414 Some fixes for early support for Python3.10
The loop parameter has been removed from most of asyncio‘s high-level API following deprecation in Python 3.8.
2021-08-15 15:25:33 +09:30
grossmj 496170b4e5 Early support for Python3.10 Fixes #1940 2021-08-15 15:09:48 +09:30
grossmj 183033dad8 Upgrade unicorn dependency to version 0.15.0 2021-08-15 14:54:35 +09:30
grossmj 75c934f30a Bump version to 3.0.0dev3 2021-08-12 16:05:19 +09:30
grossmj cfaafedb09 Merge branch '3.0' into busybox-docker 2021-08-11 18:36:30 +09:30
grossmj d0a9425392 Remove busybox and copy system busybox in setup.py 2021-08-11 17:27:47 +09:30
grossmj 078c42f185 Save image size + start to automatic template creation based on image checksum. 2021-08-11 16:58:23 +09:30
grossmj a970d4c4d8 Upgrade dependencies 2021-08-10 23:08:14 +09:30
Jeremy Grossmann f13b4e89b7 Merge branch '3.0' into image-management-refactoring 2021-08-10 05:46:22 -07:00
grossmj ce55ec73a4 Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
grossmj 36b9f8bdfd Fix tests 2021-08-10 15:58:13 +09:30
grossmj 3ae7783360 Fix "-machine accel=tcg" check 2021-08-10 15:41:05 +09:30
grossmj c5c95979c2 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/compute/qemu/utils/qcow2.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/server_handler.py
#	gns3server/version.py
2021-08-10 15:38:49 +09:30
Jeremy Grossmann 731152c75a Merge pull request #1938 from GNS3/dependabot/pip/pywin32-301
Bump pywin32 from 300 to 301
2021-08-09 17:59:35 -07:00
dependabot[bot] 2897325f36 Bump pywin32 from 300 to 301
Bumps [pywin32](https://github.com/mhammond/pywin32) from 300 to 301.
- [Release notes](https://github.com/mhammond/pywin32/releases)
- [Changelog](https://github.com/mhammond/pywin32/blob/master/CHANGES.txt)
- [Commits](https://github.com/mhammond/pywin32/commits)

---
updated-dependencies:
- dependency-name: pywin32
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 20:45:46 +00:00
grossmj 6dd0f4d4d3 Allow logged in user to change some of its data. Administrators can lock users using the is_active field. 2021-08-09 16:36:18 +09:30
grossmj 8c0899d086 Development on 2.2.24dev1 2021-08-05 21:16:10 +09:30
grossmj d5c73f4ba4 Release v2.2.23 2021-08-05 15:58:54 +09:30
grossmj 77487e4fc3 Merge branch 'master' into 2.2 2021-08-05 15:54:16 +09:30
grossmj 754f55b01b Sync appliance files. 2021-08-05 15:53:12 +09:30
Jeremy Grossmann b68f7a78a7 Merge pull request #1927 from candlerb/candlerb/1921
Support cloning of encrypted qcow2 base image files
2021-08-04 23:19:23 -07:00
piotrpekala7 6c36beb97f Release web UI 2.2.23 2021-08-04 10:59:50 +02:00
Jeremy Grossmann c231ae77e5 Merge pull request #1935 from rarylson/detect-kms-support
Update `remote-install.sh` with flag for KMS support and fix hostname inconsistencies
2021-08-01 15:28:42 -07:00
Rarylson Freitas e5a76fcf44 Fix hostname inconsistencies during script execution
When `--with-iou` and `--with-openvpn` are both enabled, hostname
were updated in `/etc/hostname` but not on the running system (only
changed after reboot). So the old hostname were used in MOTD and
client OpenVPN config URL.
2021-08-01 17:49:27 -03:00
Rarylson Freitas d926a713b9 Add option --without-kvm
Some cloud providers (example, AWS EC2 for non-metal instances) do not
support nested virtualization, as well as some hypervisors (example,
VirtualBox prior to 6.x, Hyper-V on AMD). Option `--without-kvm` can
be used to disable hardware acceleration in these scenarios. Otherwise,
user will receive error when trying to start Qemu-based devices.

Commit also: replace `enable_kvm` and `require_kvm` with newer config
options (`enable_hardware_acceleration` and
`require_hardware_acceleration`); and do some code refactors.

One can argue that, instead of prividing option `--without-kvm`, we
should check if system supports KVM and enable/disable hardware
acceleration accordingly. However, there is the case when the
hypervisor supports nested virtualization, but feature is just disabled.
The chosen approach for this case is to keep KVM enabled and let user
known (user will eventually receive an error) so user can fix it.
Otherwise, user might never know and suffer from performance
degradation.
2021-08-01 17:47:28 -03:00
grossmj 1a24ebfc19 Add a reload server endpoint. Fixes #1926 2021-08-01 16:20:30 +09:30
Jeremy Grossmann 6cf268ca93 Merge pull request #1934 from GNS3/handle_no-kvm_deprecated
Handle -no-kvm param deprecated in Qemu >= v5.2
2021-07-27 17:37:41 +09:30
Jeremy Grossmann 214bef9d06 Merge pull request #1932 from GNS3/mac-address-generation
Change how to generate random MAC addresses
2021-07-27 16:51:29 +09:30
grossmj 4646ce684f Handle -no-kvm param deprecated in Qemu >= v5.2 2021-07-27 16:34:51 +09:30
Jeremy Grossmann d2534d6fa0 Merge pull request #1933 from akrpic77/ak-fix-binary-websocket
Fix binary websocket access to the console
2021-07-26 20:42:54 +09:30
Andrej Krpič 3b7dc21ef0 Fix binary websocket access to the console
telnet_writer.write is not an async method - drain() is.
Remove async keyword so the call is the same as for the text websocket.
2021-07-26 12:58:35 +02:00
grossmj 0ecea8ffbb Change how to generate random MAC addresses 2021-07-25 16:03:54 +09:30
Jeremy Grossmann 6741d6d7a9 Merge pull request #1930 from mm1ke/fix_tests-gwaqIATV
setup.py: prevent installing tests directory
2021-07-13 08:20:13 +08:00
Michael Mair-Keimberger feace0c7dc setup.py: prevent installing tests directory 2021-07-12 19:04:30 +02:00
Brian Candler 1ee3e14bd3 Support cloning of encrypted qcow2 base image files
Fixes #1921
2021-07-09 10:53:02 +01:00
grossmj 1f0ceb6f74 Symbols endpoints (except upload) don't require authentication. 2021-06-16 20:22:49 +09:30
grossmj c13f5c6627 Update to the udhcpc wrapper script. Ref #1890 2021-06-14 19:28:40 +09:30
grossmj cdedd53339 Fix VMware VM support on Linux and Windows. Fixes #1919 2021-06-14 13:16:11 +09:30
grossmj 91a6384a59 Upgrade dependencies. Fixes #1917 2021-06-12 15:30:26 +09:30
grossmj 229a04e2fa Fix link style merge 2021-06-12 15:26:35 +09:30
Jeremy Grossmann e78b5fa6d6 Fix typo 2021-06-12 15:20:55 +09:30
grossmj 6ec028ea4e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/builtin/nodes/cloud.py
#	gns3server/compute/vmware/vmware_vm.py
#	gns3server/controller/link.py
#	gns3server/controller/snapshot.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/iou_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/link_handler.py
#	gns3server/schemas/link.py
#	gns3server/utils/path.py
#	gns3server/version.py
#	requirements.txt
2021-06-12 14:36:32 +09:30
grossmj 3524e22761 Development on 2.2.23dev1 2021-06-10 16:20:09 +09:30
grossmj 10daab21a3 Release v2.2.22 2021-06-10 15:41:58 +09:30
grossmj 22eb6f7d8c Sync appliance files. 2021-06-10 12:42:43 +09:30
grossmj d556c08def Revert "Skip test"
This reverts commit 8acb2fe3
2021-06-08 12:27:20 +09:30
grossmj 8acb2fe37e Skip test 2021-06-08 12:18:27 +09:30
Jeremy Grossmann 94acf60aef Merge pull request #1913 from GNS3/vmware-bigsur
Fix VMware VM support on macOS BigSur
2021-06-07 19:38:19 -07:00
grossmj c892cf371b Fix VMware support on macOS BigSur 2021-06-08 11:56:33 +09:30
grossmj bfd30f3547 Sync appliance files. 2021-06-07 15:01:45 +09:30
grossmj 095a022033 Fix tests. Ref https://github.com/GNS3/gns3-gui/issues/2461 2021-06-07 14:23:52 +09:30
grossmj 4e34ab8e4f Link style support. Fixes https://github.com/GNS3/gns3-gui/issues/2461 2021-06-07 14:08:21 +09:30
grossmj 8825831106 Upgrade dependencies 2021-06-07 13:46:06 +09:30
grossmj 5da5cbd6d8 Merge branch 'master' into 2.2 2021-06-07 13:34:25 +09:30
grossmj 515bd50261 Start refactoring for images management 2021-06-06 16:52:47 +09:30
piotrpekala7 08f540f417 Release web UI 2.2.22 2021-06-05 10:32:12 +02:00
Jeremy Grossmann 1db1a892b4 Merge pull request #1910 from fabaff/patch-1
Set py-cpuinfo to 8.0.0
2021-06-04 04:49:26 -07:00
Fabian Affolter 7ff72879dd Set py-cpuinfo to 8.0.0 2021-06-04 13:36:21 +02:00
Jeremy Grossmann 48d0c6b183 Merge pull request #1905 from candlerb/candlerb/1904
Preserve auto_start/auto_open/auto_close when restoring snapshot
2021-06-04 02:06:38 -07:00
grossmj f64b5cd9b6 Allow controller to be reloaded using the API. Fixes #1743 2021-06-04 17:01:07 +09:30
grossmj 6a726d0344 Fix formatting issue. 2021-06-03 19:32:00 +09:30
grossmj dc914eb0f9 Fix tests. 2021-06-03 19:11:11 +09:30
grossmj 9b0e3a77ed Use a stock BusyBox for the Docker Integration 2021-06-03 18:38:08 +09:30
grossmj 8be015cd86 Move "/{project_id}/templates/{template_id}" endpoint. 2021-06-03 18:18:34 +09:30
grossmj 6fb6a27859 Add last login info for users. 2021-06-03 16:57:16 +09:30
grossmj 4e33d29af8 Change RBAC field names from builtin to is_builtin 2021-06-03 16:24:38 +09:30
Jeremy Grossmann 4dd3bc6a98 Merge pull request #1906 from GNS3/rbac
RBAC support
2021-06-02 23:16:07 -07:00
grossmj d65b49acaa Add user permissions + RBAC tests. 2021-06-03 15:40:12 +09:30
grossmj 36a27c0c19 Force refresh of updated_at value for RBAC db models. 2021-06-01 16:12:06 +09:30
grossmj a6d2f48df1 Merge remote-tracking branch 'origin/3.0' into rbac 2021-06-01 16:11:22 +09:30
grossmj 0113ca6673 Force refresh of updated_at value in db models. 2021-06-01 16:09:29 +09:30
grossmj 74d820fd0a Use synchronize_session="fetch" when updating values. 2021-06-01 15:55:50 +09:30
grossmj e9b9884ee3 Merge remote-tracking branch 'origin/3.0' into rbac 2021-06-01 15:50:14 +09:30
grossmj a6c2a3e47f Use synchronize_session="fetch" when updating values. 2021-06-01 13:02:03 +09:30
grossmj 91b0534182 Upgrade dependencies 2021-06-01 12:56:51 +09:30
grossmj 2e2e31337a Add description for user permission. 2021-06-01 12:55:16 +09:30
grossmj fbc47598d9 Basic functional RBAC support. 2021-05-27 17:28:44 +09:30
grossmj 6d4da98b8e Base API and tables for RBAC support. 2021-05-25 18:34:59 +09:30
Brian Candler c051367d4b Preserve auto_start/auto_open/auto_close when restoring snapshot
Fixes #1904
2021-05-24 17:31:04 +01:00
grossmj eb0f8c6174 Save/restore appliances Etag. 2021-05-17 00:37:15 +09:30
grossmj f416d64042 Allow to set the initial super admin username / password in server config file. Ref #1857 2021-05-16 20:01:05 +09:30
grossmj fffbb08a8e Catch SQLAlchemyError exception. 2021-05-16 18:37:17 +09:30
Jeremy Grossmann 150526b1ff Update setup.py
Fixes #1897
2021-05-16 17:44:13 +09:30
grossmj d759564e20 Require authentication for get_user_memberships endpoint. 2021-05-16 17:06:23 +09:30
grossmj 971e86d254 Fix uBridge errors for cloud nodes not visible in logs. Fixes #1895 2021-05-16 14:59:02 +09:30
grossmj 6847e19847 Change method to prevent forbidden directory traversal. Fixes #1894 2021-05-16 14:44:38 +09:30
grossmj 2bf16f1e5f Change method to prevent forbidden directory traversal. Ref #1894 2021-05-16 14:29:56 +09:30
grossmj f3d81fa450 Clean files and catch file path escape. Ref #1894 2021-05-15 22:35:44 +09:30
grossmj 09ac7fd7fb Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_manager.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/iou_handler.py
#	gns3server/handlers/api/compute/project_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/handlers/api/controller/project_handler.py
#	gns3server/handlers/index_handler.py
#	tests/handlers/api/compute/test_project.py
#	tests/handlers/api/compute/test_qemu.py
#	tests/handlers/api/controller/test_node.py
#	tests/handlers/api/controller/test_project.py
2021-05-15 20:46:34 +09:30
Jeremy Grossmann 3a479d7ea6 Merge pull request #1900 from GNS3/prevent-directory-traversal
Prevent directory traversal
2021-05-15 04:09:04 -07:00
grossmj e86d8f96ca Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2021-05-15 20:12:21 +09:30
grossmj 9a6978902d Fix tests. 2021-05-15 19:43:36 +09:30
grossmj 6294ad9e76 Prevent directory traversal 2021-05-15 17:35:32 +09:30
grossmj 8810249d36 Add user groups support. 2021-05-15 15:10:02 +09:30
grossmj 2c938b2c19 Development on 2.2.22dev1 2021-05-10 23:44:40 +09:30
grossmj 03b7d9191b Release v2.2.21 2021-05-10 22:42:46 +09:30
grossmj 87c87ca3cb Sync appliance files. 2021-05-10 22:39:03 +09:30
grossmj dfba40fee2 Merge branch 'master' into 2.2 2021-05-10 22:34:59 +09:30
grossmj 956b9056c1 Fix issues with latest version of sqlalchemy 2021-05-08 15:37:51 +09:30
grossmj 4727708c85 Upgrade dependencies 2021-05-08 14:32:26 +09:30
grossmj 0a77f0035b Add delete cascade on foreign keys for appliance table 2021-05-06 17:25:32 +09:30
grossmj 10164e262d Enable SQL foreign key support for SQLite 2021-05-06 17:21:45 +09:30
grossmj a1f3f6472a Upgrade dependencies 2021-05-06 16:56:07 +09:30
grossmj 912fb2ed29 Fix add node from template. Fixes https://github.com/GNS3/gns3-web-ui/issues/1122 2021-05-06 16:22:16 +09:30
grossmj 60701b63ac Update README to use python virtual env 2021-05-06 15:56:26 +09:30
piotrpekala7 f576bedfaf Release web UI 2.2.21 2021-04-30 14:01:53 +02:00
grossmj a795e0d7c1 Add missing CORS origins. 2021-04-28 21:20:05 +09:30
grossmj d8968cbee8 Merge remote-tracking branch 'origin/3.0' into 3.0 2021-04-28 15:57:39 +09:30
grossmj ad7d8e2e7d Fix tests. 2021-04-28 15:56:11 +09:30
grossmj 41ba215e32 Show topology path when check topology schema fails. 2021-04-27 22:48:55 -07:00
grossmj b1b3338e3c Fix bug when binding on address already in use. 2021-04-28 15:13:31 +09:30
grossmj edb20482c7 Fix bug when no server config file is present. 2021-04-28 14:44:34 +09:30
grossmj 7b3351bba6 Upgrade dependencies. 2021-04-28 14:43:52 +09:30
grossmj d3ace8ff17 Fix user delete endpoint. 2021-04-26 16:21:16 +09:30
grossmj 49be4146d6 Protect controlle notification endpoints. Ref #1888
(WebSocket endpoint is not secured, it takes an optional token).
2021-04-26 16:18:18 +09:30
grossmj a02aede1b0 Use uuid5 to create new compute_id. Fixes #1641 #1887 2021-04-21 13:47:32 +09:30
grossmj dff1ec9bc6 Fix /users/me endpoint. 2021-04-20 19:54:55 +09:30
grossmj 0465cb87f6 Protect the API and add alternative authentication endpoint. 2021-04-20 11:59:02 +09:30
grossmj e28452f09a Secure users API and handle manual password recovery. 2021-04-19 09:40:04 +09:30
grossmj c03226e368 Add default super admin account in controller db. 2021-04-18 17:39:47 +09:30
grossmj 9404c00411 Complete type annotations for API endpoints. 2021-04-18 15:40:38 +09:30
grossmj cefab8d362 Rename __json__() to asdict() 2021-04-17 23:34:28 +09:30
grossmj 44074ff7c9 Some cleaning. 2021-04-17 18:36:32 +09:30
grossmj bad3ef7003 Detect the app is exiting and avoid reconnecting to computes. 2021-04-17 18:33:20 +09:30
grossmj 6b8ce8219c Fix tests. 2021-04-15 18:30:22 +09:30
grossmj 9c850e0f2b Move schemas between compute and controller subpackages 2021-04-15 18:12:08 +09:30
grossmj c59fc375f2 Remove traceng code. 2021-04-13 19:03:23 +09:30
Jeremy Grossmann fbd5e12e7b Update GitHub Actions badge 2021-04-13 18:53:39 +09:30
grossmj c021e21309 Use black with -l 120 param. 2021-04-13 18:46:50 +09:30
grossmj f928738bd5 Use pyupgrade with --py36-plus param. 2021-04-13 18:37:58 +09:30
grossmj a9eb035b7d Move error responses to API routers. 2021-04-13 16:19:56 +09:30
grossmj 6b0d0de1bc Wait for local compute to be started.
Don't reconnect to local compute when server is being stopped.
2021-04-13 15:41:59 +09:30
grossmj 71725aade6 Rename ssl and auth configuration file settings.
Add enable SSL config validator.
Strict configuration file validation: any error will prevent the server to start.
Core server logic moved to a Server class.
2021-04-12 23:26:42 +09:30
grossmj 1b5a5de4bc Generate new config for each test. Fixes tests. 2021-04-12 19:37:59 +09:30
grossmj 30ebae207f Use Pydantic to validate the server config file. 2021-04-12 17:02:23 +09:30
grossmj 478119b40d Comment out problematic test 2021-04-10 13:13:28 +09:30
grossmj fa4c9a91ca Add symbol dimensions endpoint and SSL support for packet capture with remote HTTPS server. 2021-04-10 13:01:23 +09:30
grossmj 802959f9ab Merge branch 'master' into 3.0
# Conflicts:
#	dev-requirements.txt
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/controller/compute.py
#	gns3server/controller/topology.py
#	gns3server/handlers/api/compute/ethernet_switch_handler.py
#	gns3server/handlers/api/controller/link_handler.py
#	gns3server/handlers/api/controller/symbol_handler.py
#	gns3server/version.py
#	requirements.txt
#	tests/controller/test_export_project.py
#	tests/handlers/api/compute/test_qemu.py
#	tests/web/test_response.py
#	win-requirements.txt
2021-04-10 12:46:40 +09:30
grossmj 4e61cc811e Improvements for get symbol dimensions endpoint. Ref #1885 2021-04-10 12:28:50 +09:30
Jeremy Grossmann c9c6a5a762 Merge pull request #1885 from GNS3/Create-endpoint-in-symbols-handler-to-get-symbol-dimensions
Create endpoint in symbols handler to get symbol dimensions #1884
2021-04-09 04:59:57 -07:00
grossmj e797ad1b9f Development on 2.2.21dev1 2021-04-09 13:50:20 +09:30
grossmj a50141fcbf Release v2.2.20 2021-04-09 12:14:38 +09:30
grossmj 852151f836 Merge branch 'master' into 2.2 2021-04-09 12:06:01 +09:30
grossmj e5807e5a8c Sync appliance files. 2021-04-09 12:04:20 +09:30
grossmj 87a26d5da0 Fix tests and comment problematic ones that rely on AsyncioMagicMock 2021-04-09 11:57:29 +09:30
piotrpekala7 30cbfe2154 Update picture.py 2021-04-08 23:29:46 +02:00
piotrpekala7 4bbf7c2ed2 Update symbol_handler.py 2021-04-08 21:27:05 +02:00
piotrpekala7 7a8c1e8f5d Release web UI 2.2.20 2021-04-08 13:30:59 +02:00
grossmj 7bb5202bdb Sync appliance files. 2021-04-07 20:58:55 +09:30
grossmj 082206a7db Fix packet capture with HTTPS remote server. Fixes #1882 2021-04-07 12:40:15 +09:30
grossmj 360a819e91 Set PyQt5 version to 5.15.2 on Windows 2021-04-06 22:12:34 +09:30
grossmj adbef787c3 Fix typo 2021-04-06 18:21:59 +09:30
grossmj 685963b85d Sync appliance files and remove old ones after sync with online repo. Fixes #1876 2021-04-06 17:38:11 +09:30
grossmj 31a1fdba68 Update setup.py for Python 3.9 2021-04-06 15:56:46 +09:30
grossmj e614ed79f4 Upgrade dependencies 2021-04-06 13:57:00 +09:30
grossmj 170e83e589 Fix tests and update requirements 2021-04-05 17:43:35 +09:30
grossmj 5217dbf3a3 Fix tests 2021-04-05 14:39:50 +09:30
grossmj 566e326b57 Save computes to database 2021-04-05 14:21:41 +09:30
grossmj e607793e74 Generate a new list in template schema defaults. 2021-04-02 17:45:16 +10:30
grossmj 3b30d51972 Sync appliance files. 2021-04-02 17:43:38 +10:30
grossmj c1784b7684 Workaround to run tests with Python 3.6 2021-04-01 08:49:32 +10:30
Tomas Hrnciar bb47cc87e7 Explicitly require setuptools, utils/get_resource.py imports pkg_resources 2021-03-31 11:58:49 +02:00
grossmj b8e81ad9bc Upgrade dependencies 2021-03-31 16:01:11 +10:30
grossmj 91920e5a5b Fix issue with tests + some cleaning. 2021-03-31 09:58:52 +10:30
grossmj fd844c309e Revert "Install contextvars for python_version < "3.7""
This reverts commit f9127e19
2021-03-28 21:33:16 +10:30
grossmj f9127e199e Install contextvars for python_version < "3.7" 2021-03-28 21:25:13 +10:30
grossmj 0fea3f969e Use aiosqlite and add service for templates 2021-03-28 21:17:29 +10:30
grossmj d730c591b3 Refactor template management to use database. 2021-03-28 11:15:08 +10:30
grossmj b417bc4dec Revert "Upgrade to sqlalchemy version 1.4.2"
This reverts commit 9defc3c4

Ref https://github.com/talkpython/web-applications-with-fastapi-course/issues/4
2021-03-24 14:55:00 +10:30
grossmj 9defc3c4e8 Upgrade to sqlalchemy version 1.4.2 2021-03-24 14:42:30 +10:30
grossmj 6120736c91 Fix export for missing files 2021-03-24 13:16:00 +10:30
grossmj 7542b28793 Revert "Fix tests"
This reverts commit 4d0cb32b
2021-03-24 13:05:50 +10:30
grossmj 4d0cb32bd0 Fix tests 2021-03-24 12:39:22 +10:30
grossmj 055a78bade Fix issue when trying to export temporary Dynamips files. 2021-03-24 12:06:10 +10:30
grossmj fad52ea2fc Development on 2.2.20dev1 2021-03-05 16:48:09 +10:30
grossmj d8054c7cb4 Release v2.2.19 2021-03-05 14:51:03 +10:30
grossmj 91570f475f Launch projects marked for auto open after SIGHUP is received 2021-03-05 14:47:20 +10:30
grossmj 42cda3af2b Sync appliance files. 2021-03-05 14:46:20 +10:30
grossmj e6be6bc958 Merge branch 'master' into 2.2 2021-03-02 17:18:24 +10:30
grossmj b7f8fb283b Sync appliance files. 2021-03-02 17:09:28 +10:30
piotrpekala7 72d5b5e7cc Release web UI 2.2.19 2021-03-02 00:31:54 +01:00
grossmj 8cce0eedee Fix console type error when creating Ethernet switch node. Fixes #1873 2021-03-01 13:55:52 +10:30
grossmj 11c53c128e Sync Juniper vSRX appliance file. 2021-02-24 14:28:12 +10:30
grossmj 17b56ac7cb Sync appliance files. 2021-02-24 14:08:13 +10:30
grossmj 62b1fa8dc4 Upgrae to uvicorn 0.13.3. Fixes #1840 2021-02-18 18:32:53 +10:30
grossmj c17a86e814 Add missing async 2021-02-18 18:14:35 +10:30
grossmj aca7344212 Upgrade Jinja to version 2.11.3. Fixes #1865 2021-02-17 17:23:04 +10:30
grossmj 1add223891 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/controller/server_handler.py
#	gns3server/schemas/project.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
#	gns3server/version.py
#	tests/handlers/api/compute/test_qemu.py
2021-02-16 21:11:40 +10:30
grossmj 3c5bbe04dc Development on 2.2.19dev1 2021-02-16 20:44:58 +10:30
grossmj c213cae500 Release v2.2.18 2021-02-16 19:09:46 +10:30
grossmj 1043be02a6 Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
2021-02-16 19:02:12 +10:30
grossmj 56c25727b6 SIGHUP: remove projects with an empty project directory. 2021-02-16 17:00:59 +10:30
grossmj 0b854ffceb Bump version to 2.2.18dev2 2021-02-16 16:35:26 +10:30
piotrpekala7 366e904698 Release web UI 2.2.18 2021-02-15 23:55:14 +01:00
grossmj 16c84e23a9 Catch OSError exception in psutil. Fixes https://github.com/GNS3/gns3-gui/issues/3127 2021-02-15 15:57:24 +10:30
grossmj 64f172fe20 Expose 'auto_open' and 'auto_start' properties in API when creating project. Fixes https://github.com/GNS3/gns3-gui/issues/3119 2021-02-15 15:16:19 +10:30
Jeremy Grossmann bb0206d7d2 Add mtools package information. Ref https://github.com/GNS3/gns3-gui/issues/3076 2021-02-14 14:55:37 +10:30
grossmj 9de61cd671 Fix warning: 'ide-drive' is deprecated when using recent version of Qemu. Fixes https://github.com/GNS3/gns3-gui/issues/3101 2021-02-14 14:39:02 +10:30
grossmj 9e6ccc3f61 Fix bug when starting of vpcs stopped with "quit". Fixes https://github.com/GNS3/gns3-gui/issues/3110 2021-02-14 13:50:10 +10:30
grossmj 4c339eade1 Fix WinError 0 handling 2021-01-27 21:47:14 +10:30
grossmj 128e494134 Stop uBridge if VPCS node has been terminated. Ref https://github.com/GNS3/gns3-gui/issues/3110 2021-01-27 21:03:19 +10:30
Jeremy Grossmann 0e6b97b27b Merge pull request #1856 from BrentBaccala/master
Allow cloned QEMU disk images to be resized before the node starts
2021-01-10 16:57:10 +10:00
Brent Baccala 235a127111 Allow cloned QEMU disk images to be resized before the node starts,
by cloning the disk image in response to a resize request instead
of waiting until the node starts.
2020-12-30 15:36:38 -05:00
Jeremy Grossmann bb51146e80 Merge pull request #1852 from joyme123/update-python-version
fix(readme): update python version from 3.5.3 to 3.6
2020-12-23 14:39:08 +10:30
Pengfei Jiang e6944276a6 fix(readme): update python version from 3.5.3 to 3.6 2020-12-23 11:33:20 +08:00
grossmj 58c1b01439 Add default JWT secret key and fix tests. 2020-12-18 16:51:54 +10:30
grossmj bde706d19a Generate JWT secret key if none is configured in the config file.
Change location of the database.
2020-12-16 18:24:21 +10:30
Jeremy Grossmann 704858fd8d Merge pull request #1847 from b-ehlers/QemuConfig
Add Qemu config disk
2020-12-14 14:22:25 +10:30
grossmj 509e762cda Fix slow tests. 2020-12-07 18:53:40 +10:30
grossmj 6aefb5d32b Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2020-12-07 18:00:33 +10:30
grossmj 62d9ecf2aa Do not build on Windows and add missing packages for Python 3.6 2020-12-07 17:03:34 +10:30
grossmj d47dcb0d6f User authentication with tests. 2020-12-07 16:52:36 +10:30
grossmj 87ede50827 Development on 2.2.18dev1 2020-12-04 18:10:11 +10:30
grossmj 24fe67f82b Release v2.2.17 2020-12-04 16:26:56 +10:30
grossmj 18c878429f Merge branch 'master' into 2.2 2020-12-04 16:22:04 +10:30
grossmj 6c3a070733 Close and remove projects deleted from disks after SIGHUP signal is received. 2020-12-04 16:17:28 +10:30
piotrpekala7 a157ef5a8a Release web UI 2.2.17 2020-12-04 02:59:13 +01:00
grossmj 5244ae6d4c New config file options to configure the VNC console port range. 2020-12-03 18:04:42 +10:30
grossmj bf7cf862af Refactor tests and start work on database integration. 2020-12-02 18:39:08 +10:30
grossmj ae55c0ec9c Fix tests. 2020-11-19 15:27:33 +10:30
grossmj c043830e3f Move endpoints to routes & preparations to use a database. 2020-11-19 15:21:03 +10:30
Jeremy Grossmann db47615d43 Merge pull request #1843 from tirkarthi/fix-asyncio-all-tasks-2.2
Use asyncio.all_tasks instead of deprecated method for Python 3.9 compatibility
2020-11-17 20:05:13 +10:30
Karthikeyan Singaravelan 603683e2c5 Use asyncio.all_tasks instead of deprecated method for Python 3.9 compatibility. 2020-11-17 06:30:47 +00:00
grossmj d58407c735 Fix tests. 2020-11-13 15:32:25 +10:30
grossmj 95ea1fa636 Providing the path to create a project is now deprecated. 2020-11-13 15:17:54 +10:30
grossmj 7837081eba Fix running tests with Python 3.9 2020-11-11 17:38:06 +10:30
grossmj acc5c7ebfa Update package versions.
Do not use Path in schemas (causes issues with empty paths).
Change how notifications are handled.
Run tests with Python 3.9
2020-11-11 17:18:41 +10:30
grossmj bf19da1dc2 Upgrade packages to latest versions 2020-11-08 21:35:54 +10:30
Bernhard Ehlers e45bc5aec1 Fix mcopy error messages 2020-11-05 15:00:44 +01:00
grossmj e13c84bada Fix tests 2020-11-05 18:47:59 +10:30
grossmj 841b013223 SSL support. 2020-11-05 18:24:50 +10:30
grossmj a5d89b428a Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/compute.py
#	gns3server/schemas/gns3vm.py
#	gns3server/utils/application_id.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2020-11-05 17:15:25 +10:30
grossmj a3ee1d9ee6 Development on 2.2.17dev1 2020-11-05 16:59:58 +10:30
grossmj 0e95e7e023 Release v2.2.16 2020-11-05 15:38:19 +10:30
grossmj 1748250179 Sync appliance files. 2020-11-05 15:30:21 +10:30
grossmj c8ea22c651 Merge branch 'master' into 2.2 2020-11-05 15:05:05 +10:30
grossmj d16cb5ef89 Option to allocate or not the vCPUs and RAM settings for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/3069 2020-11-05 11:13:57 +10:30
piotrpekala7 004acdc271 Release web UI 2.2.16 2020-11-04 12:51:25 +01:00
grossmj e182f53d69 Fix wrong defaults for images_path, configs_path, appliances_path. Fixes #1829 2020-11-04 12:30:23 +10:30
grossmj 7314b41d8f Fix tests. 2020-11-02 22:45:01 +10:30
grossmj aef8f0dff3 Use EnvironmentFile for Systemd service. Ref https://github.com/GNS3/gns3-gui/issues/3048 2020-11-02 18:23:41 +10:30
grossmj e2d444928d Add back script to create a self-signed SSL certificate. 2020-11-02 18:09:14 +10:30
grossmj 5a7b5e4e08 Make sure all HTTP exceptions return JSON with a "message" field instead of "detail" 2020-11-02 18:08:25 +10:30
grossmj 30d6f1fa2a Make Swagger Ui the default for API documentation 2020-11-02 12:47:59 +10:30
grossmj 359f9a7384 Move to version 3 of the REST API.
Rename packet capture endpoints.
2020-11-02 12:05:32 +10:30
grossmj eeaf10b418 Put all schemas in the same module. 2020-10-31 16:02:21 +10:30
grossmj 81439c750a Use pydantic for data validation (instead of jsonschema)
Fix/improve various pydantic shema models.
2020-10-31 15:07:12 +10:30
grossmj b6a021dabd Fix SSL support for controller and local compute. Fixes #1826 2020-10-27 23:25:19 +10:30
grossmj 5dab0c2587 Prevent WIC to be added/removed while Dynamips router is running. Fixes https://github.com/GNS3/gns3-gui/issues/3082 2020-10-27 20:08:01 +10:30
grossmj 5d1fdceb98 Fix bug with application id allocation for IOU nodes. Fixes #3079 2020-10-27 19:41:24 +10:30
grossmj d6a65883ee Merge branch 'master' into 3.0 2020-10-24 17:08:19 +10:30
grossmj 5743d47327 Set ident for merge. 2020-10-24 17:04:42 +10:30
grossmj ca69b01d11 Use origin/3.0 for merge into gh-pages branch. 2020-10-24 17:02:44 +10:30
grossmj b2fb2442c8 Change tag for index routes. 2020-10-24 17:00:43 +10:30
grossmj dd785b61cf Work directly on gh-pages branch to generate the API documentation. 2020-10-24 16:59:55 +10:30
grossmj f3a7eba796 Merge branch 'master' into 3.0 2020-10-24 16:49:28 +10:30
grossmj 0f154e5f29 Fix invalid syntax for git merge 2020-10-24 16:45:53 +10:30
grossmj b2d81609be Publish API documentation 2020-10-24 16:32:09 +10:30
grossmj ee6c70e243 Publish API documentation 2020-10-24 16:16:29 +10:30
grossmj f9c4c82da6 Fix merge issues on gh-pages branch, second try. 2020-10-24 16:12:17 +10:30
grossmj 3a136a46a1 Fix merge issues on gh-pages branch 2020-10-24 16:07:48 +10:30
grossmj 34f05e92d5 Merge branch 'master' into 3.0 2020-10-24 15:53:44 +10:30
grossmj a6a35e7c43 Fix publish_api_documentation.yml 2020-10-24 15:42:44 +10:30
grossmj d316ee33df Capitalize openapi tags. 2020-10-24 15:35:53 +10:30
grossmj ec61faa035 Merge branch 'master' into 3.0
# Conflicts:
#	.github/workflows/publish_api_documentation.yml
2020-10-24 15:25:55 +10:30
grossmj 163a867f00 Only automatically build API documentation for 3.0 branch and v3.* tags 2020-10-24 15:24:32 +10:30
grossmj d2b7c9bcbf Do not build API documentation on schedule. 2020-10-24 13:38:32 +10:30
grossmj fb8df1cc6b Fetch all history for all tags and branches in publish_api_documentation.yml 2020-10-24 13:13:19 +10:30
grossmj d063b3e39d Manual trigger API documentation publishing using workflow_dispatch 2020-10-24 13:08:10 +10:30
grossmj e6bf17185e Manual trigger API documentation publishing using workflow_dispatch 2020-10-24 12:52:32 +10:30
grossmj 83fbd1f627 Fix GitHub Actions error: A branch or tag with the name '3' could not be found. 2020-10-24 12:16:05 +10:30
grossmj 1aa6fe8535 Add publish_api_documentation.yml to master branch for scheduled event to work. 2020-10-23 23:03:50 +10:30
grossmj 5bb6ba73f2 Fix syntax error in publish_api_documentation.yml 2020-10-23 23:01:03 +10:30
grossmj e568de0aa9 actions/checkout@v2 to checkout 3.0 branch. 2020-10-23 22:57:09 +10:30
grossmj 3f57f5285d Publish API documentation on gh-pages branch 2020-10-23 22:48:50 +10:30
grossmj b23422e782 Fix publish_api_documentation.yml 2020-10-23 22:29:59 +10:30
grossmj b7ade95c24 Merge remote-tracking branch 'origin/3.0' into 3.0 2020-10-23 21:03:35 +10:30
grossmj e39493f8bd Only publish documentation once a day or on tags. 2020-10-23 21:03:28 +10:30
github-actions 7d72b5e8b9 Publish API documentation 2020-10-23 09:13:49 +00:00
grossmj 98467181de Merge remote-tracking branch 'origin/3.0' into 3.0 2020-10-23 19:42:44 +10:30
grossmj 80d14a98fb Some cleaning in compute.py 2020-10-23 19:42:21 +10:30
github-actions 3a55337d3f Publish API documentation 2020-10-23 08:52:41 +00:00
grossmj b04f9cb6ea Add git add to publish_api_documentation.yml 2020-10-23 19:21:50 +10:30
grossmj da2d4de89f Fix call to publish_api_documentation.py 2020-10-23 19:17:31 +10:30
grossmj 80ca9100b9 Use Python 3.6 to generate the API documentation 2020-10-23 19:14:14 +10:30
grossmj 4cf054061d Remove tests_require from setup.py 2020-10-23 19:10:33 +10:30
grossmj 791d8ac366 Install the GNS3 server in publish_api_documentation.yml 2020-10-23 19:07:30 +10:30
grossmj 10542aef91 Merge remote-tracking branch 'origin/3.0' into 3.0 2020-10-23 19:03:47 +10:30
grossmj 2793f6f9d8 Automate API documentation publishing. 2020-10-23 19:03:19 +10:30
Jeremy Grossmann 407f6efa78 Create CNAME 2020-10-23 18:49:37 +10:30
grossmj 3185ebaa3d Publish API documentation generated by FastAPI. 2020-10-23 18:01:58 +10:30
grossmj 087bbd1a0b Fix tests. 2020-10-22 20:37:34 +10:30
grossmj a08ddce033 Revert compute.py 2020-10-22 20:05:37 +10:30
grossmj 97a91f1899 Overwrite uvicorn loggers. 2020-10-22 19:56:53 +10:30
grossmj 13da8aa8f5 Do not automatically connect to local compute. 2020-10-22 16:47:11 +10:30
grossmj a92c47b310 Add HTTP client to reuse the aiohttp session where needed.
Remove unnecessary aiohttp exceptions.
2020-10-22 16:19:44 +10:30
grossmj 36c8920cd1 Warn not to use the private compute API. Fixes #1593. 2020-10-20 16:27:00 +10:30
grossmj f895b66fca Run tests on Ubuntu only for now. 2020-10-20 11:57:32 +10:30
grossmj f4210108ce Do not run tests on macOS for now. 2020-10-20 11:10:42 +10:30
grossmj c0cab1c3ca Install Windows dependencies to run tests 2020-10-20 11:05:12 +10:30
grossmj 8b415b0b3c Fix testing on Windows. 2020-10-20 10:55:32 +10:30
grossmj a9a5d4e665 Fix syntax error in testing.yml 2020-10-20 10:52:26 +10:30
grossmj 554404e6e7 Try to run tests for Windows and macOS. 2020-10-20 10:50:46 +10:30
grossmj 0500b28aea Fix changing to ProactorEventLoop in tests. 2020-10-20 00:57:06 +10:30
grossmj bd4bf53084 Use ProactorEventLoop with pytest-asyncio 2020-10-20 00:46:46 +10:30
grossmj 25494ca098 Fix project import to work with FastAPI. 2020-10-19 22:39:30 +10:30
grossmj 5653a8afb6 Need another job to run tests on macOS and Windows. 2020-10-19 19:27:57 +10:30
grossmj 596ee9b66d Test compute notifications and run tests on macOS and Windows. 2020-10-19 19:25:32 +10:30
grossmj 6af8c8933e Fix tests. 2020-10-19 18:47:25 +10:30
grossmj b8e8e5cba7 Fix status code 204 must not have a response body. 2020-10-19 18:42:27 +10:30
grossmj 993e6a80e4 Add missing requests package to run tests. 2020-10-19 18:40:01 +10:30
grossmj 5d71ee25ee Fix syntax error. 2020-10-19 18:34:27 +10:30
grossmj af30361f72 Enable GitHub Actions for 3.0 branch 2020-10-19 18:31:38 +10:30
grossmj f20e16074f Fix Docker dev server script. 2020-10-19 18:28:01 +10:30
grossmj be6d4771d0 Migrate PCAP streaming code to work with FastAPI. 2020-10-19 15:55:29 +10:30
grossmj bd8565b2b9 Refactor WebSocket console code to work with FastAPI.
Fix endpoint routes.
2020-10-19 15:00:41 +10:30
Bernhard Ehlers de2b9caeeb Use HDD disk image as startup QEMU config disk 2020-10-19 03:19:22 +02:00
grossmj 5341ccdbd6 Use dependencies and group common HTTP responses in endpoints. 2020-10-14 10:49:29 +10:30
grossmj 58c5965905 Fix tests. 2020-10-13 11:46:18 +10:30
grossmj 46f4e7ef6e Fix update property call for Qemu VMs. 2020-10-12 18:07:00 +10:30
grossmj 0746949207 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/symbol_handler.py
#	gns3server/version.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/endpoints/compute/test_qemu_nodes.py
#	tests/endpoints/controller/test_nodes.py
2020-10-12 18:04:49 +10:30
grossmj 362701f5aa Allow commas in image paths and VM name for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/3065 2020-10-11 14:02:22 +10:30
grossmj 91244456f5 Handle comma in disk path for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/3065 2020-10-08 22:09:03 +10:30
grossmj 88ab528977 Development on 2.2.16dev1 2020-10-07 16:30:03 +10:30
grossmj 7d031e71a0 Release v2.2.15 2020-10-07 15:29:52 +10:30
grossmj c46c095fcb Sync appliance files. 2020-10-07 15:24:15 +10:30
grossmj e592b95639 Revert "Add info log to show where custom symbols are searched from."
This reverts commit 593e3795
2020-10-07 15:20:28 +10:30
grossmj 593e379523 Add info log to show where custom symbols are searched from. 2020-10-07 15:19:09 +10:30
grossmj d451d3125e Fix symbol retrieval issue. Ref #1824 2020-10-07 11:48:11 +10:30
grossmj e014d36ad2 Skip tests not working on Windows. 2020-10-06 17:40:36 +10:30
grossmj c248764efb Fixes update() missing 2 required positional arguments: 'name' and 'value'. Fixes #1821 #1825 2020-10-06 17:08:51 +10:30
grossmj 0259696872 Fix Hyper-V based GNS3 VM WMI issue. Fixes #1822 2020-10-06 16:42:50 +10:30
grossmj 165ba4d8d5 Merge branch 'master' into 2.2 2020-10-06 12:30:08 +10:30
piotrpekala7 8049ab8b64 Release 2020.4.0-beta.1 2020-10-05 15:42:19 +02:00
grossmj eb3cb8a41f Migration to FastAPI 2020-10-02 16:07:50 +09:30
grossmj 2857cab94e Development on 2.2.15dev1 2020-09-15 06:49:11 +09:30
grossmj 326841cd9e Release v2.2.14 2020-09-15 05:52:47 +09:30
grossmj dacc5ef9cd Merge branch 'master' into 2.2 2020-09-15 05:28:00 +09:30
piotrpekala7 dd1e4f655e Release 2020.3.0-beta.4 2020-09-14 18:35:17 +02:00
grossmj bf4550bf78 Fix tests. Ref https://github.com/GNS3/gns3-gui/issues/3047 2020-09-13 23:23:08 +09:30
grossmj 399f1c082e Add '-smp sockets=1' by default for Qemu VMs. Ref https://github.com/GNS3/gns3-gui/issues/3047 2020-09-13 23:16:52 +09:30
grossmj 919abdc052 Sync appliance files. 2020-09-12 23:08:38 +09:30
grossmj 992cd7fc6c Implement full restart if user reload a Qemu VM which has been updated. Fixes https://github.com/GNS3/gns3-gui/issues/3038 2020-09-12 23:07:39 +09:30
grossmj 90ecefd455 Development on 2.2.14dev1 2020-09-05 04:26:16 +09:30
grossmj b4c7823696 Release v2.2.13 2020-09-04 23:13:28 +09:30
grossmj ffde704251 Merge branch 'master' into 2.2 2020-09-04 23:10:09 +09:30
piotrpekala7 8c00cd0a84 Release 2020.3.0-beta.3 2020-09-04 12:54:48 +02:00
grossmj 2bf625e000 Fix issue when resuming Qemu VM. Fixes https://github.com/GNS3/gns3-gui/issues/3027 2020-09-04 18:02:21 +09:30
grossmj 5305117a75 Sync appliance files. 2020-09-04 01:59:45 +09:30
grossmj 4843084158 Prioritize the config disk over HD-D for Qemu VMs.
Fixes https://github.com/GNS3/gns3-gui/issues/3036

(cherry picked from commit c12b675691)
2020-08-18 10:54:11 +09:30
grossmj c12b675691 Prioritize the config disk over HD-D for Qemu VMs.
Fixes https://github.com/GNS3/gns3-gui/issues/3036
2020-08-18 10:54:11 +09:30
Jeremy Grossmann 01db2d2a86 Create config disk property false by default for Qemu templates
Ref https://github.com/GNS3/gns3-gui/issues/3035

(cherry picked from commit a2e884e315)
2020-08-17 12:45:57 +09:30
Jeremy Grossmann a2e884e315 Create config disk property false by default for Qemu templates
Ref https://github.com/GNS3/gns3-gui/issues/3035
2020-08-17 12:45:57 +09:30
Jeremy Grossmann fa26555d00 Merge pull request #1801 from GNS3/qemu-config-disk
QEMU config disk - enable QEMU config import/export
2020-08-15 16:35:20 +08:00
grossmj f2ddef855f Fix tests.
(cherry picked from commit 620d93634e)
2020-08-15 16:35:31 +09:30
grossmj 620d93634e Fix tests. 2020-08-15 16:35:31 +09:30
grossmj ec02150fd2 Set default disk interface type to "none".
Fail-safe: use "ide" if an image is set but no interface type is configured.
Use the HDA disk interface type if none has been configured for HDD.

(cherry picked from commit 464fd804ce)
2020-08-15 16:14:16 +09:30
grossmj 464fd804ce Set default disk interface type to "none".
Fail-safe: use "ide" if an image is set but no interface type is configured.
Use the HDA disk interface type if none has been configured for HDD.
2020-08-15 16:14:16 +09:30
grossmj a56b816c1a Add explicit option to automatically create or not the config disk. Off by default.
(cherry picked from commit 56aba96a5f)
2020-08-14 17:57:24 +09:30
grossmj 56aba96a5f Add explicit option to automatically create or not the config disk. Off by default. 2020-08-14 17:57:24 +09:30
grossmj 9d3f7c79a2 Fix more tests
(cherry picked from commit 546982d1ea)
2020-08-13 17:18:45 +09:30
grossmj 546982d1ea Fix more tests 2020-08-13 17:18:45 +09:30
grossmj c684c554bf Fix tests
(cherry picked from commit 2ba6eac113)
2020-08-13 17:10:31 +09:30
grossmj 2ba6eac113 Fix tests 2020-08-13 17:10:31 +09:30
grossmj cad7431069 Bump version to 2.3.0dev2 2020-08-13 01:49:25 +09:30
grossmj 9890126453 Merge branch '2.2' into 2.3
# Conflicts:
#	gns3server/notification_queue.py
#	gns3server/version.py
2020-08-13 01:48:26 +09:30
Jeremy Grossmann 94b27590a7 Merge pull request #1804 from GNS3/aux-console-refactoring
Auxiliary console support
2020-08-12 15:58:32 +08:00
grossmj 97e731a7d9 Development on 2.2.13dev1 2020-08-07 21:12:46 +09:30
grossmj 2c08166510 Release v2.2.12 2020-08-07 19:27:32 +09:30
grossmj 940f004752 Sync appliance files 2020-08-07 19:24:01 +09:30
grossmj f083649021 Merge branch 'master' into 2.2 2020-08-07 19:03:50 +09:30
piotrpekala7 aeb82de78a Release 2020.3.0-beta.2 2020-08-07 09:57:52 +02:00
grossmj 6761ae3445 Catch exception when psutil returns OSError 2020-08-06 13:37:27 +09:30
grossmj 855a95de49 Fix tests. Fixes #1796 2020-07-30 14:58:22 +09:30
grossmj 3c1a1eb4ef Fix tests. 2020-07-29 16:32:45 +09:30
grossmj 7043d48f1a Auxiliary console support for Qemu. Ref #2873
Improvements for auxiliary console support for Docker and Dynamips.
2020-07-29 16:23:51 +09:30
Jeremy Grossmann d022259561 Downgrade psutil to version 5.6.7 2020-07-28 21:03:41 +09:30
Jeremy Grossmann 380e7a8a7f Downgrade psutil to version 5.6.7 2020-07-28 21:03:24 +09:30
grossmj 65c8bb6754 Fix AUX console not allocated for Dynamips IOS routers. 2020-07-27 18:42:36 +09:30
grossmj 12732aaf83 Disallow to rename a running node. Fixes https://github.com/GNS3/gns3-gui/issues/2499 2020-07-27 15:06:17 +09:30
grossmj 831ee5f468 Support to reset all console connections. Ref https://github.com/GNS3/gns3-server/issues/1619 2020-07-26 18:27:18 +09:30
grossmj f97d346c34 Support to reset links. Fixes https://github.com/GNS3/gns3-server/issues/1620 2020-07-24 21:48:49 +09:30
grossmj cbcdaabcce Fix tests. Ref #1674 2020-07-24 15:22:11 +09:30
grossmj 01b2c72767 Add maxcpus property for Qemu VMs. Ref #1674 2020-07-24 15:15:41 +09:30
grossmj 89b5629cf5 Upgrade to psutil version 5.7.2 2020-07-21 15:49:57 +09:30
grossmj 47bb2edbfa Upgrade to psutil version 5.7.2 2020-07-21 15:49:06 +09:30
Bernhard Ehlers 068c31038f QEMU config disk - improve error handling 2020-07-19 17:56:49 +09:30
Bernhard Ehlers 2bbee15b18 QEMU config disk - notification of import/export errors 2020-07-19 17:56:49 +09:30
Bernhard Ehlers 50c49cfedb QEMU config disk - notification of import/export errors 2020-07-19 17:56:49 +09:30
Bernhard Ehlers b672900406 QEMU config disk - use disk interface of HD-D, fallback is HD-A 2020-07-19 17:56:49 +09:30
Bernhard Ehlers 2e0fba925b QEMU config disk - add missing config disk to image directory 2020-07-19 17:56:49 +09:30
Bernhard Ehlers 450c6cddc7 QEMU config disk - get rid of mtoolsrc 2020-07-19 17:56:48 +09:30
Bernhard Ehlers 5c44268476 QEMU config disk - preserve file timestamp on zip unpack 2020-07-19 17:56:48 +09:30
Bernhard Ehlers b69965791d QEMU config disk - initial implementation. Ref #2958 2020-07-19 17:56:48 +09:30
grossmj a9e9ff071d Read folder structure correctly for custom symbols. Fixes https://github.com/GNS3/gns3-gui/issues/2856 2020-07-19 17:46:49 +09:30
grossmj 3dc4ea46d6 Add total RAM, CPUs and disk size to servers summary as well as disk usage in percent. Fixes https://github.com/GNS3/gns3-server/issues/1532 2020-07-19 14:16:07 +09:30
Jeremy Grossmann 00a6765405 Merge pull request #1800 from GNS3/docker-resource-constraints
Resource constraints for Docker VMs.
2020-07-18 19:39:01 +08:00
grossmj d1c29c8bb7 Resource constraints for Docker VMs. 2020-07-18 21:03:55 +09:30
grossmj 0afce89c0b Fix exception when exporting debug data. Fixes #1684 2020-07-18 17:30:18 +09:30
grossmj e4978004d0 Update IOUtools. Ref #1627 2020-07-17 21:37:25 +09:30
grossmj 7471b31b0c Fix tests. 2020-07-17 15:34:00 +09:30
grossmj 05ed9836e4 Fix tests. 2020-07-17 15:33:30 +09:30
grossmj 37c7202aa0 Use parent directory as working directory for project duplication and snapshots. Fixes https://github.com/GNS3/gns3-gui/issues/2909 2020-07-17 15:11:14 +09:30
grossmj 0390fef74d Use parent directory as working directory for project duplication and snapshots. Fixes https://github.com/GNS3/gns3-gui/issues/2909 2020-07-17 15:09:43 +09:30
grossmj dff035d957 Support for "usage" for "Cloud" nodes. Fixes https://github.com/GNS3/gns3-gui/issues/2887
Allow "usage" for all builtin nodes (not exposed in Ui).
2020-07-15 19:15:51 +09:30
grossmj d11897c1ec Bump version to 2.3.0dev1 2020-07-11 11:41:51 +09:30
grossmj 99128e7713 Fix Key Error "vendor_id" is missing when configuring GNS3 VM with VirtualBox. Fixes https://github.com/GNS3/gns3-gui/issues/3018 2020-07-10 17:44:38 +09:30
grossmj c40651b53e Development on 2.2.12dev1 2020-07-09 21:37:03 +09:30
grossmj c4d2422fe2 Release v2.2.11 2020-07-09 20:37:10 +09:30
grossmj f08f7702d1 Sync appliance files. 2020-07-09 20:26:41 +09:30
grossmj b787cb3ace Merge branch 'master' into 2.2 2020-07-09 20:23:20 +09:30
grossmj 62130c116a Fix crash when project sets 'auto_open' option and a remote GNS3 VM is used. Fixes https://github.com/GNS3/gns3-gui/issues/3014 2020-07-09 20:13:21 +09:30
grossmj 1cbed45f16 Fix Dynamips ghost image support when project contains a space. Fixes #3015 2020-07-08 20:32:58 +09:30
piotrpekala7 29b31d72e9 Release 2020.3.0-beta.1 2020-07-07 14:05:24 +02:00
Bernhard Ehlers 9acb2ceda1 QEMU config disk - improve error handling
(cherry picked from commit 068c31038f)
2020-07-03 11:31:17 +02:00
grossmj ea17cc2565 Fix issue when cannot skip slots for Dynamips routers. Fixes https://github.com/GNS3/gns3-gui/issues/3000 2020-06-29 20:00:30 +09:30
grossmj 850c30f958 Merge branch 'master' into 2.2
# Conflicts:
#	tests/handlers/api/compute/test_dynamips.py
#	tests/handlers/api/compute/test_qemu.py
2020-06-29 18:44:46 +09:30
grossmj 27da8458e8 Allow tests to be run by root. Fixes #1784 2020-06-29 18:43:35 +09:30
Bernhard Ehlers 053828f3e8 QEMU config disk - init config disk in base class
(cherry picked from commit 2bbee15b18)
2020-06-28 16:35:39 +02:00
Bernhard Ehlers f747b3a880 QEMU config disk - notification of import/export errors
(cherry picked from commit 50c49cfedb)
2020-06-28 09:21:57 +02:00
grossmj 8bd3e2346b Add Snyk badges. 2020-06-27 18:27:04 +09:30
grossmj 74fc4fc75c Merge branch 'master' into 2.2 2020-06-26 21:30:27 +09:30
grossmj d0487b92c5 Remove pyup and pep8 script. 2020-06-26 19:20:40 +09:30
grossmj 7924963276 Remove tox and update dependencies 2020-06-26 19:08:21 +09:30
grossmj d7083541b0 Remove Travis CI support and add GitHub Actions badge 2020-06-26 18:55:52 +09:30
grossmj af22fb8e98 Comment unused code that causes issue with flake8 2020-06-26 18:47:31 +09:30
grossmj 03c4643a0f Merge remote-tracking branch 'origin/master' 2020-06-26 18:35:49 +09:30
grossmj 4ba7131451 Add flake8 in dev-requirements.txt 2020-06-26 18:35:25 +09:30
Jeremy Grossmann 3af71d8976 Set up GitHub Action for running tests 2020-06-26 18:31:58 +09:30
Jeremy Grossmann f361b9cb3e Merge pull request #1790 from GNS3/whitesource/configure
Configure WhiteSource for GitHub.com
2020-06-26 09:04:09 +08:00
whitesource-for-github-com[bot] 12d3ba391f Add .whitesource configuration file 2020-06-26 01:01:48 +00:00
Jeremy Grossmann 88ee9ae8b9 Merge pull request #1788 from GNS3/snyk-fix-4af38289923e34d863acdf00d9e8d3b3
[Snyk] Security upgrade psutil from 5.6.6 to 5.6.7
2020-06-24 21:08:26 +08:00
snyk-bot 9665378f44 fix: requirements.txt to reduce vulnerabilities
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-PSUTIL-483082
2020-06-24 13:06:58 +00:00
grossmj fd411e7855 Update classifiers in setup.py 2020-06-24 12:40:31 +09:30
grossmj 7fd8fde020 Some fixes for tests. Ref #1784 2020-06-19 19:05:23 +09:30
grossmj 51b76b1e30 Development on 2.2.11dev1 2020-06-18 19:06:00 +09:30
grossmj 9a9e54c523 Release v2.2.10 2020-06-18 12:29:33 +09:30
grossmj 13a6b4fe55 Merge branch 'master' into 2.2 2020-06-18 12:23:10 +09:30
grossmj 3b4f4bfeda Sync appliances. 2020-06-18 12:20:42 +09:30
grossmj a018c8e1a8 Add pytest-aiohttp to tests_require in setup.py 2020-06-18 12:04:15 +09:30
grossmj 79b93defbd Don't require hardware acceleration. Fixes #1780 2020-06-18 11:26:14 +09:30
Bernhard Ehlers 750590d0db QEMU config disk - use disk interface of HD-D, fallback is HD-A
(cherry picked from commit b672900406)
2020-06-17 17:06:55 +02:00
piotrpekala7 72bef07f2b Release 2020.2.0-beta.5 2020-06-17 15:58:43 +02:00
Jeremy Grossmann 3344cfb98a Merge pull request #1782 from GNS3/test-refactoring
Refactor tests
2020-06-17 11:13:13 +08:00
grossmj 9d141baf22 Comment capsys tests 2020-06-16 21:27:49 +09:30
grossmj 1a4c2ed069 Try to fix capsys issue with Python 3.8 (third try) 2020-06-16 21:19:51 +09:30
grossmj 7fb554135f Try to fix capsys issue with Python 3.8 (second try) 2020-06-16 21:11:29 +09:30
grossmj 241caa1ec7 Try to fix capsys issue with Python 3.8 2020-06-16 20:56:10 +09:30
grossmj d33584a2e4 More specific fix for Windows 2020-06-16 19:16:58 +09:30
grossmj 438b1c056c Remove '\n' from for version strings for test_parse_arguments test. 2020-06-16 19:16:05 +09:30
grossmj ef23e74e9c Another fix for test_gns3vm.py 2020-06-16 19:09:49 +09:30
grossmj 9ab8599e1e Fix other issues with tests. 2020-06-16 19:03:42 +09:30
grossmj d9ab29a9e0 Another fix for test_gns3vm.py 2020-06-16 18:52:07 +09:30
grossmj 09e9382df1 Do not try to use ProactorEventLoop() on non Windows platforms. 2020-06-16 18:45:11 +09:30
grossmj 8976384a56 Fix test_gns3vm.py 2020-06-16 18:37:32 +09:30
grossmj e4b7e46444 Fix tests for Windows 2020-06-16 01:57:16 -07:00
grossmj 1d4c3a164d Use the ProactorEventLoop on Windows. 2020-06-16 14:08:17 +09:30
grossmj d3ea67da24 Refactor tests
* Use pytest-aiohttp
* Use the async def / await syntax.
* Fix tests to run with Python 3.8
2020-06-16 13:59:03 +09:30
grossmj f498ab06b4 Wait longer for x11 socket file to be created. Ref #1761 2020-06-10 20:37:13 +09:30
grossmj 3940f013d4 Allow Hyper-V to run on AMD when Windows 10 build 19640 or later is detected. Fixes #1777 2020-06-10 15:21:58 +09:30
grossmj e1dab0dff4 Show error message if IPv6 is not enabled when using SPICE console. Fixes #1772 2020-06-09 15:06:41 +09:30
grossmj c6da24f267 Move jsonschema 2.6.0 requirement in build repository.
https://github.com/GNS3/gns3-server/issues/1751
https://github.com/GNS3/gns3-gui/issues/2849

This is to avoid the following error:

```
ERROR: Double requirement given: jsonschema==2.6.0 (from -r gns3-gui\win-requirements.txt (line 4)) (already in jsonschema==3.2.0 (from -r gns3-gui\requirements.txt (line 1)), name='jsonschema')
```
2020-06-07 13:07:16 +09:30
grossmj 1f149769f2 Only use jsonschema 2.6.0 on Windows and macOS.
https://github.com/GNS3/gns3-server/issues/1751
https://github.com/GNS3/gns3-gui/issues/2849
2020-06-07 12:55:22 +09:30
grossmj ee70a6a27d Disable default integrations for sentry sdk. 2020-06-06 15:37:17 +09:30
grossmj 297d1a0aae Remove unused bytes2human function 2020-06-05 13:10:01 +09:30
grossmj 05e8fd3ff5 Development on 2.2.10dev1 2020-06-04 21:06:30 +09:30
grossmj c0c8151480 Release v2.2.9 2020-06-04 18:39:27 +09:30
grossmj ad7277c938 Merge branch 'master' into 2.2 2020-06-04 12:21:52 +09:30
Jeremy Grossmann 0c2e4d2de9 Merge pull request #1768 from GNS3/replicate-network-connection-state
Support to activate/deactive network connection state replication in Qemu
2020-06-04 10:49:47 +08:00
grossmj 1264680b51 Sync appliances. 2020-06-04 12:18:16 +09:30
piotrpekala7 a9697e925c Release 2020.2.0-beta.4 2020-06-03 19:15:56 +02:00
Jeremy Grossmann 16a0e1c308 Merge pull request #1771 from eknoes/patch-1
Fix link for appliance JSON schema
2020-06-03 19:48:07 +08:00
eknoes f53d6f1b66 Fix link for appliance JSON schema 2020-06-03 13:46:48 +02:00
grossmj 58a19af9ac Support to activate/deactive network connection state replication in Qemu. 2020-06-02 18:45:22 +09:30
grossmj a796f1e42e Possible fix for problem connecting to the GNS3 VM. Ref https://github.com/GNS3/gns3-gui/issues/2969 #1760 2020-06-01 19:40:53 +09:30
Jeremy Grossmann 6e4187741c Merge pull request #1764 from GNS3/reset-mac-addresses
Option to reset MAC addresses when exporting or duplicating a project
2020-05-27 10:53:24 +08:00
grossmj 8eefaa3f32 Option to reset or not all MAC addresses when exporting or duplicating a project. 2020-05-27 12:14:47 +09:30
grossmj 5575657318 Fix tests. Ref #1754 2020-05-26 21:40:41 +09:30
grossmj 69b816e21e Fix bug when changing properties for closed project. Fixes #1754 2020-05-26 18:34:20 +09:30
grossmj 5c3bd589b9 Fix issues with crash reporting & bump version to 2.2.9dev2. Ref https://github.com/GNS3/gns3-server/issues/1758 2020-05-21 18:19:19 +09:30
grossmj 1a20cbeefd Lock listing VMs. Ref #1755 2020-05-20 19:33:56 +09:30
grossmj da85d7b827 Try to fix error when listing Hyper-V VMs. Ref #1755 2020-05-20 19:19:04 +09:30
grossmj 7002b026fc Catch VirtualBox errors when listing VMs. Fixes #1759 2020-05-20 18:42:50 +09:30
grossmj 00f8a27404 Merge branch 'master' into 2.2
# Conflicts:
#	requirements.txt
2020-05-19 16:16:19 +09:30
grossmj 5b59a09e8d Deprecate running with Python 3.5 2020-05-19 16:14:58 +09:30
grossmj 16ca0fd915 aiocontextvars is only necessary for Python < 3.7 2020-05-19 16:04:14 +09:30
grossmj c63aad8eca Replace Raven by Sentry SDK. Fixes https://github.com/GNS3/gns3-server/issues/1758 2020-05-19 15:48:53 +09:30
grossmj 54bab7445c Require setuptools>=17.1 in setup.py. Ref https://github.com/GNS3/gns3-server/issues/1751
This is to support environmental markers.
https://github.com/pypa/setuptools/blob/master/CHANGES.rst#171
2020-05-08 12:34:57 +09:30
grossmj 32a8bc54a1 Development on 2.2.9dev1 2020-05-07 23:10:19 +09:30
grossmj dadbacd8a4 Release v2.2.8 2020-05-07 18:10:57 +09:30
grossmj 9032fd2a5c Merge branch 'master' into 2.2 2020-05-07 12:51:46 +09:30
piotrpekala7 eb0d4439a0 Release 2020.2.0-beta.3 2020-05-07 00:02:33 +02:00
grossmj 91a1c5db49 Redirection to the bundled web-ui in the root handler 2020-05-06 16:31:18 +09:30
grossmj 0a77233631 Fix root handler for web-ui 2020-05-06 15:38:16 +09:30
grossmj 8df8b73c8f Merge branch 'master' into 2.2 2020-05-06 11:59:00 +09:30
piotrpekala7 6968ae9295 Release 2020.2.0-beta.2 2020-05-05 23:39:24 +02:00
grossmj 1c9a43d071 Update appliance files. 2020-05-05 14:29:43 +09:30
grossmj a4bc696a5f Fix tests 2020-05-05 13:19:51 +09:30
grossmj 10645a412b Default port set to 80 for server running in the GNS3 VM. Fixes #1737 2020-05-05 12:40:50 +09:30
grossmj 1b008fb516 Sync appliance files. 2020-05-01 19:21:43 +09:30
grossmj 45d135911f Fix tests. 2020-04-30 20:36:12 +09:30
grossmj 3626bd5adb Make the Web UI the default page. Ref https://github.com/GNS3/gns3-server/issues/1737 2020-04-30 17:27:06 +09:30
grossmj 6c322bbdde Fix tests. 2020-04-30 15:49:06 +09:30
grossmj 02c0fa26e1 Support controller reloading for templates, appliances and projects. Ref #1743 2020-04-30 15:30:50 +09:30
Jeremy Grossmann 99a238a0dc Update README Ref #1719 2020-04-29 14:57:15 +09:30
grossmj 7b61724213 Remove unused variable. Ref #1744 2020-04-28 17:55:00 +09:30
grossmj 72c6f5b484 Return exit status 1 if server fails to start. Fixes #1744 2020-04-28 14:39:28 +09:30
grossmj 8536af33da Fix tests. 2020-04-28 13:49:05 +09:30
grossmj 4ddd45f788 Merge branch 'master' into 2.2 2020-04-28 13:14:53 +09:30
Jeremy Grossmann 53b1809dc3 Merge pull request #1742 from fadlytabrani/patch-1
Add clipboard support for TigerVnc
2020-04-27 20:34:41 -07:00
grossmj dd11d38338 Fix tests. 2020-04-27 22:48:42 +09:30
grossmj c0adc88592 Use Environmental Markers to force jsonschema version. Fixes https://github.com/GNS3/gns3-gui/issues/2849
Version 3.2.0 with Python >= 3.8
Version 2.6.0 with Python < 3.8
2020-04-27 12:54:17 +09:30
grossmj 2c9afbb217 Merge remote-tracking branch 'origin/2.2' into 2.2 2020-04-27 12:43:28 +09:30
grossmj 770841b3ee Use Environmental Markers to force jsonschema version 2.6.0 on Windows/macOS. Ref https://github.com/GNS3/gns3-gui/issues/2849 2020-04-27 12:43:07 +09:30
Jeremy Grossmann 896e99d046 Merge pull request #1745 from b-ehlers/2.2
Implement a minimum interval between cpu_percent() calls. Fixes #1738
2020-04-19 21:16:06 -07:00
Bernhard Ehlers 10bb259248 Implement a minimum interval between cpu_percent() calls. Fixes #1738 2020-04-19 20:42:46 +02:00
Bernhard Ehlers 4ab100b716 Revert "Implement a minimum interval between psutil calls. Fixes #2262"
This reverts commit 3a09bd43dc.
2020-04-19 20:06:47 +02:00
Bernhard Ehlers 347035a99b QEMU config disk - add missing config disk to image directory
(cherry picked from commit 2e0fba925b)
2020-04-16 11:07:56 +02:00
Bernhard Ehlers 0db0f6256b QEMU config disk - get rid of mtoolsrc
(cherry picked from commit 450c6cddc7)
2020-04-15 20:50:59 +02:00
fadlytabrani 6fd60452c4 Add clipboard support for TigerVnc
There's currently no clipboard support for servers running on TigerVnc. TigerVnc clipboard support is provided by vncconfig that needs to be spawned for every display socket. The code changes above provides that functionality
2020-04-16 00:14:20 +10:00
Jeremy Grossmann a2d57f7c37 Merge pull request #1741 from candlerb/candlerb/snasphot
Correct typo "Snasphot"
2020-04-15 02:53:01 -07:00
Jeremy Grossmann fb153e3c71 Merge pull request #1740 from candlerb/candlerb/1739
Sort snapshots by (created_at, name)
2020-04-15 02:51:55 -07:00
Brian Candler 69986b0d0f Correct typo "Snasphot" 2020-04-15 09:46:45 +01:00
Brian Candler 06a6a0a332 Sort snapshots by (created_at, name)
Fixes #1739
2020-04-15 09:41:50 +01:00
grossmj 2606c2d9a7 Merge branch '2.3'
# Conflicts:
#	gns3server/version.py
2020-04-08 19:39:35 +09:30
grossmj 57067a99fa Development on 2.2.8dev1 2020-04-08 01:26:42 +09:30
grossmj 087cba3903 Release v2.2.7 2020-04-08 00:03:13 +09:30
grossmj 0a5995b11c Merge branch 'master' into 2.2 2020-04-07 23:58:50 +09:30
piotrpekala7 4f3fd65377 Release 2020.2.0-beta.1 2020-04-07 16:11:44 +02:00
Bernhard Ehlers 99d9728360 QEMU config disk - preserve file timestamp on zip unpack
(cherry picked from commit 5c44268476)
2020-04-07 14:11:00 +02:00
Bernhard Ehlers 6a1eef0627 QEMU config disk - initial implementation. Ref #2958
(cherry picked from commit b69965791d)
2020-04-06 12:56:00 +02:00
grossmj 42eaf97e9f Fix uBrigde error popups when Docker image has stopped. Fixes https://github.com/GNS3/gns3-gui/issues/2957 2020-04-06 13:52:04 +09:30
grossmj 55a5ce77ba Remove debug message 2020-04-06 11:51:59 +09:30
Jeremy Grossmann 0922159686 Merge pull request #1731 from torstehu/fix-literal-warning
fix warning that you are explicitly comparing literals
2020-04-02 19:35:30 -07:00
Torstein Husebø f9ab4ffb96 fix warning that you are explicitly comparing literals 2020-04-02 21:26:23 +02:00
Jeremy Grossmann 241937b80b Merge pull request #1715 from GNS3/websocket-console
Support for WebSocket consoles
2020-03-27 21:44:25 -07:00
grossmj b179ca88a7 Merge branch 'master' into 2.3
# Conflicts:
#	gns3server/version.py
2020-03-28 13:43:50 +10:30
grossmj 4bed19f20a Release v2.2.6 2020-03-26 12:37:59 +10:30
grossmj 4bc1e5e02e Merge branch 'master' into 2.2 2020-03-26 12:15:16 +10:30
grossmj d5b6fda270 Remove --local when starting Docker dev server. 2020-03-26 12:06:05 +10:30
piotrpekala7 720f52655e Release 2020.1.0-alpha.1 2020-03-25 00:43:14 +01:00
piotrpekala7 4df10d1427 Release 2019.2.0-alpha.11 2020-03-25 00:26:02 +01:00
grossmj aa83fcc7d1 Monitor ubrige processes. 2020-03-20 21:30:05 +10:30
grossmj afbbf7a524 Add Xvnc command to the VNC servers list. Fixes #172 2020-03-19 19:06:51 +10:30
grossmj b24bb42a66 Allow controller to reconnect to compute if communication is lost. Ref #1634 2020-03-19 18:02:01 +10:30
grossmj aa1b621c10 Improvement of support for docker USER directive. Fixes #1727. 2020-03-19 17:50:27 +10:30
grossmj 6aed064a86 Fix cannot delete Dynamips router the content of the "usage" field. Fixes https://github.com/GNS3/gns3-gui/issues/2947 2020-03-16 16:38:23 +10:30
grossmj 615cffd9ac Prevent locked drawings to be deleted. Fixes https://github.com/GNS3/gns3-gui/issues/2948 2020-03-16 16:30:08 +10:30
grossmj 868c39acfe Fix issues with empty project variables. Fixes https://github.com/GNS3/gns3-gui/issues/2941 2020-03-14 17:22:43 +10:30
grossmj 392678e757 Upgrade psutil to version 5.6.6 due to CVE-2019-18874
https://github.com/advisories/GHSA-qfc5-mcwq-26q8
2020-03-14 15:47:12 +10:30
grossmj a62168fde0 Return array for controller statistics endpoint 2020-03-10 17:48:14 +10:30
grossmj 3df348ac2a Server statistics implementation 2020-03-10 17:48:03 +10:30
grossmj d9c264ce77 Sync appliances. 2020-03-06 12:05:19 +10:30
grossmj 6eb62ad179 Remove 'format=raw' from the Qemu options of the disk interfaces. Ref #1699 2020-02-24 20:06:45 +08:00
Jeremy Grossmann 966e644c51 Merge pull request #1718 from GNS3/iou-application-id
Allocate application IDs for IOU nodes on the controller. Fixes #557
2020-02-10 15:27:50 +08:00
grossmj c5412bf970 Allocate application IDs for IOU nodes on the controller.
An application ID is used by IOU to generate its interface Mac addresses. They must be unique across all opened projects sharing the same computes to avoid Mac address collisions.
2020-02-10 15:20:49 +08:00
grossmj 6cb87ef25d Sync appliance files. 2020-02-04 16:48:11 +08:00
grossmj 3484a7dd3d Unprotected access for websocket consoles.
Ref https://github.com/GNS3/gns3-gui/issues/2883#issuecomment-580677552
2020-01-31 18:30:26 +08:00
grossmj c313475f68 Support for WebSocket consoles 2020-01-31 17:31:27 +08:00
grossmj e90262eb95 Require VirtualBox >= 6.0 on AMD and >= 6.1 on Intel processors (for GNS3 VM only). Fixes #1610 2020-01-26 18:23:17 +08:00
Jeremy Grossmann f7a6a0d466 Merge pull request #1714 from GNS3/qemu-changes
Recent Qemu versions support. Ref #1699
2020-01-25 16:05:03 +07:00
grossmj 92ac250bc7 Add nvme disk interface and fix scsi disk interface for Qemu VMs. 2020-01-25 16:22:34 +08:00
grossmj 667d50aa4a Disallow using "legacy networking mode" with Qemu >= 2.9.0 2020-01-24 19:06:24 +08:00
grossmj d796f8d112 Add latest Qemu nic models. 2020-01-24 19:05:46 +08:00
grossmj fb4ece5c67 Attempt to fix error when loading wmi module. Fixes #1712 2020-01-23 19:04:17 +08:00
grossmj ab4b391a02 Handle "aborted" state for VirtualBox VMs. Fixes #1702 2020-01-23 18:00:33 +08:00
grossmj dcdaffa056 Change how Hyper-V VMs are found. Ref #1612 2020-01-21 18:03:07 +08:00
Jeremy Grossmann 39d44c8480 Merge pull request #1713 from GNS3/server-statistics
Server statistics implementation. Ref #1682
2020-01-17 04:17:01 -05:00
grossmj c3b2128fae Return array for controller statistics endpoint 2020-01-17 17:07:30 +08:00
grossmj 941bed9605 Server statistics implementation 2020-01-17 16:50:17 +08:00
grossmj 12a8831c44 Change version to 2.3.0dev1 on 2.3 branch 2020-01-16 18:06:51 +08:00
grossmj 60cc5c7bb4 Development on 2.2.6dev1 2020-01-10 00:32:10 +08:00
grossmj 6d66e4d5d5 Release v2.2.5 2020-01-09 23:52:40 +08:00
grossmj 82b42fffef Development on 2.2.5dev1 2020-01-09 05:17:01 +08:00
grossmj fe8fd828b6 Release v2.2.4 2020-01-09 00:45:09 +08:00
grossmj e127dc302e Merge branch 'master' into 2.2 2020-01-08 13:29:21 +08:00
grossmj c52abd973e Sync documentation 2020-01-08 10:52:15 +08:00
grossmj 114da9764b Fix tests. 2020-01-08 08:59:55 +08:00
grossmj 0a87ee573c Accept a node name when creating a node from a template using the API. Fixes #1708 2020-01-08 08:19:33 +08:00
grossmj 688b1ac0e4 Fix tests. 2020-01-08 07:10:33 +08:00
grossmj 500b5b0b65 Fix tests. 2020-01-08 06:03:31 +08:00
grossmj e428865d19 Sync appliances. 2020-01-08 05:38:34 +08:00
grossmj 98f5454ccb Disallow to modify a template if changes cannot be written on disk. Fixes #1695 2020-01-08 05:35:46 +08:00
grossmj a47fa83cec Fix renaming IOL hostname replaces %h only in a single place. Fixes #1707 2020-01-08 01:24:47 +08:00
Jeremy Grossmann e3e6790943 Merge pull request #1710 from CapnCheapo/patch-1
Add symbols_path
2020-01-04 13:31:01 -05:00
Stephen C. Moore 2a77841961 Add symbols_path
Added symbols_path so everybody knows that's a config option.
2020-01-04 10:29:06 -06:00
Piotr Pekala 8fbd4602e8 Release 2019.2.0-alpha.11 2019-12-30 05:09:54 -08:00
grossmj 825dc5996d Change the default UDP port range to be 20000 to 30000 in gns3_server.conf Ref #1271 2019-12-06 14:36:45 +08:00
grossmj 26efdaf7b7 Fix tests 2019-12-05 14:06:46 +08:00
grossmj 50b507f76c Fix cannot power on VirtualBox VM in saved state. Ref #1702 2019-12-05 13:46:02 +08:00
grossmj 060871cc42 Development on 2.2.4dev1 2019-11-12 16:43:21 +08:00
grossmj 9e4474de8d Release v2.2.3 2019-11-12 15:29:54 +08:00
grossmj 9bda15236e Sync appliance files. 2019-11-12 15:23:37 +08:00
grossmj 4daaea9cec Merge branch 'master' into 2.2 2019-11-12 15:20:12 +08:00
Jeremy Grossmann 5e4e5c741b Merge pull request #1691 from JCDraaijer/master
Added workaround for #1690
2019-11-11 18:36:34 +08:00
JCDraaijer 7117b1fb65 Improved how the path to the config file is actually determined 2019-11-11 11:20:51 +01:00
grossmj 992c60e3e0 Return HTTP status code 204 in API when project successfully closed. Fixes #1689 2019-11-11 15:32:57 +08:00
grossmj a98fc2d308 Python3.8 support. Ref https://github.com/GNS3/gns3-gui/issues/2895 2019-11-11 12:44:31 +08:00
grossmj 2fd4b2cbc8 Make sure still support Python >= 3.5.3 2019-11-11 12:39:45 +08:00
JCDraaijer 3bd394b637 Added workaround for #1690. Added venv/ to .gitignore 2019-11-10 20:41:39 +01:00
grossmj 7571c32563 Sync appliance files. 2019-11-08 18:24:22 +08:00
grossmj 05b949930d Fix tests. 2019-11-08 17:25:59 +08:00
grossmj 4075bbd703 Fix exception when adding VirtualBox VM. Fixes #1685. 2019-11-08 17:13:21 +08:00
grossmj 3aba2a319c Set psutil to version 5.6.3 in requirements.txt 2019-11-08 10:44:17 +08:00
grossmj 3a3ba2f54a Merge branch 'master' into 2.2 2019-11-08 10:42:44 +08:00
grossmj 2fa2c715f5 Add LimitNOFILE=16384 to GNS3 service. Ref #1678 2019-11-07 16:28:47 +08:00
grossmj 907207a140 Fix tests 2019-11-06 15:35:59 +08:00
grossmj 539cf640d8 Change the default UDP port range to be 20000 to 30000. Ref #1271 2019-11-06 12:25:30 +08:00
grossmj 6e7aeb1fdd Developement version on 2.2.3dev1 2019-11-04 19:45:18 +08:00
grossmj 3245450e67 Release v2.2.2 2019-11-04 18:33:28 +08:00
grossmj f154ebeee9 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-11-04 18:29:06 +08:00
grossmj 7608584833 Merge branch 'master' into 2.2 2019-11-04 18:28:42 +08:00
Piotr Pekala f69914565a Release 2019.2.0-alpha.10 2019-11-04 02:15:09 -08:00
Jeremy Grossmann 60beba108a Merge pull request #1681 from GNS3/fix-pci-bridges
Fix how PCI bridges are created for Qemu VMs with greater than 32 interfaces. Fixes #1665
2019-11-04 17:00:13 +07:00
Piotr Pekala 4a0fbe9b1b Release 2019.2.0-alpha.10 2019-11-04 01:29:58 -08:00
grossmj ff9bd59ef8 Fix how PCI bridges are created for Qemu VMs with greater than 32 interfaces. 2019-11-03 17:56:52 +08:00
grossmj 4ab3f281c5 Fix broken support for cloned VirtualBox VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2889 2019-11-03 16:34:24 +08:00
grossmj 7b507bf532 Sync appliance files. 2019-11-03 16:32:15 +08:00
grossmj 459dd7b479 Handle builtin entry does not exist when adding node from template (new fix). 2019-11-02 16:23:45 +08:00
grossmj b8c70a3a8e Development on 2.2.2dev1 2019-11-01 18:43:36 +08:00
grossmj a267ecdea4 Merge branch 'master' into 2.2 2019-11-01 18:34:17 +08:00
grossmj 7b8f0c2633 Release v2.2.1 2019-11-01 17:53:20 +08:00
grossmj 89f97902f9 Handle builtin entry does not exist when adding node from template. 2019-11-01 17:48:25 +08:00
grossmj 8dd2831890 Upgrade aiohttp to version 3.6.2 2019-11-01 17:18:30 +08:00
grossmj 19723f06ed Sync appliance files 2019-11-01 17:07:43 +08:00
grossmj 3f5ee94022 Merge remote-tracking branch 'origin/master' 2019-11-01 15:24:04 +08:00
grossmj 85582554ac Let systemd directly supervises the GNS3 service. Fixes #1678 2019-11-01 15:23:52 +08:00
Piotr Pekala 107dbbc949 Release 2019.2.0-alpha.10 2019-10-31 04:38:52 -07:00
grossmj 2af9127879 Fix issue when linking to more than one NAT node with allowed_interface option enabled. Fixes #1671 2019-10-31 17:07:52 +08:00
grossmj 5e9810d420 Prevent deleting a GNS3 project outside the project directory. Ref #1669 2019-10-30 16:25:06 +08:00
grossmj f3ad333a21 Do not send "console_type" property to computes for all builtin nodes excepting Ethernet switches. Fixes https://github.com/GNS3/gns3-gui/issues/2882 2019-10-29 18:06:09 +08:00
grossmj c8f7d789f7 Update API documentation 2019-10-23 22:00:00 +08:00
grossmj df9b40c1dc Fix QEMU link detection flaky on last port. Fixes #1666 2019-10-15 23:42:42 +08:00
grossmj f5c02368e6 Fix tests. 2019-10-09 17:47:22 +08:00
grossmj 7cfd0d4d1d Use compatible shlex_quote to handle case where Windows needs double quotes around file names, not single quotes. Ref https://github.com/GNS3/gns3-gui/issues/2866 2019-10-09 17:02:30 +08:00
grossmj 9d47050dff Use 0.0.0.0 by default for server host. Fixes https://github.com/GNS3/gns3-server/issues/1663 2019-10-09 16:35:42 +08:00
grossmj 1b845225b2 Improvement to validate HTTP authentication config. Ref #1662 2019-10-09 15:56:20 +08:00
grossmj 5a3f8b9a9b Use versioned config directory for profiles. Fixes #1664 2019-10-09 15:20:19 +08:00
grossmj 56a4d3f8fd Fix tests. 2019-10-09 15:00:48 +08:00
grossmj 6d1adea907 Enable nested hardware virtualization by default for GNS3 VM running in VirtualBox. Fixes #1377
No error is sent by VBoxManage is this feature is not available, for instance with Intel processors.
2019-10-09 14:50:00 +08:00
grossmj 2d777cac13 Set default host to "localhost". Fixes https://github.com/GNS3/gns3-server/issues/1663 2019-10-08 18:28:10 +08:00
grossmj 6ae7ef8a2e Improve process to get guest IP address from GNS3 VM running in VMware workstation/player. Ref https://github.com/GNS3/gns3-gui/issues/2866 2019-10-08 17:58:27 +08:00
grossmj 09d05accc1 Fix tests. Ref #1659 2019-10-08 17:34:16 +08:00
grossmj 2f57bd58c0 Fix error with console type in Ethernet switch schema. Fixes #1659 2019-10-08 17:16:17 +08:00
grossmj 51a92b46dd Bump version to 2.2.1dev1 2019-10-08 16:05:36 +08:00
grossmj 7c437adbef Release v2.2.0 2019-09-30 16:24:26 +08:00
grossmj fef1d01e26 Merge branch 'master' into 2.2 2019-09-30 16:20:19 +08:00
grossmj af3ae0df24 Merge branch '2.1'
# Conflicts:
#	gns3server/compute/dynamips/nodes/atm_switch.py
2019-09-30 16:11:26 +08:00
grossmj 87390274cc Add debug message for what directory is checked for Qemu binaries. Ref #1655 2019-09-30 15:54:57 +08:00
grossmj f424e2dfd5 Sync appliance files. 2019-09-30 11:59:41 +08:00
Piotr Pekala 4031fd0c18 Release 2019.2.0-alpha.8 2019-09-27 01:57:03 -07:00
grossmj 1c678e296e Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/version.py
2019-09-24 14:07:18 +08:00
grossmj 958ec94f13 Sync appliance files. 2019-09-24 14:06:26 +08:00
grossmj a9fd990904 Bump version to 2.2.0dev18 2019-09-24 14:02:36 +08:00
grossmj 9d18ac1e3e Merge branch 'master' into 2.2 2019-09-24 13:56:16 +08:00
grossmj 2cfac30810 Fix single quote is not closed. Fixes #1654 2019-09-17 18:54:18 +07:00
grossmj 67e70c4628 Fix wrong Dynamips command used to rename an ATM switch. Fixes #1651 2019-09-11 15:06:08 +07:00
grossmj 8b71e9b20c Release v2.2.0rc5 2019-09-09 15:06:14 +07:00
grossmj 7cd9bb6ca6 Merge branch '2.1' into 2.2 2019-09-09 15:02:06 +07:00
Jeremy Grossmann 6ec5683c95 Merge pull request #1649 from neffs/fix-sata
Don't specify the PCI bus for AHCI device
2019-09-05 17:37:13 +07:00
Jeremy Grossmann 2e41328ae9 Merge branch 'master' into fix-sata 2019-09-05 17:36:53 +07:00
Jeremy Grossmann 918ba21f1f Merge pull request #1648 from neffs/master
Add id value to all qemu drives
2019-09-05 17:33:05 +07:00
David Kreitschmann 077432ff2f Add qemu drive id to tests 2019-09-03 16:45:50 +02:00
David Kreitschmann 8105b68d52 Don't specify the PCI bus for AHCI device
pci.X is not always defined, let qemu handle this.

I think PCI buses only exist if PCI network adapters are defined, this
is not the case with virtio.
2019-09-03 16:03:27 +02:00
David Kreitschmann 906f29d5fc Add id value to all qemu drives
A fixed id doesn't hurt and now we can select Disk Interface=none in
GNS3 and e.g. attach the volume as a USB thumb drive with -device
usb-storage,drive=drive0,...
2019-09-03 15:54:51 +02:00
grossmj 5d4de9d0ba Fix AttributeError: Cannot set attribute '%s'. Fixes #1646 2019-08-31 14:43:35 +07:00
grossmj 4470519d9f Release v2.2.0rc4 2019-08-30 15:23:32 +07:00
Piotr Pekala 941857470d Release 2019.2.0-alpha.7 2019-08-29 09:39:26 -07:00
grossmj e64ed839f5 Check that vcpus value for GNS3 VM is an integer. Fixes #1636 2019-08-27 18:01:46 +07:00
grossmj 647dde1bb4 Make x,y optional for creating links via API. Fixes #1630 2019-08-26 19:51:03 +07:00
grossmj 63c0bfe46e Sync appliance files. 2019-08-26 17:08:33 +07:00
Jeremy Grossmann 2eddc463e7 Merge pull request #1643 from GNS3/allow-none-compute_id-templates
Allow "none" for compute_id in templates. Fixes #1638
2019-08-26 17:07:07 +07:00
grossmj fb288db50a Set default_name_format for some builtin nodes. 2019-08-26 17:00:18 +07:00
grossmj 55a9abfcea Allow "none" for compute_id in templates. 2019-08-26 16:48:03 +07:00
grossmj dac2cf4089 Bump version to 2.2.0dev17 2019-08-23 18:20:44 +07:00
grossmj 3b0bb8df4e Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/version.py
2019-08-20 17:34:47 +07:00
grossmj 9559748f9d Bump version to 2.2.0dev16 2019-08-20 17:33:48 +07:00
grossmj 4656521987 Release v2.2.0rc3 2019-08-11 19:14:56 -07:00
grossmj 2feec666a2 Revert to jsonschema 2.6.0 due to packaging problem. 2019-08-11 19:11:40 -07:00
grossmj 86772d9127 Release v2.2.0rc2 2019-08-10 12:04:19 -05:00
grossmj fc182e932a Fix typo with jsonschema version 3.2.0 -> 3.0.2 2019-08-10 11:55:47 -05:00
grossmj 27d447c926 Release v2.2.0rc1 2019-08-10 11:42:10 -05:00
grossmj df9f717d7c Sync appliance files 2019-08-10 11:35:32 -05:00
grossmj 703dca54ab Bump jsonschema to version 3.0.2 2019-08-10 11:31:08 -05:00
grossmj 39da0f3904 List Hyper-V VMs on non-english OSes. Fixes #1612 2019-07-30 15:01:17 -02:30
grossmj 6a7d47ce97 Merge branch '2.2' 2019-07-12 12:07:44 +02:00
grossmj 7c07d0b4bd Add missing default values in Cloud schema. 2019-07-12 11:32:55 +02:00
grossmj 6626bf37a6 Development on 2.2.0dev15 2019-07-11 17:34:56 +02:00
grossmj f7376ee382 Release v2.2.0b4 2019-07-11 16:58:35 +02:00
grossmj 3172985a21 Sync appliance files. 2019-07-11 16:55:13 +02:00
grossmj dcf94a5852 Requires a project to be opened to start/stop/suspend all nodes. Fixes #1609 2019-07-10 17:07:13 +02:00
grossmj cba39a3744 Fix issue when starting GNS3 VM for Hyper-V 2019-07-10 15:56:54 +02:00
grossmj 03c7744efd Set defaults for custom cloud nodes. 2019-07-10 15:51:06 +02:00
grossmj b0f74c2a5e Fix issue when trying to rename a Dynamips node that is already powered on. Fixes #2824 2019-07-10 15:40:11 +02:00
grossmj 63fb82a89d Remove deprecated Qemu parameter to run legacy ASA VMs. Fixes #2827 2019-07-10 11:33:04 +02:00
grossmj aad74dbcb9 Add debug message when searching for an image. Ref https://github.com/GNS3/gns3-gui/issues/2828 2019-07-10 11:16:50 +02:00
Jeremy Grossmann c5be58b016 Merge pull request #1607 from fcolista/patch-1
Update README.rst
2019-07-04 19:37:05 +02:00
ziajka 507090d69d Fix base href for web ui 2019-07-04 10:37:14 +02:00
Piotr Pekala ed27a46dee Release 2019.2.0-alpha.5 2019-07-04 00:20:54 -07:00
ziajka 8d02405e88 Fix redirection to web-ui bundled server 2019-07-04 08:59:33 +02:00
Francesco Colista a17034fc6d Update README.rst 2019-07-03 20:30:10 +02:00
Piotr Pekala 7adf5201f0 Release 2019.2.0-alpha.4 2019-07-03 06:08:46 -07:00
grossmj 0df3322b6c Development on 2.2.0dev14 2019-06-15 16:38:06 +02:00
grossmj 43c7acb0cf Release v2.2.0b3 2019-06-15 15:39:32 +02:00
Jeremy Grossmann 239d9e6fd6 Merge pull request #1599 from GNS3/cdrom-refresh
Refresh mounted media after ISO switch
2019-06-15 15:26:48 +02:00
grossmj 9e54ab77d0 Merge 2.1 into 2.2 branch. 2019-06-15 15:26:20 +02:00
grossmj 5dbedb744e Sync appliance files. 2019-06-15 15:24:45 +02:00
grossmj 7a463676cd Eject cdrom first before changing an image. Use 'force' when ejecting. 2019-06-15 15:20:21 +02:00
grossmj b0700b8787 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-06-15 12:53:55 +02:00
grossmj 06ce0868ec Fix template migration issues from GUI to controller. Fixes https://github.com/GNS3/gns3-gui/issues/2803 2019-06-15 12:52:50 +02:00
grossmj 7c33d3510a Development on 2.1.22dev1 2019-06-14 19:42:18 +02:00
grossmj cb1f73e9a2 Release v2.1.21 2019-06-14 10:47:07 +02:00
grossmj 2476581dca Change uBridge debug level to '1' when debugging is enabled. Fixes #1598 2019-06-12 14:35:13 +02:00
grossmj b7af2e4d5c Refresh mounted media after ISO switch. 2019-06-12 14:23:03 +02:00
Jeremy Grossmann b002812907 Merge pull request #1597 from kazkansouh/2.2-fix-1595-volumes
Fix for issue #1595
2019-06-05 12:10:34 +02:00
Karim af78031322 Resolve conflicts in docker volumes instead of error. Fixes https://github.com/GNS3/gns3-server/issues/1595 2019-06-05 10:40:40 +01:00
grossmj 61c87e57a4 Use console port to allocate guest CID (console ID) for Qemu VMs. Fixes #2804 2019-06-05 11:25:35 +02:00
grossmj 9cce4de190 %guest-cid% variable implementation for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2804 2019-06-04 18:00:44 +02:00
grossmj 54d50b2ef4 Set hkp protocol for keyserver in remote install script. Fixes #1596 2019-06-04 15:10:34 +02:00
grossmj 9e518412b3 Set keyserver port to 80 in remote install script. Fixes #1596 2019-06-04 15:03:28 +02:00
grossmj e9154f6af6 Fix KeyError: 'usage' exception when configuring IOU template. Fixes https://github.com/GNS3/gns3-gui/issues/2806 2019-05-31 08:41:44 +02:00
grossmj dd05884096 Development on 2.2.0dev13 2019-05-29 17:52:38 +07:00
grossmj e58f86e204 Release v2.2.0b2 2019-05-29 17:16:59 +07:00
grossmj a6bc6bc79c Update appliance files. 2019-05-29 16:52:50 +07:00
grossmj 336b77e28a Merging 2.1 into 2.2 branch 2019-05-29 16:50:36 +07:00
grossmj 3dbce3fa40 Development on 2.1.21dev1 2019-05-29 16:37:42 +07:00
grossmj 053a16960c Release v2.1.20 2019-05-29 15:44:25 +07:00
grossmj a860243531 Ignore Unicode errors when reading base config file contents. 2019-05-29 15:43:17 +07:00
grossmj 99886d3f0c Development on 2.1.20dev1 2019-05-28 16:33:43 +07:00
grossmj 6fb613dcff Release v2.1.19 2019-05-28 15:23:35 +07:00
grossmj 4f803ff162 Sync appliances. 2019-05-28 10:37:43 +07:00
grossmj 591d4f29ff Fix minor bugs with log rotation support. Ref #1586 2019-05-28 10:34:27 +07:00
grossmj 87d85c1947 Remove yarl from requirements.txt since it is installed by aiohttp. 2019-05-27 18:10:46 +07:00
grossmj 54c4bd31d4 Remove setup require since we do not use environment makers yet. 2019-05-27 17:57:37 +07:00
grossmj 907807dc53 Drop typing dependency. 2019-05-27 17:38:16 +07:00
grossmj 5cbfafbeb2 Support snapshots for portable projects. Fixes https://github.com/GNS3/gns3-gui/issues/2792 2019-05-27 15:35:47 +07:00
grossmj 6229fadace Fix topology test 2019-05-26 15:55:29 +07:00
grossmj 81a48df9bb Update the GNS3 version in topology file if converted. Ref https://github.com/GNS3/gns3-gui/issues/2798 2019-05-26 15:44:55 +07:00
grossmj 2289fd4a2f Set log max size to 10MB. Ref #1586 2019-05-25 21:33:47 +07:00
grossmj 4ac999461b Support for log rotation and compression. Fixes #1586 2019-05-25 18:23:51 +07:00
grossmj 3b87a19979 Do not start QEMU console if QEMU process is not started. Fixes https://github.com/GNS3/gns3-gui/issues/2712 2019-05-25 15:31:35 +07:00
grossmj 5a62277819 Merging 2.2 into master 2019-05-24 15:27:07 +07:00
grossmj a86f881d83 Avoid sending warning message all the time for Ethernet switch. 2019-05-23 15:57:08 +07:00
grossmj 457ae4783f Development on 2.1.19dev1 2019-05-23 14:37:37 +07:00
grossmj 878987a26e Release v2.1.18 2019-05-22 16:13:28 +07:00
grossmj 40d7ae6866 Support to include snapshots in portable projects. 2019-05-22 14:35:37 +07:00
grossmj 39f6f4edd5 Development on 2.2.0dev12 2019-05-21 19:16:19 +07:00
grossmj 5b3be13e73 Release v2.2.0b1 2019-05-21 15:26:54 +07:00
ziajka 16908df8b2 Upgrade GNS3 Web UI to v2019.2.0-alpha.3 2019-05-20 14:23:25 +02:00
grossmj c357d52ba4 Revert "Force aiohttp version to 2.3.10 and aiohttp-cors version to 0.5.3"
Ref https://github.com/GNS3/gns3-server/issues/1583
Ref https://github.com/GNS3/gns3-server/issues/1592

This reverts commit 351ed64de9.
2019-05-20 17:23:26 +07:00
grossmj 44a142e91d Fix tests 2019-05-20 11:02:29 +07:00
grossmj 28004479fd Change behavior when an IOU license is verified. Fixes https://github.com/GNS3/gns3-server/issues/1555 2019-05-20 10:51:24 +07:00
grossmj e8b8554c1a Fix Qemu VM state support after closing a project and check for JSON data returned by qemu-img. Fixes #1591 2019-05-19 17:59:00 +07:00
grossmj 424db843ca Fix Docker extra volumes support 2019-05-19 14:26:03 +07:00
grossmj 0c6749f62b Update Dockerfile to Ubuntu 18.04 2019-05-18 20:19:34 +07:00
Jeremy Grossmann cdae1f9e00 Merge pull request #1584 from kazkansouh/2.2-docker-volumes
Custom persistent docker volumes
2019-05-18 20:17:11 +07:00
grossmj cf0cc8bb87 Ensure Qemu monitor commands are executed. Ref #1582. 2019-05-18 19:31:41 +07:00
grossmj c41c01b95f Fix tests. 2019-05-18 19:19:27 +07:00
grossmj 2340823f53 Update appliance files. 2019-05-18 15:45:28 +07:00
grossmj 470cea327f Fix console variable replacement issue. 2019-05-18 14:31:21 +07:00
grossmj 6edcbd0461 Set console type to "none" by default for Ethernet switches and add a warning if trying to use "telnet". Fixes https://github.com/GNS3/gns3-gui/issues/2776 2019-05-18 14:28:20 +07:00
grossmj a7e449ff0e Bump version to 2.2.0dev11 2019-05-18 14:11:07 +07:00
grossmj e763980dbe Add %console-port% variable for additional Qemu options. Fixes https://github.com/GNS3/gns3-gui/issues/2786 2019-05-18 13:51:00 +07:00
grossmj f1ae3b3778 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-05-18 13:45:57 +07:00
grossmj 9400c49b82 Merge 2.1 branch into 2.2 2019-05-18 13:45:39 +07:00
grossmj 773bad811a Fix invalid reStructuredText for long description in setup.py 2019-05-17 16:14:19 +07:00
grossmj 6b54cc27da Release v2.1.17 2019-05-17 15:10:28 +07:00
grossmj 351ed64de9 Force aiohttp version to 2.3.10 and aiohttp-cors version to 0.5.3
This is to fix build issue for Ubuntu 19.04 package on Launchpad.
Ref #1583 https://github.com/GNS3/gns3-gui/issues/2774
2019-05-17 09:56:16 +07:00
Karim 81ddb0cfe6 Impoved docker volumes user input validation 2019-04-22 12:46:28 +01:00
Karim 0c19bc8d43 Support for additional persistent docker volumes to be specified within appliance configuration 2019-04-22 10:26:41 +01:00
Jeremy Grossmann 264f9da576 Merge pull request #1580 from GNS3/pyup-update-pytest-4.4.0-to-4.4.1
Update pytest to 4.4.1
2019-04-16 20:05:10 +07:00
pyup-bot 30a9ea8675 Update pytest from 4.4.0 to 4.4.1 2019-04-16 03:34:57 +02:00
grossmj 7543d7587c Release v2.2.0a5 2019-04-15 17:05:20 +07:00
grossmj f5ebc6a29a Merge 2.1 into 2.2 2019-04-15 15:54:08 +07:00
grossmj f41158173b Development on 2.1.17dev1 2019-04-15 12:41:40 +07:00
grossmj cb5dc36987 Release v2.1.16 2019-04-15 12:00:18 +07:00
grossmj fb470dd4b5 Back to the major.minor version for config files. Ref https://github.com/GNS3/gns3-gui/issues/2756 2019-04-14 21:31:40 +07:00
grossmj 6dbb992513 Fix templates missing after server restart. Fixes https://github.com/GNS3/gns3-gui/issues/2769 2019-04-14 20:39:55 +07:00
grossmj e962717448 Fix bug when GNS3 VM were not saved. Fix tests. 2019-04-14 17:42:20 +07:00
grossmj 6dc58b28fd Some adjustments with compute WebSocket handling. Ref https://github.com/GNS3/gns3-server/issues/1564 2019-04-14 16:48:12 +07:00
grossmj 6db8cecda5 Merge 2.1 into 2.2 2019-04-13 18:39:06 +07:00
grossmj cc1980ac1c Fix broken embedded console for Ethernet switch. Fixes #1574 2019-04-11 17:57:47 +07:00
grossmj 2af9c9c8ec Prevent locked nodes to be deleted. Fixes https://github.com/GNS3/gns3-gui/issues/2764 2019-04-10 15:43:51 +07:00
grossmj 8cd66cfc02 Remove old unused argument option. Fixes #1569 2019-04-09 19:26:07 +07:00
grossmj 4d222ddc0a Bump version to 2.2.0dev10 2019-04-09 19:20:21 +07:00
grossmj 5c884702e5 Development on 2.2.0dev9 2019-04-05 22:01:35 +08:00
grossmj 62c5aa2948 Release v2.2.0a4 2019-04-05 19:10:04 +08:00
Jeremy Grossmann 474e184646 Merge pull request #1573 from kazkansouh/2.2-docker-user
Support for docker images that set the USER directive (+test coverage)
2019-04-05 19:00:22 +08:00
grossmj 7a55ba3c1e Use the full version number for path to config files. Ref https://github.com/GNS3/gns3-gui/issues/2756 2019-04-05 18:44:31 +08:00
Karim 6df93d4db0 Updated tests for setting docker user 2019-04-05 11:06:35 +01:00
Karim 7c3a38d379 Support for docker images that set the USER directive. Changes the
docker user to root for the init script to configure the network,
then drops to the configured user (or root if one is not defined)
for continuing booting the image.
2019-04-05 08:51:57 +01:00
grossmj dde01317e0 Fix packet filter not working for Ethernet switch and Ethernet hub. Fixes https://github.com/GNS3/gns3-gui/issues/2754 2019-04-02 01:12:06 +07:00
grossmj a17119187b Fix remote packet capture for Dynamips. 2019-04-01 20:58:18 +07:00
grossmj 4cc5dbc228 Fix remote packet capture and make sure packet capture is stopped when deleting an NIO. Fixes https://github.com/GNS3/gns3-gui/issues/2753 2019-04-01 19:47:31 +07:00
grossmj f01706e9e6 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-04-01 15:53:59 +07:00
grossmj c075baa05b Store config files in version specific location 2019-04-01 15:53:39 +07:00
Jeremy Grossmann de2cbf4258 Merge pull request #1565 from GNS3/pyup-update-pytest-4.3.1-to-4.4.0
Update pytest to 4.4.0
2019-04-01 12:00:59 +07:00
pyup-bot bc71fb6933 Update pytest from 4.3.1 to 4.4.0 2019-04-01 06:54:28 +02:00
grossmj 21bed54768 Fix opening previously saved 2.1 project grid overlapping. Fixes #2734 2019-03-31 16:48:08 +07:00
grossmj d50614aed7 Fix empty theme name in symbol selection dialog. Fixes https://github.com/GNS3/gns3-gui/issues/2751 2019-03-30 16:20:21 +07:00
grossmj 22854f1baa Refresh documentation 2019-03-30 15:56:26 +07:00
grossmj 5045c6cfbf Update documentation 2019-03-28 17:24:02 +08:00
ziajka 6a6cabc2d2 Bundle v2019.1.0-alpha.3 web-ui 2019-03-27 12:34:45 +01:00
grossmj 541101741b Development on 2.2.0dev8 2019-03-25 23:44:19 +08:00
grossmj 2b786e40b9 Release v2.2.0a3 2019-03-25 19:35:22 +08:00
grossmj 2bb1b61526 Fix traceback when starting packet capture on builtin nodes. Fixes https://github.com/GNS3/gns3-gui/issues/2743 2019-03-25 16:57:36 +08:00
ziajka 106df1d4ab Load v2019.1.0-alpha.2 of WebUI 2019-03-22 14:17:40 +01:00
ziajka 06a6abe687 Fetch tags for update-bundled-web-ui.sh 2019-03-22 14:12:51 +01:00
ziajka 3f4bdfef11 Fix mimetype for javascript, #1559 2019-03-22 08:35:27 +01:00
ziajka cbb6eccad8 Merge branch '2.2' of github.com:GNS3/gns3-server into 2.2 2019-03-21 10:39:55 +01:00
ziajka 9edbd27b4f Serve WebUI via get_resource for freezed app 2019-03-21 10:39:49 +01:00
grossmj 645031ee15 Development on 2.1.16dev1 2019-03-21 13:56:11 +08:00
grossmj c70b344133 Release v2.1.15 2019-03-21 11:41:44 +08:00
grossmj 343f223a83 Fix tests after deactivating the embedded shell for Ethernet switch. Ref #1424 #1556 2019-03-20 17:04:02 +08:00
grossmj 1f1d93d078 Deactivate the embedded shell for Ethernet switch. Ref #1424 #1556 2019-03-20 16:23:30 +08:00
grossmj dd211bce52 Fix VBoxManage fails if VM has specific special characters in name. Fixes #2739 2019-03-18 23:29:18 +07:00
grossmj e00bde51da Merge branch '2.1' into 2.2 2019-03-18 19:26:46 +07:00
grossmj e291ec1eb9 Fix IOU symlink issue on remote servers. 2019-03-18 18:11:16 +07:00
grossmj 3daa3f450b Fix IOU symlink issue on remote servers. 2019-03-18 18:05:40 +07:00
grossmj 8e8985c69f Fix vcpus configuration for GNS3 VM on VMware. Ref #2738. 2019-03-18 17:53:14 +07:00
grossmj 03401a477e Fix issue when images are not uploaded from appliance wizard. Ref https://github.com/GNS3/gns3-gui/issues/2738 2019-03-18 15:33:37 +07:00
grossmj 4e396ac690 Save the GNS3 VM settings even if the GNS3 VM cannot be stopped. 2019-03-18 15:30:59 +07:00
grossmj 3a73d01547 Fix exception when emitting event from controller. Ref https://github.com/GNS3/gns3-gui/issues/2737 2019-03-15 13:14:55 +07:00
grossmj 23b568678a Development on 2.2.0dev7 2019-03-14 23:27:11 +07:00
grossmj 8ad632976f Release v2.2.0a2 2019-03-14 17:09:53 +07:00
ziajka b8bf2bf465 Web-UI v2019.1.0-alpha.1 2019-03-14 10:44:09 +01:00
ziajka 55be74f93c Update docs for update-bundled-web-ui.sh 2019-03-14 10:33:35 +01:00
grossmj 7d591b0228 Fix issue when loading and quickly closing a project and opening it again. Fixes #1501. 2019-03-14 15:15:27 +07:00
grossmj a059e6b943 Disable unreliable nested virtualization check. 2019-03-13 23:13:54 +07:00
grossmj c6990dfeee Merge remote-tracking branch 'origin/2.2' into 2.2 2019-03-13 12:56:50 +07:00
grossmj aff67b324f Fix issue not checking build number on Windows. 2019-03-13 12:56:33 +07:00
Jeremy Grossmann f7e90a7d7f Merge pull request #1550 from GNS3/pyup-update-pytest-4.3.0-to-4.3.1
Update pytest to 4.3.1
2019-03-13 02:21:49 +07:00
pyup-bot ed6b1d909d Update pytest from 4.3.0 to 4.3.1 2019-03-12 20:16:34 +01:00
grossmj 010d65114d Hyper-V with nested virtualization is only supported on Windows 10 Anniversary Update or later. 2019-03-13 02:15:58 +07:00
grossmj 3dcb7799e3 Use accurate info to detect Windows version. 2019-03-12 22:40:37 +07:00
grossmj aaaeb410d5 Fix exception when loading and quickly closing a project. 2019-03-12 21:50:09 +07:00
grossmj d506962bdb Debugging why sys.getwindowsversion() does not work with frozen app. 2019-03-12 21:18:46 +07:00
grossmj 4d9728b6f5 Correctly rename symbol. 2019-03-12 18:54:05 +07:00
grossmj ff9048b5a8 Revert "Rename symbol."
This reverts commit 6c96be2acc.
2019-03-12 18:53:02 +07:00
grossmj 6c96be2acc Rename symbol. 2019-03-12 18:42:54 +07:00
Jeremy Grossmann 21afaf31f9 Merge pull request #1549 from GNS3/symbol-management-refactoring
Symbol management refactoring
2019-03-12 18:21:30 +07:00
grossmj 8e5ac228d5 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-03-12 18:17:41 +07:00
grossmj 94f63f54ba Change Hyper-V requirement checks. 2019-03-12 18:17:31 +07:00
grossmj cf91e904f7 Early support for symbol themes. 2019-03-12 18:13:33 +07:00
ziajka 767bb770ca Re-order handlers in order to prevent CORS 2019-03-11 16:16:10 +01:00
grossmj bae3fb84b9 Download custom appliance symbols from GitHub
Fix symbol cache issue. Ref https://github.com/GNS3/gns3-gui/issues/2671
Fix temporary directory for symbols was not deleted
Fix temporary appliance file was not deleted
2019-03-11 16:55:16 +07:00
grossmj 889d29ec55 Update appliances. 2019-03-11 09:48:54 +07:00
Jeremy Grossmann a221678448 Merge pull request #1545 from steffann/patch-1
Add vMX 17.4 and 18.4
2019-03-09 17:48:46 +07:00
Sander Steffann 20886bdd51 Update juniper-vmx-vfp.gns3a 2019-03-08 23:50:55 +01:00
Sander Steffann 089148e451 Update juniper-vmx-vcp.gns3a 2019-03-08 23:39:59 +01:00
grossmj d3ec2a7275 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-03-07 18:55:59 +07:00
grossmj 2d01ef489b Option to export snapshots. 2019-03-07 18:55:38 +07:00
ziajka d64d7de541 Support tags versioned WebUI when bundling 2019-03-07 11:56:15 +01:00
Jeremy Grossmann 372017f467 Merge pull request #1537 from GNS3/import-export-refactoring
Project import/export refactoring. Fixes #1349
2019-03-07 17:38:56 +07:00
grossmj 826f6b2d57 Fix include images test. 2019-03-07 17:17:07 +07:00
grossmj 0ae66a2608 Support selecting a compression type when exporting a project. 2019-03-07 17:05:32 +07:00
grossmj 380224dca1 Change how VPCS executable is searched. 2019-03-06 23:15:05 +07:00
grossmj af80b0bb6e Use aiofiles where relevant. 2019-03-06 23:00:01 +07:00
grossmj b0df7ecabf Merge branch '2.2' into import-export-refactoring 2019-03-05 17:29:01 +07:00
grossmj 4c83fc1243 Update paths for binaries moved to the MacOS directory in GNS3.app 2019-03-04 16:07:04 +07:00
grossmj 69ba0ccf77 Bump version to 2.2.0dev2 2019-03-04 14:48:57 +07:00
Jeremy Grossmann 0681c296a7 Merge pull request #1541 from GNS3/lock-unlock-items
Refactoring for locking/unlocking items
2019-03-02 16:44:28 +07:00
grossmj 3f679bd106 Locked state should not be used when duplicating a node. 2019-03-02 16:39:05 +07:00
grossmj 724eda1f35 Handle locking/unlocking items independently from the layer position. 2019-03-02 16:26:40 +07:00
Jeremy Grossmann 3f7c4c0474 Update qemu_vm.py 2019-03-01 23:40:32 +07:00
grossmj 5b6011a248 Stay with jsonschema 2.6.0 2019-03-01 17:26:23 +07:00
grossmj 80eb06f67c Merge 2.1 into 2.2 2019-03-01 17:23:49 +07:00
grossmj 9132ba8d05 Remove zipstream from tests. 2019-02-28 23:25:05 +07:00
grossmj 85ea1cf7a9 Remove import zipstream from tests. 2019-02-28 17:50:09 +07:00
grossmj 8cc8269842 Use aiozipstream for snapshots.
Fix tests.
2019-02-28 17:25:05 +07:00
grossmj 52bfa636c1 Project duplication support. 2019-02-27 17:57:07 +07:00
grossmj 4eca82174d Development on 2.1.15dev1 2019-02-27 15:59:16 +07:00
grossmj 32f5dbb645 Release v2.1.14 2019-02-27 14:58:52 +07:00
grossmj 7aae682f0a Fix issue when setting cpuid.corespersocket for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/2723 2019-02-27 14:47:45 +07:00
grossmj 879e32eb9a Bump ACPI Shutdown Timeout to 120 seconds. Ref #1536 2019-02-26 23:19:33 +07:00
grossmj 01481cde1f Development on 2.1.14dev1 2019-02-26 18:10:23 +07:00
grossmj b5deb9d177 Release v2.1.13 2019-02-26 16:46:02 +07:00
grossmj a8990c9e89 Non blocking project exportation. 2019-02-26 15:55:07 +07:00
Jeremy Grossmann e1aa13fa73 Force jsonschema dependency to 2.6.0
This is to fix this issue when starting the (frozen) application on Windows:

```
  File "C:\Python36-x64\lib\site-packages\jsonschema\validators.py", line 505, in <module>
  File "C:\Python36-x64\lib\site-packages\jsonschema\_utils.py", line 57, in load_schema
  File "C:\Python36-x64\lib\pkgutil.py", line 634, in get_data
OSError: [Errno 34] Result too large: 'jsonschema\\schemas\\draft6.json'
```
2019-02-26 15:28:11 +07:00
grossmj 135d56371d Fix tests for project notifications. 2019-02-23 23:20:11 +07:00
grossmj 7fe8f7e716 Fix long-polling request for project notifications. 2019-02-23 21:08:52 +07:00
grossmj 10702f87bc Fix export test. 2019-02-23 11:13:50 +07:00
grossmj 2fb5e47c8d Allow cloud nodes to be exported. Fixes #1519 2019-02-23 11:07:01 +07:00
grossmj 4487e578bc Fix create a node from a template test. 2019-02-22 18:44:12 +07:00
grossmj 5754747a90 Merging 2.1 into 2.2 2019-02-22 18:04:49 +07:00
grossmj 62c51edbae Less aggressive connections to uBridge. Ref #1289 2019-02-22 16:05:31 +07:00
grossmj a13d063aa1 Fix topology images (Pictures) disappearing from projects. Fixes #1514. 2019-02-21 23:58:54 +07:00
grossmj 1ef1872f8e Reset MAC addresses when duplicating a project. Fixes #1522 2019-02-20 16:38:43 +07:00
grossmj 657698a961 Fix create a node from an appliance test. 2019-02-20 11:21:29 +07:00
grossmj 081ba31b50 Fix API call to create a node from an appliance doesn't return the new node data. Fixes #1527 2019-02-20 10:47:33 +07:00
grossmj aea4ae808f Detect invalid environment variable and send a warning when creating a Docker node. Ref #2683 2019-02-19 17:34:10 +07:00
Jeremy Grossmann 3e601a8a24 Merge pull request #1526 from GNS3/pyup-update-pytest-4.1.1-to-4.3.0
Update pytest to 4.3.0
2019-02-19 15:57:13 +07:00
grossmj ae3515434c Do not export/import symlinks for projects. Fixes #2699 2019-02-19 12:43:44 +07:00
pyup-bot 8e2d8f3962 Update pytest from 4.1.1 to 4.3.0 2019-02-19 04:27:57 +01:00
grossmj 589c9754e8 Fix symlink not being created for duplicated IOU devices. Fixes https://github.com/GNS3/gns3-gui/issues/2699 2019-02-19 00:09:59 +08:00
grossmj 4ecd3b2015 Configure coresPerSocket value in VMX file for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/2688 2019-02-17 23:16:48 +08:00
grossmj 84ee3263ba Count logical CPUs to detect if the number of vCPUs is too high when configuring the GNS3 VM. Fixes #2688. 2019-02-17 23:07:33 +08:00
grossmj 174624121d Fix Qemu VM tests. Ref #1516 2019-02-17 19:53:46 +08:00
grossmj d9a9abf845 Add explicit error when trying to pull a Docker image from Docker Hub without Internet access. Fixes #1506. 2019-02-17 19:21:21 +08:00
grossmj 0b07299472 Fixes double display output in GRUB in QEMU v3.1. Fixes #1516. 2019-02-17 19:03:36 +08:00
ziajka f7d0f54b6d Use production env for bundled web-ui 2019-01-29 10:02:39 +01:00
grossmj 96dce2ec82 Release v2.2.0a1 2019-01-29 14:47:09 +08:00
grossmj 117a1ac6da Restore reload support for nodes. 2019-01-24 16:51:14 +08:00
grossmj 7fb192699b Development on 2.1.13dev1 2019-01-23 15:42:10 +08:00
grossmj bccdfc97d1 Release 2.1.12 2019-01-23 15:40:38 +08:00
Jeremy Grossmann 792c4310eb Merge pull request #1502 from GNS3/svg-symbols-fixes
Tune how to get the size of SVG images.
2019-01-22 00:41:26 +07:00
grossmj 3e21f96bf9 Fix indentation issue. Ref https://github.com/GNS3/gns3-gui/issues/2674
(cherry picked from commit c14d79a3d5)
2019-01-21 23:51:46 +07:00
grossmj 5f932fee9f Tune how to get the size of SVG images. Ref https://github.com/GNS3/gns3-gui/issues/2674.
* Default for missing height/width is "100%" as defined in the SVG specification
* Better error message, if viewBox attribute is missing
* Removal of "%" in percent more fault tolerant by using rstrip("%")

(cherry picked from commit e3757a8955)
2019-01-21 23:49:43 +07:00
grossmj c14d79a3d5 Fix indentation issue. Ref https://github.com/GNS3/gns3-gui/issues/2674 2019-01-21 16:24:23 +07:00
grossmj e3757a8955 Tune how to get the size of SVG images. Ref https://github.com/GNS3/gns3-gui/issues/2674.
* Default for missing height/width is "100%" as defined in the SVG specification
* Better error message, if viewBox attribute is missing
* Removal of "%" in percent more fault tolerant by using rstrip("%")
2019-01-21 16:01:03 +07:00
grossmj 456ef1348b Fix DeprecationWarning: invalid escape sequence. Fixes https://github.com/GNS3/gns3-gui/issues/2670 2019-01-17 18:01:58 +07:00
grossmj 4b52e9313e Fix issue with coroutine not awaited. Fixes #1499 2019-01-17 17:43:09 +07:00
grossmj 474025175e Remove "deprecated" node for VirtualBox based GNS3 VM support. Ref #1377 2019-01-16 19:22:16 +07:00
grossmj 191036e266 Fix wrong controller method call. 2019-01-14 17:20:11 +07:00
grossmj 8360ae98b1 Move appliance and template management code in their own classes. 2019-01-14 16:09:06 +07:00
Jeremy Grossmann 5a3929f01a Merge pull request #1497 from GNS3/pyup-update-pytest-4.1.0-to-4.1.1
Update pytest to 4.1.1
2019-01-13 12:53:54 +07:00
pyup-bot aed6ea3aa0 Update pytest from 4.1.0 to 4.1.1 2019-01-12 21:59:44 +01:00
Jeremy Grossmann 95f91bde19 Merge pull request #1496 from GNS3/pyup-update-aiohttp-3.5.3-to-3.5.4
Update aiohttp to 3.5.4
2019-01-12 17:35:49 +07:00
pyup-bot 7c288fc61b Update aiohttp from 3.5.3 to 3.5.4 2019-01-12 11:34:10 +01:00
grossmj 12a4f95a8f Update appliance files. 2019-01-12 17:33:53 +07:00
grossmj c6afea49da Try to delete saved VM state only if a snapshot has been saved. 2019-01-12 17:04:37 +07:00
grossmj bb284d082a Set socket options SO_KEEPALIVE and TCP_NODELAY for embedded Telnet server. Ref #1335 2019-01-12 16:50:15 +07:00
grossmj a896346c77 Fix issue with notification queue that prevented to properly close projects. Fix #1493 2019-01-12 16:02:36 +07:00
grossmj 161c05a310 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-01-12 12:13:40 +07:00
grossmj f0ffb07165 Fix issue with "usage" variable for Dynamips VMs. Fixes #1495 2019-01-12 12:13:22 +07:00
Jeremy Grossmann ce048c6a00 Merge pull request #1494 from GNS3/pyup-update-aiohttp-3.5.2-to-3.5.3
Update aiohttp to 3.5.3
2019-01-11 19:47:24 +08:00
pyup-bot 289eee968e Update aiohttp from 3.5.2 to 3.5.3 2019-01-11 08:59:41 +01:00
Jeremy Grossmann b68c0cf176 Merge pull request #1491 from GNS3/pyup-update-pytest-4.0.2-to-4.1.0
Update pytest to 4.1.0
2019-01-10 09:55:09 +07:00
Jeremy Grossmann b20f2a116b Merge pull request #1492 from GNS3/pyup-update-aiohttp-3.5.1-to-3.5.2
Update aiohttp to 3.5.2
2019-01-10 09:54:54 +07:00
pyup-bot cdb7eea888 Update aiohttp from 3.5.1 to 3.5.2 2019-01-08 22:29:49 +01:00
pyup-bot b1123acb8a Update pytest from 4.0.2 to 4.1.0 2019-01-06 23:05:37 +01:00
grossmj c736051dda Fix tests. 2018-12-30 21:50:47 +07:00
grossmj 9ed181151f New node information dialog to display general, usage and command line information.
Ref https://github.com/GNS3/gns3-gui/issues/2662 https://github.com/GNS3/gns3-gui/issues/2656
2018-12-30 19:35:24 +07:00
Jeremy Grossmann 40f8a33331 Merge pull request #1489 from GNS3/pyup-update-sphinx-1.8.2-to-1.8.3
Update sphinx to 1.8.3
2018-12-27 00:50:23 +07:00
pyup-bot 2a1822fe12 Update sphinx from 1.8.2 to 1.8.3 2018-12-25 22:19:11 +01:00
Jeremy Grossmann b66e42e650 Merge pull request #1488 from GNS3/pyup-update-aiohttp-3.5.0-to-3.5.1
Update aiohttp to 3.5.1
2018-12-25 19:21:15 +07:00
pyup-bot 485b8a3db4 Update aiohttp from 3.5.0 to 3.5.1 2018-12-25 08:44:09 +01:00
Jeremy Grossmann eacc20cf07 Merge pull request #1487 from GNS3/pyup-update-aiohttp-3.4.4-to-3.5.0
Update aiohttp to 3.5.0
2018-12-24 17:48:10 +07:00
pyup-bot e1c250a8dd Update aiohttp from 3.4.4 to 3.5.0 2018-12-23 10:14:05 +01:00
grossmj eae9774d69 Support "usage" field for Dynamips, IOU, VirtualBox and VMware. Fixes https://github.com/GNS3/gns3-gui/issues/2657 2018-12-21 16:54:13 +08:00
grossmj 468145319d Merge 2.1 into 2.2 branch. 2018-12-21 15:24:34 +08:00
grossmj ef38ccfefa Automatically create a symbolic link to the IOU image in the IOU working directory. Fixes #1484 2018-12-17 22:42:18 -06:00
grossmj 670b6d689a Merge remote-tracking branch 'origin/2.1' into 2.1 2018-12-14 19:53:51 -06:00
grossmj fc75a6b8d3 Fix link pause/filters only work for the first interface of Docker containers. Fixes #1482 2018-12-14 19:53:43 -06:00
Jeremy Grossmann ed7b91ae3a Merge pull request #1481 from GNS3/pyup-update-pytest-4.0.1-to-4.0.2
Update pytest to 4.0.2
2018-12-14 11:49:43 -06:00
pyup-bot d79f6b578d Update pytest from 4.0.1 to 4.0.2 2018-12-14 18:21:49 +01:00
grossmj f76b329cba Fix ConnectionResetError issues and switch to aiohttp version 3.4.4. Fixes #1474. 2018-12-03 19:14:22 +08:00
grossmj 030714ae80 Fix server authentication. 2018-12-03 18:46:24 +08:00
grossmj 0fd54536d2 Fix issue when there is no gns3_controller.conf. Fixes https://github.com/GNS3/gns3-gui/issues/2644 2018-11-30 19:09:10 +08:00
grossmj 58b2ee152d Fix Docker console test. 2018-11-30 18:59:02 +08:00
grossmj bec2270334 Fix non responsive console for Docker VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2645 2018-11-30 17:06:21 +08:00
grossmj 56412b35e0 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/utils/asyncio/telnet_server.py
2018-11-30 12:38:02 +08:00
grossmj 9fbdb25da8 Back to classic symbol theme. Ref https://github.com/GNS3/gns3-gui/issues/2644 2018-11-29 17:14:21 +08:00
Jeremy Grossmann 647ac87c89 Merge pull request #1476 from ddragic/x11vnc
Docker: fix x11vnc not starting
2018-11-29 07:03:58 +07:00
Dušan Dragić 817a053dfc docker_vm: fix x11vnc not starting 2018-11-29 00:37:20 +01:00
Jeremy Grossmann fb0456fdfa Merge pull request #1475 from GNS3/naming-consistency
Review and apply consistent naming
2018-11-28 16:32:42 +07:00
grossmj d7c2e16c21 Use "template" to name what we use to create new nodes. 2018-11-28 16:12:58 +07:00
grossmj 21c0a35f77 Use project instead of topology where appropriate. 2018-11-27 18:30:16 +07:00
grossmj a17fa821bd Make sure nothing is named "compute server". 2018-11-27 18:14:51 +07:00
Jeremy Grossmann b4a2bc5b47 Merge pull request #1467 from GNS3/symbol-themes
Support symbol themes. Ref #1466
2018-11-27 17:19:52 +07:00
grossmj f39c27ff7b Allow usage property in Docker appliance. 2018-11-27 16:36:52 +07:00
Jeremy Grossmann db982f5df7 Merge pull request #1473 from GNS3/kazkansouh-2.2-grid-new-project
Improved grid support
2018-11-27 16:34:00 +07:00
grossmj a93606d9ed Use "node" instead of "appliance" for grid support. 2018-11-27 16:13:22 +07:00
grossmj dd14101eec Merge branch '2.2-grid-new-project' of git://github.com/kazkansouh/gns3-server into kazkansouh-2.2-grid-new-project 2018-11-27 15:50:24 +07:00
grossmj 83161bcdd4 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-11-27 15:47:29 +07:00
Jeremy Grossmann df4e4bec24 Merge pull request #1472 from GNS3/docker-console-resize
Telnet console resize support for Docker VM. Fixes #1471
2018-11-27 15:17:34 +07:00
grossmj 60ac6d2dfe Telnet console resize support for Docker VM. 2018-11-27 15:06:56 +07:00
Jeremy Grossmann 1067f71952 Allow appliances to be loaded from file without the appliance id.
Fixes https://github.com/GNS3/gns3-gui/issues/2639.
2018-11-27 14:03:12 +07:00
Karim 8eb20525e8 Update schema to allow for drawing grid size to be part of project. 2018-11-26 15:31:28 +00:00
grossmj c0a0a13bdd Avoid _fix_permissions() to be called twice when stopping Docker VM. Ref #1428 2018-11-26 15:53:24 +07:00
grossmj a3044ede77 Fix _fix_permissions() garbles permissions in Docker VM. Ref #1428 2018-11-25 17:11:42 +07:00
grossmj df3baffd9b Fix "None is not of type 'integer'" when opening project containing a Qemu VM. Fixes #2610. 2018-11-24 19:56:29 +07:00
grossmj 219c346187 Remove useless warning. 2018-11-24 17:04:16 +07:00
Jeremy Grossmann 6a2d1e9b33 Merge pull request #1465 from GNS3/pyup-update-pytest-4.0.0-to-4.0.1
Update pytest to 4.0.1
2018-11-24 16:08:58 +07:00
pyup-bot e2231b1220 Update pytest from 4.0.0 to 4.0.1 2018-11-24 09:21:06 +01:00
grossmj e0813bfbe8 Normalize symbol ID on Windows. 2018-11-23 18:47:42 +07:00
grossmj 9f7f26700e Debugging for Windows. 2018-11-23 18:33:45 +07:00
grossmj 51787295dd Use POSIX path for symbol ID. 2018-11-23 18:26:04 +07:00
grossmj 17d070dca7 Early support for symbol themes. 2018-11-23 17:27:10 +07:00
grossmj 301b7475f7 Sync appliances 2018-11-21 14:13:14 +07:00
grossmj f442c6e9e1 Sync appliances 2018-11-21 14:12:38 +07:00
Jeremy Grossmann 2a3825543a Merge pull request #1450 from GNS3/pyup-update-sphinx-1.7.1-to-1.8.2
Update sphinx to 1.8.2
2018-11-20 17:13:53 +07:00
Jeremy Grossmann df0f0c5b83 Merge branch '2.2' into pyup-update-sphinx-1.7.1-to-1.8.2 2018-11-20 17:06:42 +07:00
grossmj 2e79da5fe1 Fix broken examples in API documentation. 2018-11-20 16:24:59 +07:00
grossmj 4e2b8bfe7c Add more information about appliances to the API documentation. 2018-11-20 16:21:33 +07:00
grossmj 68ecbffcf1 Use Python3.6 to build the API documentation. 2018-11-20 15:35:46 +07:00
grossmj 1289d20a14 Add missing files for API documentation. 2018-11-20 15:19:44 +07:00
grossmj 53928b884f Bump version to 2.2.0dev5 2018-11-20 14:37:38 +07:00
grossmj bc5eda8259 Restore previously removed test. 2018-11-20 14:36:18 +07:00
grossmj ff5ba3742e Update API documentation for appliance endpoints. Ref https://github.com/GNS3/gns3-gui/issues/2630 2018-11-20 13:04:27 +07:00
grossmj e5950674f8 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-11-20 00:22:35 +07:00
grossmj 5cb0957f35 Require privileged access for uBridge when using VMware VMs and Docker containers. Fixes #1461. 2018-11-20 00:22:16 +07:00
Jeremy Grossmann 7385d67c39 Merge pull request #1457 from GNS3/pyup-update-pytest-timeout-1.2.1-to-1.3.3
Update pytest-timeout to 1.3.3
2018-11-19 17:49:46 +07:00
Jeremy Grossmann e8cb8d29d8 Merge pull request #1454 from GNS3/pyup-update-pytest-3.8.1-to-4.0.0
Update pytest to 4.0.0
2018-11-19 17:49:10 +07:00
grossmj 3fae6ada95 Only require privileged access for uBridge when connecting a cloud to an Ethernet/TAP interface. Fixes #1461. 2018-11-19 17:33:17 +07:00
Jeremy Grossmann ca6a0708a8 Merge pull request #1462 from GNS3/use-files-as-disk-images
Allow virtual machines to use files in project directory as disk images.
2018-11-19 16:41:36 +07:00
grossmj 3727487730 Fix test on Windows. 2018-11-19 16:09:39 +07:00
grossmj 3497deaa31 Allow virtual machines to use files in project directory as disk images. 2018-11-19 15:53:43 +07:00
Jeremy Grossmann 3861d6a274 Merge pull request #1459 from GNS3/duplicate-appliance
Support to duplicate an appliance via API. Fixes https://github.com/GNS3/gns3-gui/issues/2618
2018-11-18 17:57:10 +07:00
grossmj bd657c0167 Support to duplicate an appliance. 2018-11-18 17:05:16 +07:00
grossmj 9b83b087cb Fix mac address schema validation for Qemu VM appliance. Fixes https://github.com/GNS3/gns3-gui/issues/2629 2018-11-18 16:20:50 +07:00
grossmj a33b8eac3a Support "L1 keepalives" in IOU appliance schema. 2018-11-18 16:04:08 +07:00
grossmj c7b8c347d7 Remove problematic test when run on Travis. 2018-11-18 00:08:40 +07:00
grossmj 53f3821d41 Change test that randomly fails on Travis. 2018-11-17 23:23:28 +07:00
grossmj 3512fde841 Fix small bugs when using the new appliance management API. 2018-11-17 22:16:18 +07:00
grossmj 74e1463015 Fix bug with custom adapters and categories for Docker VM. Fixes https://github.com/GNS3/gns3-gui/issues/2613 2018-11-17 21:50:00 +07:00
grossmj aa4593c993 Handle custom adapters in schemas. 2018-11-17 20:09:34 +07:00
Jeremy Grossmann 82140c082c Merge pull request #1458 from GNS3/appliance-default-settings
Apply default settings when adding an appliance via API. Fixes #1456
2018-11-17 19:39:34 +07:00
grossmj 499ab9844a Reorganize how appliance creation is validated against JSON schemas.
This allows for clearer error messages when validation fails.
2018-11-17 18:12:46 +07:00
grossmj 71fcf855b4 Add tests for all appliance types. 2018-11-17 15:37:20 +07:00
grossmj 627c7e9cfe Use schema to set appliance default values and better schema validation error messages. 2018-11-16 23:02:10 +07:00
pyup-bot f486f07a61 Update pytest-timeout from 1.2.1 to 1.3.3 2018-11-16 13:11:49 +01:00
Jeremy Grossmann 1acc7777f9 Merge pull request #1455 from GNS3/appliance-api
New appliance management API. Fixes #1427
2018-11-15 22:52:18 +07:00
grossmj 1184f29b90 Add appliance API tests. Ref #1427. 2018-11-15 21:34:36 +07:00
grossmj 9aafa4e62f Schema validation for appliance API. Ref #1427. 2018-11-15 17:28:17 +07:00
pyup-bot bb3edfe779 Update pytest from 3.8.1 to 4.0.0 2018-11-15 00:57:47 +01:00
grossmj 98f04365b7 Remove generic controller settings API endpoint. 2018-11-14 16:24:30 +08:00
grossmj cebb56387a Fix tests. 2018-11-13 15:40:18 +08:00
grossmj f91d3c9dbb Merge branch '2.2' into appliance-api 2018-11-13 14:59:55 +08:00
grossmj 089fdff4f1 Working dedicated appliance management API. Ref https://github.com/GNS3/gns3-server/issues/1427 2018-11-13 14:59:18 +08:00
grossmj e7b8309a80 Fix Docker VNC tests. Ref #1438 2018-11-11 23:25:23 +08:00
grossmj d45d52f15c Support Xtigervnc restart. 2018-11-11 23:23:30 +08:00
grossmj 029344da14 Only require Xtigervnc or Xvfb+x11vnc for Docker with vnc console. Ref #1438 2018-11-11 22:33:58 +08:00
grossmj 36474f7bab Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
2018-11-11 22:31:29 +08:00
grossmj d0bab9947e Support tigervnc in Docker VM. Ref #1438 2018-11-11 21:07:33 +08:00
grossmj f0fe9d39fa Base for dedicated appliance management API. Ref https://github.com/GNS3/gns3-server/issues/1427 2018-11-11 20:13:58 +08:00
grossmj 887b32c4bc Merge remote-tracking branch 'origin/2.2' into 2.2 2018-11-11 20:08:37 +08:00
grossmj f03ba5ca0b Update appliance templates. 2018-11-11 20:08:13 +08:00
pyup-bot 97758a09f4 Update sphinx from 1.7.1 to 1.8.2 2018-11-11 12:59:41 +01:00
ziajka 41fbbf7a56 Reorder routes in order to get working CORS 2018-11-08 11:47:09 +01:00
ziajka fcd102317a Merge pull request #1448 from GNS3/disable-cors-cache
Disable CORS cache, Fixes: #1445
2018-11-06 13:38:43 +01:00
ziajka 7bc67cb41f Merge pull request #1447 from GNS3/wrong-cors-response
Fix CORS response on node deletion, Fixes: #1446
2018-11-06 13:38:01 +01:00
ziajka 249b2255f6 Fix CORS response on node deletion, Fixes: #1446 2018-11-06 13:37:03 +01:00
ziajka 78c693ff63 Disable CORS cache, Fixes: #1445 2018-11-06 13:31:14 +01:00
Jeremy Grossmann b858664985 Merge pull request #1444 from alfredmyers/patch-1
Fixed typos on README.rst
2018-11-05 21:23:30 +07:00
Alfred Myers 78fe929e0c Fixed typos on README.rst 2018-11-05 09:59:29 -02:00
grossmj 2764828f38 Refactor how clients access PCAP capture files. Fixes https://github.com/GNS3/gns3-gui/issues/2438.
* The PCAP file is directly accessed if controller and client are on the same host.
* The PCAP file is streamed from the compute server to the client with the controller as a proxy when the controller is remote for the client.
2018-10-27 14:47:17 +07:00
ziajka bf1b801cc0 Remove static dir configuration 2018-10-24 09:04:05 +02:00
ziajka 4158edf8e2 Merge pull request #1435 from GNS3/fix-put-cors-for-nodes
FIX PUT CORS for nodes, Fixes: #1434
2018-10-23 12:41:14 +02:00
ziajka fa5571ced1 FIX PUT CORS for nodes, Fixes: #1434 2018-10-23 11:09:38 +02:00
grossmj df36d8377d Fix more tests. 2018-10-17 17:40:25 +07:00
grossmj ab8dc52ece Fix tests to work with new version of aiohttp (>= 3.0) 2018-10-17 17:32:10 +07:00
grossmj 9ae9209881 Update appliance templates. 2018-10-16 16:20:37 +07:00
grossmj 86f87aec74 Fix installation with Python 3.7. Fixes #1414.
Fix deprecated use of aiohttp.Timeout. Fixes #1296.
Use "async with" with aiohttp.ClientSession().
Make sure websocket connections are properly closed, see https://docs.aiohttp.org/en/stable/web_advanced.html#graceful-shutdown
Finish to drop Python 3.4.
2018-10-16 15:56:06 +07:00
grossmj 8217f65e97 Do not test with Python 3.4 on Travis. 2018-10-15 17:08:18 +07:00
grossmj de5934f818 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-10-15 17:06:25 +07:00
grossmj 76af98404a Drop Python 3.4 and switch to async / await syntax for asyncio. Fixes #1425 2018-10-15 17:05:49 +07:00
Jeremy Grossmann 93b6c0e49d Merge pull request #1421 from kazkansouh/2.2-update-docker-init-path
Support for using other dhcp clients in docker init.sh
2018-10-07 04:35:48 +02:00
Karim 14fb64b941 Added "/sbin" to init script PATH variable so that its possible to
use more sophosticated dhcp clients (compared to the udhcpc that is
provided by busybox) by installing them into the docker image in
the normal way.
2018-10-06 16:06:24 +01:00
grossmj 8baa480b79 Fix tests. 2018-10-06 21:57:03 +08:00
grossmj 97c68f56bf Notify users if x11vnc process has crashed. Fix #1401. 2018-10-06 21:30:39 +08:00
grossmj 22f7ca0243 Return compute port information via API. Ref #1420. 2018-10-05 12:48:20 +02:00
grossmj eb97ebf311 Fix platform.linux_distribution() is deprecated. Fixes https://github.com/GNS3/gns3-gui/issues/2578 2018-10-04 16:32:49 +02:00
grossmj de5a6ca8c7 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-10-04 15:44:29 +02:00
grossmj 9de13c570c Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/builtin/nodes/cloud.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/dynamips/nodes/ethernet_switch.py
#	gns3server/compute/iou/iou_vm.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/compute/virtualbox/virtualbox_vm.py
#	gns3server/compute/vmware/vmware_vm.py
#	gns3server/controller/__init__.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2018-10-04 15:44:13 +02:00
grossmj e4a6db8ebc Fix some typos. 2018-10-04 15:22:42 +02:00
grossmj 181a31be32 Update minimum VIX version requirements for VMware. Ref #1415. 2018-10-02 11:22:32 +02:00
grossmj 8d368cd0f6 Development on 2.1.12dev1 2018-09-28 20:50:03 +02:00
grossmj 41d4ecc4b7 Release v2.1.11 2018-09-28 20:47:44 +02:00
grossmj 4d95e0b51f Catch some exceptions. 2018-09-28 15:04:38 +02:00
Jeremy Grossmann 0b919aa8c9 Merge pull request #1411 from GNS3/pyup-update-pytest-3.4.2-to-3.8.1
Update pytest to 3.8.1
2018-09-27 22:23:49 +02:00
pyup-bot b10d79c37a Update pytest from 3.4.2 to 3.8.1 2018-09-27 21:59:19 +02:00
grossmj 4efdefaf5a Development on 2.1.11dev1 2018-09-15 11:23:18 +02:00
grossmj b6b345508b Release v2.1.10 2018-09-15 11:19:55 +02:00
grossmj 5d2e539193 Update appliances. 2018-09-14 22:18:13 +02:00
grossmj eb0e26b55f Include locale information and GNS3 VM version in crash reports. 2018-09-12 15:38:20 +02:00
grossmj 17d657c919 Fix small errors like unhandled exceptions etc. 2018-09-11 15:06:01 +02:00
grossmj 0aa9ab53d1 Import encodings.idna to avoid LookupError when standard library is in a zip file. 2018-09-07 09:34:17 +02:00
grossmj 4021a13651 Catch exceptions in various locations to fix small issues reported by Sentry. 2018-09-06 09:49:12 +02:00
grossmj 341e2e2e3a Check if serial pipe can be opened for VMware and VirtualBox VMs. 2018-09-06 07:02:32 +02:00
grossmj f8ecd61a98 Notify users if xvfb process or x11vnc process have crashed. Ref #1401. 2018-09-05 15:16:07 +08:00
grossmj c620d0be84 Improve the invalid port format detection. Fixes https://github.com/GNS3/gns3-gui/issues/2580 2018-09-05 13:35:42 +08:00
grossmj abfbadecd6 Update aiohttp verion requirement in order to support Python 3.7. Fixes https://github.com/GNS3/gns3-gui/issues/2566 2018-09-02 20:41:45 +07:00
grossmj 4a6202fa84 Update setup.py and fix minor issues. 2018-09-02 15:32:33 +07:00
grossmj f89d645b56 Update appliances. 2018-08-31 19:33:03 +07:00
grossmj 6822ff65a2 Disable static directory. Ref https://github.com/GNS3/gns3-gui/issues/2558. 2018-08-30 17:34:26 +07:00
grossmj ef4db112f1 Fix typo. 2018-08-29 17:27:24 +07:00
grossmj 86be4f98f1 Fix wrong call after merging. 2018-08-29 16:22:37 +07:00
grossmj 3c332b895d Fix tests after merging. 2018-08-29 16:08:08 +07:00
grossmj 33e8710495 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/controller/compute.py
#	gns3server/controller/gns3vm/__init__.py
#	gns3server/controller/link.py
#	gns3server/controller/project.py
#	gns3server/handlers/api/controller/project_handler.py
#	gns3server/handlers/api/controller/server_handler.py
#	gns3server/utils/asyncio/__init__.py
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	tests/compute/qemu/test_qemu_vm.py
2018-08-29 15:57:54 +07:00
grossmj 8e90d79399 Upgrade remote install script to use any ubuntu codename. Fixes #1393. 2018-08-28 17:41:06 +07:00
grossmj 78d0284247 Merge remote-tracking branch 'origin/master' 2018-08-28 17:27:18 +07:00
grossmj 57cb457b5d Use port 80 for key server. 2018-08-28 17:27:08 +07:00
grossmj b7dd8b5176 Catch asyncio.CancelledError when shutting down the server. 2018-08-28 17:10:24 +07:00
grossmj 00cf66fb0f Report GNS3 VM errors to the GUI server summary. Ref #1359. 2018-08-28 15:42:06 +07:00
grossmj 8d4e73d23c Replace vboxnet0 (if it does not exist) by the first available vboxnet interface on Windows. Fixes https://github.com/GNS3/gns3-vm/issues/102 2018-08-26 03:28:38 -07:00
grossmj 4e712280b3 Merge remote-tracking branch 'origin/2.1' into 2.1 2018-08-26 02:44:01 -07:00
grossmj 4d57a3befa Check if the VirtualBox host-only network exists when starting a GNS3 VM running on VirtualBox. Ref https://github.com/GNS3/gns3-vm/issues/102 2018-08-26 02:43:40 -07:00
grossmj 38b72079b2 Change file timestamps if necessary because ZIP does not support timestamps before 1980. Fixes #1360. 2018-08-25 18:10:40 +07:00
grossmj 814526ba26 Add missing coroutine decorator Ref https://github.com/GNS3/gns3-gui/issues/2566 2018-08-25 16:00:40 +07:00
grossmj f5dc635baa Fix test to support Python 3.7 Ref https://github.com/GNS3/gns3-gui/issues/2566 2018-08-25 15:50:08 +07:00
grossmj 902de3dd47 Refactor asyncio locking system for Python 3.7 support. Ref https://github.com/GNS3/gns3-gui/issues/2566 Ref https://github.com/GNS3/gns3-gui/issues/2568 2018-08-25 14:10:47 +07:00
grossmj ad9b6f42bf Test with Python 3.7 on Travis. 2018-08-24 18:59:10 +07:00
grossmj 3560cda06c Use asyncio.ensure_future() instead of asyncio.async() with conservative approach to support Python < 3.4.4. Fixes https://github.com/GNS3/gns3-gui/issues/2566 2018-08-24 18:57:18 +07:00
grossmj a3d1e865a8 Replace asyncio.async() by asyncio.ensure_future() in tests. Ref #2566. 2018-08-24 18:52:15 +07:00
grossmj 089d25c79d Forbid controller and compute servers to be different versions.
Report last compute server error to clients and display in the server summary.
2018-08-22 16:54:43 +07:00
grossmj 59ce105a50 Fix exception with short names for Dynamips interfaces. Fixes #1386. 2018-08-21 19:46:14 +07:00
grossmj aeb33024ca Add missing Qemu boot priority values. Fixes https://github.com/GNS3/gns3-server/issues/1385 2018-08-21 17:49:58 +07:00
grossmj 9ef23ce6a8 Include HTTP error code when reporting an error while download appliance templates
from GitHub repository.
2018-08-21 17:30:34 +07:00
grossmj b7f9b865c8 Optimize appliance templates update from GitHub repository by only downloading when the repository
has been updated. Ref https://github.com/GNS3/gns3-gui/issues/2490
2018-08-21 16:26:07 +07:00
grossmj 651d8280a7 Fix appliance template tests. 2018-08-19 19:35:45 +07:00
grossmj 5958a23557 Update appliance templates from online registry. Ref #2490. 2018-08-19 16:02:47 +07:00
grossmj a78ee18977 Update appliance templates. 2018-08-18 16:49:21 +07:00
grossmj 1e33e94c15 Add missing doc pages. 2018-08-16 21:50:54 +07:00
grossmj 8699f2e2b0 Update docs for controller_notifications and project_notifications. 2018-08-16 21:40:51 +07:00
grossmj 7f72b90b0e The server has now 2 notification streams
* A new one for controller related events (compute, appliance templates etc.)
* The existing one for project related events (links, nodes etc.)
2018-08-16 21:31:57 +07:00
grossmj dac3ba19b7 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/controller/ports/port_factory.py
2018-08-13 22:06:44 +07:00
ziajka c593785c6d Development on 2.1.10dev1 2018-08-13 13:50:43 +02:00
ziajka 689a82a180 Release v2.1.9 2018-08-13 13:13:46 +02:00
grossmj 23e83b730b Fix some more problems with interface short names. Fixes https://github.com/GNS3/gns3-gui/issues/2562 2018-08-13 15:45:24 +07:00
grossmj e5d38811ca Fix incorrect short port names in topology summary. Fixes https://github.com/GNS3/gns3-gui/issues/2562 2018-08-13 15:10:21 +07:00
grossmj daa2de4541 Allow custom symbols to be sub-directories. 2018-08-13 00:16:02 +07:00
grossmj 29620f4ea3 Add affinity symbols. Ref https://github.com/GNS3/gns3-gui/issues/2488 2018-08-12 22:08:48 +07:00
grossmj 1fd010484d ACPI shutdown for GNS3 VM running on Hyper-V. Ref https://github.com/GNS3/gns3-gui/issues/763 2018-08-12 17:11:32 +07:00
grossmj c48eebcc5d Hyper-V support for GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/763 2018-08-12 16:49:24 +07:00
grossmj c0521732a9 Get IP address from guest Hyper-V VM. Ref https://github.com/GNS3/gns3-gui/issues/763 2018-08-12 01:49:48 -07:00
Jeremy Grossmann 7a9625744c Merge pull request #1384 from BrentBaccala/pull-2
add appliance data for Cisco Nexus 9000v NX-OS 7.0(3)I7(3)
2018-08-11 12:55:19 +07:00
Brent Baccala 470133b096 add appliance data for Cisco Nexus 9000v NX-OS 7.0(3)I7(3) 2018-08-10 16:40:23 -04:00
grossmj c9767a06b3 Early Hyper-V support to run the GNS3 VM. Ref https://github.com/GNS3/gns3-gui/issues/763. 2018-08-10 16:18:14 +07:00
grossmj 652d5788c3 Fix tests. 2018-08-09 18:14:38 +07:00
grossmj 89f7169589 Add appliance UUID added to the node data. Fixes #1334. 2018-08-09 17:45:33 +07:00
grossmj a54359d243 Clean GNS3 close if one remote server is down. Fixes #1357. 2018-08-09 16:59:10 +07:00
grossmj e3c8c9d484 Mark VirtualBox support for running the GNS3 VM as deprecated. Ref #1377. 2018-08-08 15:02:31 +07:00
grossmj cc52a6a6b5 Change default z value for nodes to 1 2018-08-08 14:33:10 +07:00
grossmj 033f005bde Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/version.py
2018-08-07 21:06:42 +07:00
grossmj 12e71a2917 Set lower process priority when computing idle-pc value on Windows. Ref #2522. 2018-08-07 19:31:33 +07:00
grossmj 17e51fdac6 Merge remote-tracking branch 'origin/2.1' into 2.1 2018-07-26 13:35:57 -05:00
grossmj d0ed6931d8 Catch exception: ZIP does not support timestamps before 1980. Ref #1360. 2018-07-26 13:34:23 -05:00
ziajka c274be1135 Sync appliances 2018-07-13 12:42:43 +02:00
Jeremy Grossmann a494f8257b Merge pull request #1368 from sbraz/typing
Require typing only for Python < 3.5
2018-07-13 11:34:30 +08:00
Louis Sautier 2a1b9e7232 Require typing only for Python < 3.5 2018-07-12 23:43:27 +02:00
ziajka 1cc1ccd511 Re-enable static directory 2018-07-02 09:25:39 +02:00
ziajka ec8cfcd0f9 Disable static/ dir, Ref: #2532 2018-06-29 14:31:19 +02:00
ziajka dd845eb096 Fix tests on Windows 2018-06-28 09:16:51 +02:00
ziajka 41026c74c1 Use mocked dir for web-ui redirection test 2018-06-26 13:13:19 +02:00
ziajka 7d75b6248d Use mocked dir of web-ui for tests 2018-06-26 12:53:39 +02:00
ziajka 21780fa2ed Gitkeep for web-ui directory 2018-06-26 12:26:04 +02:00
ziajka aed1989cdf Merge pull request #1364 from GNS3/bundled-web-ui
Serve WebUI handlers and update-bundled-web-ui script
2018-06-26 12:10:11 +02:00
ziajka 0e1f2e26d0 Serve WebUI handlers and update-bundled-web-ui script, Ref: #1362 2018-06-26 12:09:08 +02:00
ziajka 6dc2ae8641 Clear script 2018-06-22 15:30:24 +02:00
ziajka 867e997b74 Support /static/ files serving, Ref: #1362 2018-06-22 15:29:47 +02:00
grossmj 96d5e351f7 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	requirements.txt
2018-06-10 21:19:55 +07:00
grossmj 1550c7bee7 Fix cloud tests. 2018-06-10 17:56:56 +07:00
grossmj 1f017a0d1d Console support for clouds (to connect to external devices or services). 2018-06-10 17:43:29 +07:00
grossmj 40151cd1fe Fix switching console type from telnet to VNC throws error. Fixes #2489. 2018-06-09 21:47:36 +07:00
grossmj 1905a99ce7 Fix saved VM state was not deleted correctly. 2018-06-09 17:28:26 +07:00
Jeremy Grossmann 70cbc0260b Merge pull request #1347 from AlyssonOliveira/fix_requirements.txt_to_hold_prompt-toolkit_1.0.15
Hold prompt-toolkit==1.0.15 to fix https://github.com/GNS3/gns3-serve…
2018-06-06 18:57:02 +07:00
Alysson Oliveira c3c298cd63 Hold prompt-toolkit==1.0.15 to fix https://github.com/GNS3/gns3-server/issues/1346 2018-06-06 08:37:50 -03:00
Jeremy Grossmann 7f27cb7015 Update requirements.txt 2018-06-06 01:34:05 +07:00
grossmj d1ccf3bc84 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	requirements.txt
2018-06-04 22:46:52 +07:00
grossmj 21a1800edc Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/export_project.py
#	gns3server/controller/import_project.py
#	gns3server/controller/project.py
#	gns3server/version.py
2018-04-28 19:41:12 +07:00
grossmj 2ea0aa5ded Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/iou/iou_vm.py
#	gns3server/compute/virtualbox/virtualbox_vm.py
#	gns3server/compute/vmware/vmware_vm.py
2018-04-18 17:08:42 +08:00
grossmj ee5317948b Fix tests. 2018-04-06 14:32:06 +07:00
grossmj 22a71b0e8c Fix problem with VM saved stated. 2018-04-06 13:19:54 +07:00
grossmj 7622c10cc9 Returns the ports' adapter types and mac addresses when available. 2018-04-06 13:19:17 +07:00
grossmj adc2f69d5d Fix tests. 2018-04-04 21:51:31 +07:00
grossmj 395277d5c5 Support for console auto start. 2018-04-04 21:31:35 +07:00
grossmj 1d7f67695a Bump version to 2.2.0dev2 2018-04-03 12:51:09 +07:00
grossmj 757c103c03 Possibility to customize port names and adapter types for Qemu, VirtualBox, VMware and Docker. Fixes #2361.
MAC addresses can customized for Qemu as well.
2018-04-02 22:27:12 +07:00
grossmj 509b171b06 Allow to have projects with the same name in different locations. 2018-03-30 23:01:37 +07:00
grossmj ea0009db6c Save state feature for VirtualBox and VMware. New "On close" setting to
select the action to execute when closing/stopping a Qemu/VirtualBox/VMware VM.
2018-03-30 21:18:44 +07:00
grossmj 3d1ee4da3f Support for suspend to disk / resume (Qemu). 2018-03-30 19:28:22 +07:00
grossmj 64949f5d04 Fix bug with 'none' console type for Ethernet switch.
Fix some tests related to traceng.
2018-03-30 13:00:52 +07:00
grossmj 669d2ec038 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/schemas/node.py
2018-03-30 12:14:09 +07:00
grossmj ff7911bd99 Allow to resize a Qemu VM disk (extend only). 2018-03-26 18:05:49 +07:00
grossmj 6cec67f79f Allow to select the default NAT interface in preferences for local server. 2018-03-26 14:23:01 +07:00
grossmj caa2bda71b Spice with agent support for Qemu VMs. 2018-03-25 14:36:14 +07:00
grossmj d419d3fa39 Check if the HAXM service is running when starting a Qemu VM with hardware acceleration. Ref #1242. 2018-03-24 22:15:20 +07:00
grossmj 5d704aa478 Fix tests. 2018-03-24 18:25:09 +07:00
grossmj e52775fa3a Support for console type "none". 2018-03-24 18:11:21 +07:00
grossmj 54661c50b2 Fix tests related to console type changes. 2018-03-23 21:29:39 +07:00
grossmj b6275deeef Fix tests. 2018-03-23 16:01:21 +07:00
grossmj b8353bc0d5 Support for none console type (Qemu & Docker only) 2018-03-23 15:44:16 +07:00
grossmj a40fdb3641 Fix bug and add optimizations when connecting and sending commands to QEMU monitor after starting a VM. Fixes #2336. 2018-03-23 00:07:32 +07:00
grossmj 135bbe8825 Check if HAXM support is installed on macOS. Ref #1242. 2018-03-22 22:37:09 +07:00
grossmj 9a9ac6d9f7 Fix some issues with hardware acceleration support for Qemu. 2018-03-22 15:45:41 +07:00
grossmj 17bfed52f2 Fix Qemu VM tests. 2018-03-22 14:05:31 +07:00
grossmj 44f2acffa5 Support Qemu with HAXM acceleration. Ref #1242. 2018-03-21 16:41:25 +07:00
grossmj 85dcb985eb Fix packet filters for Dynamips. 2018-03-20 11:15:42 +07:00
grossmj 279b4d7b20 Fix link filters/suspend tests. 2018-03-19 18:25:56 +07:00
grossmj 8b91894fa4 Improve suspend a link for Qemu and VirtualBox VMs.
A suspended link will be unplugged allowing the VMs to be notified
of the change.
2018-03-19 16:26:12 +07:00
grossmj cde30f8f53 Fix warning message. 2018-03-19 14:23:46 +07:00
grossmj c7875f93a3 Qemu VM support to detect when a link is plugged/unplugged. 2018-03-19 14:22:10 +07:00
grossmj b7e436efdf Fix tests. 2018-03-15 20:47:42 +07:00
grossmj aaf59e6050 Allow to configure the interface to be used by the NAT node. Fixes #1175. 2018-03-15 17:20:40 +07:00
grossmj 08493871a5 Restrict the list of available Ethernet/TAP adapters. Fixes #352. 2018-03-15 16:33:23 +07:00
grossmj fb3bcf3b8f Basic project stats. 2018-03-15 15:21:29 +07:00
grossmj 90ce6093d8 Some spring cleaning. 2018-03-15 14:17:39 +07:00
grossmj 88674455a3 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	tests/compute/docker/test_docker_vm.py
2018-03-14 18:40:37 +07:00
Jeremy Grossmann a13c237495 Merge pull request #1316 from BrentBaccala/master
Update Cisco ASAv appliance to include version 9.9.1
2018-03-14 13:25:22 +07:00
Brent Baccala 54a93a5ccb update Cisco ASAv appliance to include version 9.9.1 2018-03-14 01:20:09 -04:00
grossmj 658aa4bae9 Merge 2.1 into 2.2 branch 2018-03-12 13:38:50 +07:00
ziajka 2a5f3221b9 Merge pull request #1314 from GNS3/pyup-update-pytest-3.4.1-to-3.4.2
Update pytest to 3.4.2
2018-03-06 09:24:58 +01:00
pyup-bot 78ea230673 Update pytest from 3.4.1 to 3.4.2 2018-03-06 04:57:22 +01:00
ziajka 09c7d73ee9 Filter snapshots directory during the snapshot, Fixes: #1297 2018-02-28 16:33:20 +01:00
ziajka 835bc24b44 Merge pull request #1304 from GNS3/pyup-update-sphinx-1.6.6-to-1.7.1
Update sphinx to 1.7.1
2018-02-26 09:14:40 +01:00
pyup-bot 603442509a Update sphinx from 1.6.6 to 1.7.1 2018-02-23 19:59:09 +01:00
ziajka 89b352890c Merge pull request #1303 from GNS3/pyup-update-pytest-3.3.2-to-3.4.1
Update pytest to 3.4.1
2018-02-21 11:59:38 +01:00
ziajka 56b901a831 pytest.ini for ignoring files and recording DEBUG level in tests 2018-02-21 11:05:50 +01:00
ziajka 1b3065750d .pytest_cache into .gitignore 2018-02-21 10:27:01 +01:00
ziajka f1d8ee30cd pytest-catchlog merged into the core 2018-02-21 10:26:30 +01:00
pyup-bot 629c7be395 Update pytest from 3.3.2 to 3.4.1 2018-02-21 03:03:33 +01:00
ziajka c0ff37039d Merge pull request #1278 from GNS3/pyup-update-pytest-3.2.5-to-3.3.2
Update pytest to 3.3.2
2018-01-30 09:00:17 +01:00
ziajka 29b9b0431c Merge branch '2.2' into pyup-update-pytest-3.2.5-to-3.3.2 2018-01-30 09:00:08 +01:00
ziajka cf5b24e829 Merge pull request #1279 from GNS3/pyup-update-pep8-1.7.0-to-1.7.1
Update pep8 to 1.7.1
2018-01-30 08:59:06 +01:00
ziajka f9853a1cc3 Merge pull request #1280 from GNS3/pyup-update-pytest-timeout-1.2.0-to-1.2.1
Update pytest-timeout to 1.2.1
2018-01-30 08:58:47 +01:00
pyup-bot d14e3d084d Update pytest-timeout from 1.2.0 to 1.2.1 2018-01-30 08:58:07 +01:00
pyup-bot 53e36d1ed5 Update pep8 from 1.7.0 to 1.7.1 2018-01-30 08:58:03 +01:00
pyup-bot 403645d2f0 Update pytest from 3.2.5 to 3.3.2 2018-01-30 08:57:47 +01:00
ziajka 9921db2183 Merge branch '2.1' into 2.2 2018-01-30 08:53:23 +01:00
Jeremy Grossmann 62e03148c1 Merge pull request #1275 from GNS3/async-md5-calcs
Calculate MD5 on thread and before json response, Ref. gui#2239
2018-01-29 23:28:11 +07:00
ziajka bb26e8acdd Calculate MD5 on thread and before json response, Ref. gui#2239 2018-01-29 14:20:48 +01:00
ziajka 1582ac3195 Merge branch '2.2' into async-md5-calcs 2018-01-29 13:01:45 +01:00
ziajka 7fe6508e73 Merge pull request #1274 from GNS3/asyncio-ensure-future
Conservative approach to supported versions of Python 3.4 and asyncio…
2018-01-29 12:21:41 +01:00
ziajka eeae07e783 Conservative approach to supported versions of Python 3.4 and asyncio.ensure_future, Ref. #1269 2018-01-29 12:13:20 +01:00
ziajka dc377165f2 Cancellable md5sum calculation on thread, Ref. gui#2239 2018-01-29 10:18:13 +01:00
ziajka 6868e20a70 Compute md5sum on thread and don't block main server, Ref. gui#2239 2018-01-26 12:53:48 +01:00
ziajka 3c5ca9ce0e Merge pull request #1270 from GNS3/replace-async-with-ensure-future
Replace asyncio.async with ensure_future because of deprecation, Fixe…
2018-01-24 11:18:10 +01:00
ziajka d9a0ec9ff3 Replace asyncio.async with ensure_future because of deprecation, Fixes: #1269 2018-01-24 11:11:53 +01:00
ziajka 838d82a98b Merge branch '2.2' of github.com:GNS3/gns3-server into 2.2 2018-01-24 10:55:08 +01:00
ziajka 05983f2838 Fix test_open_auto_start test 2018-01-24 10:54:56 +01:00
ziajka c532e6392d Merge pull request #1257 from GNS3/pyup-update-sphinx-1.6.2-to-1.6.6
Update sphinx to 1.6.6
2018-01-24 10:15:07 +01:00
ziajka e05f93abd3 Merge pull request #1268 from GNS3/pyup-pin-prompt-toolkit-1.0.15
Pin prompt-toolkit to latest version 1.0.15
2018-01-24 10:14:57 +01:00
pyup-bot 647c1dbb05 Pin prompt-toolkit to latest version 1.0.15 2018-01-23 06:47:36 +01:00
grossmj 28f8216590 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	requirements.txt
2018-01-23 12:47:13 +07:00
grossmj e54ccc26b0 Bump to version 2.2.0dev1 & refresh resources/ui files. 2018-01-23 11:36:57 +07:00
pyup-bot 588339487f Update sphinx from 1.6.2 to 1.6.6 2018-01-08 14:10:17 +01:00
grossmj 6e2752648a Implement #1153 into 2.2 branch. 2017-11-27 15:16:46 +07:00
grossmj 09b1cac676 Merge remote-tracking branch 'origin/2.2' into 2.2
# Conflicts:
#	requirements.txt
2017-11-27 14:21:02 +07:00
ziajka e754db950d Merge pull request #1219 from GNS3/pyup-update-pytest-3.1.1-to-3.2.5
Update pytest to 3.2.5
2017-11-23 16:46:31 +01:00
ziajka 68d8fecc36 Merge pull request #1220 from GNS3/pyup-pin-prompt-toolkit-1.0.15
Pin prompt-toolkit to latest version 1.0.15
2017-11-23 16:39:57 +01:00
ziajka 5a6b0cc07b Keep at least this version 2017-11-23 16:39:15 +01:00
pyup-bot 0ce5b80a1d Pin prompt-toolkit to latest version 1.0.15 2017-11-15 13:20:52 +01:00
pyup-bot 49f1ef9693 Update pytest from 3.1.1 to 3.2.5 2017-11-15 13:17:57 +01:00
2443 changed files with 318804 additions and 68248 deletions

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# GNS3 Server Project Memory
> **Note**: This directory stores important project-related memories and case studies, managed with the code repository.
>
> **How to record**: Use the `/memory` skill to record important information to the project memory directory.
## Quick Reference
- **Memory directory**: `.claude/memory/`
- **Skill file**: `.claude/skills/memory/SKILL.md`
- **Main index**: `MEMORY.md` (this file)
## Topics
### Web Wireshark Integration
- **[JWT Token Flow](./web-wireshark-jwt-token-flow.md)** - JWT token transmission path in Web Wireshark
- Key point: UDPLink only passes through jwt_token, ultimately used by curl command inside Web Wireshark container to authenticate with GNS3 capture stream API
- **[Xpra HTML5 Client](./xpra-html5-client.md)** - Xpra HTML5 client menu control parameters for customizing the web interface
### RBAC & User Isolation
- **[RBAC User Isolation Design](./rbac-user-isolation-design.md)** — Three-step permission check design: ACE batch check → created_by filtering → resource pools
### Appliance Management
- **[GNS3 Appliance Loading](./gns3-appliance-loading.md)** - How GNS3 loads appliance files from builtin and custom directories with priority rules
### uBridge Permission
- **[uBridge Permission Issue](./gns3-ubridge-permission.md)** - Docker containers fail to start due to missing CAP_NET_ADMIN/CAP_NET_RAW capabilities on uBridge
- **[Docker iptables FORWARD blocks bridge](./docker-iptables-forward-bridge.md)** - Docker sets FORWARD chain to DROP, blocking kernel bridge forwarding; `sudo iptables -P FORWARD ACCEPT` to fix
### Docker Container Stop Delay
- **[Docker Container Stop Delay](./docker-container-stop-delay.md)** - Some containers take ~5s to stop because they don't handle SIGTERM (AlpiNet, OstinatoWireshark)
### Device Console / Copilot Known Bugs
- **[XRd Console --More-- Pager Bug](./xrd-console-more-pager-bug.md)** - FIXED: root cause was our own 80x24 initial PTY geometry for the docker_exec console (the XR pager reads PTY rows, not `terminal length`); initial geometry is now 511x10000. Copilot reconnect-before-retry + session_log still open; `--More--` auto-answer kept as fallback design
### MCP Service
- **[MCP Service Design](./mcp-service-design.md)** - MCP (Model Context Protocol) service architecture using FastMCP with SSE transport, JWT auth, 29 tools across 5 domains
- **[MCP Tool Description Location](./mcp-tool-description-guide.md)** - Where to define MCP tool descriptions: in `@mcp.tool()` functions in `__init__.py`, not in `*_TOOLS` arrays
### Python Code Verification
- **[Import Validation](./python-import-validation.md)** - Use actual module imports (`python -c "from ... import ..."`) instead of `py_compile` to catch missing imports
@@ -0,0 +1,41 @@
---
name: docker-container-stop-delay
description: Docker containers not responding to SIGTERM cause ~5s stop delays when closing a project
metadata:
type: reference
---
# Docker Container Stop Delay Analysis
## Background
When stopping a GNS3 project, some Docker containers take ~5s to exit while others stop instantly.
## Root Cause
Docker's `stop` command sends SIGTERM and waits `t` seconds (GNS3 sets `t=5`) before sending SIGKILL. Containers that don't handle SIGTERM are stuck waiting for the full timeout.
## Affected Containers
| Container | PID 1 | Why it's slow |
|-----------|-------|---------------|
| **AlpiNet** (alpine) | `dumb-init` → `bash -i` | Interactive bash ignores SIGTERM by design |
| **OstinatoWireshark** | `bash` (PID 1) | Linux kernel won't apply default signal actions to PID 1 without an explicit handler; interactive bash doesn't install one |
## Normal Containers (for comparison)
| Container | PID 1 | Why fast |
|-----------|-------|----------|
| Chromium | `/usr/bin/chromium` | Chromium handles SIGTERM natively |
| webterm | `dumb-init` → firefox | Firefox responds to SIGTERM immediately |
## Related Files
- `gns3-registry/docker/alpinet/Dockerfile`
- `gns3-registry/docker/ostinato-wireshark/Dockerfile`
- `gns3-registry/docker/ostinato-wireshark/entry.sh`
- `gns3-registry/docker/chromium/Dockerfile`
- `gns3-registry/docker/ipterm/web/Dockerfile`
- `gns3-server/gns3server/compute/docker/docker_vm.py:1040` — stop timeout parameter `t=5`
## Note
This is not a GNS3 server bug (except a minor `or` vs `and` logic issue at `docker_vm.py:1037` which doesn't affect behavior). The root cause is in the Docker images themselves.
See also: [[docker-container-stop-delay]]
@@ -0,0 +1,38 @@
---
name: docker-iptables-forward-bridge
description: Docker iptables FORWARD DROP blocks kernel bridge forwarding, fix and symptoms
metadata:
type: reference
---
Docker sets the iptables `FORWARD` chain default policy to `DROP` when the
Docker daemon starts. This blocks **all** forwarded traffic through Linux
kernel bridges on the host — including `gns3br{N}` bridges created by the
builtin Ethernet Switch (ubridge `brctl`).
## Symptoms
- Nodes connected to the switch can send frames into the bridge (visible in
`tcpdump -i gns3br{N}`) but never receive forwarded unicast frames.
- `bridge fdb show` may fail to learn MAC addresses (frames dropped before
the bridge learning path).
- ARP and multicast/broadcast may appear to work because they flood, but
unicast replies never reach the destination.
- OSPF Hello / CDP visible on both sides but ICMP echo reply never returns.
- `ubridge bridge get_stats` shows symmetric IN/OUT counts (relay is fine),
`bridge fdb show` shows learned MACs, `bridge link show` shows `state forwarding`
on all ports — yet unicast still doesn't work.
## Fix
Run once per host boot, or make persistent via iptables-persistent / firewall config:
```bash
sudo iptables -P FORWARD ACCEPT
```
## Related
- [[ethernet-switch-ubridge-brctl-migration]] — the kernel bridge that hits this
- [[gns3-server-linux-only]] — datapath constraint
- [[gns3-ubridge-permission]] — another host-level prerequisite (CAP_NET_ADMIN)
+20
View File
@@ -0,0 +1,20 @@
---
name: gns3-appliance-loading
description: GNS3 appliance file loading mechanism and storage locations
metadata:
type: reference
---
GNS3 loads appliance (.gns3a) files from two locations with specific priority order:
1. **Builtin appliances directory**: `~/.local/share/GNS3/appliances/`
- Stores automatically downloaded devices from GNS3 registry
- Maintained and updated by the system automatically
2. **Custom appliances directory**: `~/GNS3/appliances/`
- Stores user-customized or modified appliance files
- Manually managed by users
**Loading priority**: System loads builtin appliances first, then custom appliances. If both directories contain devices with the same `device_id`, the custom appliance overwrites the builtin one. This design allows users to customize devices without having their modifications overwritten by automatic registry updates.
**Implementation**: See `gns3server/controller/appliance_manager.py` in the `load_appliances()` method (lines 314-351).
+25
View File
@@ -0,0 +1,25 @@
# GNS3 uBridge Permission Issue
## Problem
Docker container node fails to start with error: `uBridge requires root access or the capability to interact with network adapters`
## Root Cause
- uBridge needs to create TAP network interfaces to connect Docker containers to GNS3 virtual network
- This requires `CAP_NET_ADMIN` and `CAP_NET_RAW` capabilities
- Other node types (like QEMU) may have their own network implementation and don't need uBridge
## Solution
```bash
sudo setcap cap_net_admin,cap_net_raw=eip /usr/bin/ubridge
```
## Code Locations
- uBridge path check: `gns3server/compute/base_manager.py:298` (`has_privileged_access`)
- Permission check call: `gns3server/compute/base_node.py:851`
- Error message definition: `gns3server/compute/base_node.py:852`
## Error Propagation Flow
Error is propagated via `NodeError` exception:
1. `NodeError` is caught at `gns3server/api/routes/compute/__init__.py:131-137`
2. Returns HTTP 409 with JSON: `{"message": "...", "exception": "NodeError"}`
3. Frontend should read error info from `message` field
+88
View File
@@ -0,0 +1,88 @@
---
name: mcp-service-design
description: MCP (Model Context Protocol) service architecture and tool design for GNS3 server
metadata:
type: project
---
# MCP (Model Context Protocol) Service Design
## Background
Provide a standard MCP interface for GNS3 Server, allowing AI assistants (Claude Code, Claude Desktop) to interact with GNS3 network simulations through the Model Context Protocol.
## Decision/Implementation
### Transport
- **SSE (Server-Sent Events)** with JWT token authentication
- Endpoint: `/v3/mcp/transport/sse`
- Message endpoint: `/v3/mcp/transport/messages/`
### Authentication
- JWT token obtained via `/v3/access/users/authenticate`
- Two ways to pass token:
- `Authorization: Bearer <jwt>` header (Claude Code via `-H`)
- `?token=<jwt>` query param (Claude Desktop, EventSource limitation)
- Token validated using GNS3's existing `auth_service`
- Token stored in `contextvars.ContextVar` for per-session isolation
- Python ≥ 3.9 `asyncio.to_thread` propagates contextvars to threads
### Architecture
```
Claude Code / Desktop → SSE → Auth Wrapper → FastMCP Server → Tool Handler → Gns3Connector → GNS3 REST API
```
### Tool Organization
Tools are separated by domain into individual files under `gns3server/api/routes/mcp/`:
| File | Domain | Tool Count |
|------|--------|:----------:|
| `projects.py` | Project CRUD, open/close/stats | 7 |
| `nodes.py` | Node CRUD, start/stop/reload/suspend, console WS | 10 |
| `links.py` | Link CRUD | 5 |
| `templates.py` | Template CRUD | 5 |
| `computes.py` | Compute list/get/images | 3 |
**Total: 30 tools**
### Handler Pattern
- Synchronous functions receiving `(params: dict, gns3_ctx: dict)`
- Run via `asyncio.to_thread()` to avoid blocking the event loop
- `gns3_ctx` contains `server_url` and `jwt_token`
- `Gns3Connector` is created per-handler from `gns3_client.connector` (per-handler instantiation keeps each tool call isolated)
### Token Lifetime
- Default: 1440 minutes (24 hours)
- Configurable via `jwt_access_token_expire_minutes` in `gns3_server.conf`
## Rationale
- **Why not Direct Controller calls**: MCP layer calls GNS3's own REST API through Gns3Connector, keeping full decoupling and supporting future multi-user/multi-instance scenarios
- **Why not Streamable HTTP**: Claude Code supports SSE natively via `--transport sse` with custom headers; Streamable HTTP session manager lifecycle conflicts with FastAPI mount
- **Why not stdio**: stdio is local-only; SSE supports both local and remote deployments
## Related Files
- `gns3server/agent/mcp/__init__.py` — FastMCP server, `@mcp.tool()` decorators, auth wrapper (`_resolve_token` exchanges API keys for JWTs)
- `gns3server/agent/mcp/*.py` — tool handlers for projects/templates/computes/snapshots/drawings/symbols/appliances/images
- `gns3server/agent/gns3_copilot/gns3_client/api_handlers.py` — shared node/link handler layer (single implementation, consumed by both MCP tools and copilot `tools_v2`; tests must patch `_get_connector` HERE, not in mcp modules)
- `gns3server/agent/gns3_copilot/gns3_client/connector.py` — Gns3Connector (JWT auth + http_call only; the old `custom_gns3fy.py` Node/Link/Project wrappers were removed)
- `gns3server/agent/gns3_copilot/gns3_client/project_inventory.py` — nodes/links aggregation feeding the topology context and Nornir inventory
## Configuration
### Claude Code
```bash
claude mcp add --transport sse My_GNS3_Server \
http://host:3080/v3/mcp/transport/sse \
-H "Authorization: Bearer <jwt>"
```
### Claude Desktop
```json
{
"mcpServers": {
"My_GNS3_Server": {
"url": "http://host:3080/v3/mcp/transport/sse?token=<jwt>"
}
}
}
```
@@ -0,0 +1,43 @@
---
name: mcp-tool-description-location
description: Where to define MCP tool descriptions so AI can see them
metadata:
type: reference
---
# MCP Tool Description Location
## Key Point
MCP tool descriptions are defined in `@mcp.tool()` decorator functions in `__init__.py`, NOT in the `*_TOOLS` arrays in individual module files.
## Correct Location
**File**: `gns3server/api/routes/mcp/__init__.py`
**Example**:
```python
@mcp.tool()
async def update_link(
project_id: Annotated[str, Field(description="UUID of the project")],
link_id: Annotated[str, Field(description="UUID of the link to update")],
**kwargs: Any,
) -> list[dict[str, Any]]:
"""Update a link's properties.
Put detailed descriptions here, especially for complex parameters.
Include format requirements, ranges, and examples.
"""
# implementation
```
## Wrong Location
- ❌ `LINK_TOOLS` in `gns3server/api/routes/mcp/links.py`
- ❌ `TEMPLATE_TOOLS` in `gns3server/api/routes/mcp/templates.py`
## Activation
**Must restart GNS3 server** for description updates to take effect.
## Description Requirements
- Be explicit about data formats (arrays vs single values)
- Include parameter ranges and constraints
- Provide usage examples
- Prevent common errors in the description itself
@@ -0,0 +1,30 @@
# Python Import Validation
## Background
When checking if modified Python code is correct, `py_compile` only validates syntax (e.g., balanced parentheses, valid keywords). It does **not** catch missing imports or other runtime errors (e.g., using `UUID()` without importing `UUID`).
## Decision/Implementation
Use actual module imports to verify code correctness:
```bash
# ✅ This catches missing imports and runtime errors
venv/bin/python -c "
from gns3server.api.routes.controller.dependencies.authentication import get_user_from_token
from gns3server.api.routes.mcp.__init__ import _resolve_token
print('All imports OK')
"
# ❌ This only checks syntax, not references
venv/bin/python -c "import py_compile; py_compile.compile('file.py', doraise=True)"
```
## Related Files
`gns3server/api/routes/controller/dependencies/authentication.py` — missed `from uuid import UUID`
`gns3server/api/routes/mcp/__init__.py` — missed `from uuid import UUID`
## Why
A `NameError` at runtime is far more expensive than a failed import check. Real import testing catches the full dependency chain.
@@ -0,0 +1,231 @@
---
name: rbac-user-isolation-design
description: GNS3 RBAC user isolation design and implementation thought process
metadata:
type: project
---
## RBAC User Isolation Design Summary
### Core Problem
GNS3 3.0 has a complete RBAC framework (ACE + Role + Privilege), but lacks user isolation implementation, causing users to see resources they shouldn't have access to.
### Design Conflict
Traditional RBAC's **path permission model** fundamentally conflicts with **user data isolation**:
- **Path permission model**: Controls which paths users can access (e.g., `/projects`)
- **User data isolation**: Controls which specific resources users can access (e.g., alice's project vs bob's project)
### Final Implementation Approach
#### Three-Step Permission Check Logic
```python
# Step 1: Batch ACE + resource pool check (3 DB queries regardless of project count)
direct_ace_ids, pool_accessible_ids = await rbac_repo.get_accessible_project_ids(
current_user.user_id, "Project.Audit", all_project_ids
)
# Step 2: Filter direct ACE projects by created_by (user's own projects)
# Direct project sharing is only available through resource pools
for p in controller.projects.values():
if p.id in direct_ace_ids and p.created_by == current_user.username:
projects.append(p.asdict())
# Step 3: Resource pool projects (no created_by filter)
for p in controller.projects.values():
if p.id in pool_accessible_ids:
projects.append(p.asdict())
```
##### Super Admin Bypass
```python
if current_user.is_superadmin:
return [p.asdict() for p in controller.projects.values()]
```
Super admins skip all three steps and see every project.
##### seen_project_ids Deduplication
A simple `seen_project_ids` set prevents the same project from appearing twice when it exists in both direct ACE and pool results. This is a lightweight dedup, not the complex blocking mechanism from earlier rejected designs.
### Key Design Decisions
#### 1. ACE vs created_by Relationship
- **ACE for basic access control**: Whether user can access the system
- **created_by for user isolation**: Which specific resources user can access
- **Step 2 filtering is critical**: Even with broad ACE, created_by filtering ensures user isolation
#### 2. Project Sharing Mechanism
- **Project sharing only through resource pools**: Cannot configure ACE directly for specific projects
- **Avoids complexity of direct ACE sharing**: Prevents permission configuration chaos
#### 3. Broad ACE Fault Tolerance
```
Even with configuration: ACE: Users group + User role + "/" + propagate: True
Result: Users still only see projects they created
Reason: Step 2 created_by filtering removes other users' projects
```
### RbacRepository.get_accessible_project_ids()
The core batch-check method in `gns3server/db/repositories/rbac.py` uses 3 DB queries:
1. **User ACEs**: Direct ACE entries matching user + privilege
2. **Group ACEs**: Group-level ACE entries via `UserGroup` membership
3. **All resources with pool memberships**: Preloads all resources and their pool relationships
Then it computes two sets:
- **`direct_ace_ids`**: Project paths matching user or group ACEs (path-based check)
- **`pool_accessible_ids`**: Projects in pools the user/group can access (pool-based check)
Pool IDs are precomputed into a `pool_id -> set(project_ids)` map for O(1) lookup.
### Problems Solved
#### Problem 1: Missing User Isolation
- **Issue**: All users can see all projects
- **Solution**: Filter by created_by to implement user isolation
#### Problem 2: Broad ACE Breaking Isolation
- **Issue**: `path: "/" + propagate: true` breaks user isolation
- **Solution**: Step 2 created_by filtering ensures user isolation even with broad ACE
#### Problem 3: Permission Check Order Conflicts
- **Issue**: seen mechanism blocks subsequent checks (from earlier design phases)
- **Solution**: Simple pipeline-style filtering with lightweight dedup set
### Technical Details
#### API Layer Permission Check
```python
@router.get("/projects") # Note: no has_privilege decorator
async def get_projects(current_user=..., rbac_repo=...):
# Permission checks in business logic
```
#### Duplicate Prevention
- Simple `seen_project_ids` set for deduplication between direct ACE and pool results
- Not the complex blocking mechanism from earlier phases
#### Performance Considerations
- Super admin path: O(1) — returns all projects directly
- Regular user path: 3 fixed DB queries regardless of project count
- Path-based ACE check: O(n * m) in worst case, where n = projects, m = ACE entries
- Pool lookup: O(1) via precomputed pool->project map
### Use Cases
#### Scenario 1: Personal Use
```
alice creates project → alice only sees alice's projects ✅
bob creates project → bob only sees bob's projects ✅
No extra configuration needed, automatic user isolation
```
#### Scenario 2: Team Collaboration
```
Admin creates resource pool → adds projects → team members can access
alice creates project → alice still sees her own projects ✅
Team sharing + user isolation coexist
```
#### Scenario 3: Broad ACE Configuration
```
ACE: Users group + "/" + propagate: True
alice still only sees alice's projects ✅
User isolation unaffected by ACE configuration
```
### Design Principles
#### 1. Separation of Concerns
- **Basic access permission**: Controlled by ACE
- **Data ownership**: Controlled by created_by
- **Team sharing**: Controlled by resource pools
#### 2. Defensive Design
- User isolation remains effective even with improper ACE configuration
- Secure by default: users only see their own resources
#### 3. Simplicity
- Avoid complex seen mechanisms and mutual exclusion logic
- Clear pipeline-style check order
### Relationship with Original ACE System
#### Preserved Components
- ✅ ACE framework (permission check mechanism)
- ✅ Role and privilege definitions
- ✅ Resource pool functionality
#### Improved Components
- ✅ Added user isolation (created_by filtering)
- ✅ Clarified project sharing mechanism (only through resource pools)
- ✅ Simplified permission check logic
#### Removed Components
- ❌ Removed `/projects` path privilege check on `get_projects` route
- ❌ Removed the old complex `seen_project_ids` blocking mechanism
- ❌ Avoided "can see all non-pool projects" privilege leak
### Implementation Details
- **Main modification**: `gns3server/api/routes/controller/projects.py`
- **Function**: `get_projects()`
- **Batch check method**: `gns3server/db/repositories/rbac.py::RbacRepository.get_accessible_project_ids()`
- **Privilege dependency**: `gns3server/api/routes/controller/dependencies/rbac.py::has_privilege()`
- **Branch**: `feature/simple-user-isolation`
- **Base branch**: `master`
### Key Commits
1. Implemented basic created_by filtering
2. Implemented three-layer permission check (with logic issues)
3. Fixed to correct three-step check logic
### Design Evolution Process
#### Phase 1: Simple created_by Filtering
```python
user_projects = [p for p in all_projects() if p.created_by == user.username]
```
**Issue**: Didn't integrate with ACE system
#### Phase 2: Three-Layer Check (Wrong Version)
```python
# Used complex seen_project_ids blocking mechanism
# Issue: Broad ACE breaks user isolation
```
#### Phase 3: Three-Step Check (Correct Version)
```python
# Step 1: Batch ACE check via get_accessible_project_ids()
# Step 2: Filter direct_ace_ids by created_by
# Step 3: Resource pool projects (no created_by filter)
```
**Solution**: User isolation works even with broad ACE
### Relationship with RBAC Roadmap
This implementation addresses items mentioned in the roadmap:
- **Phase 1 (MVP)**: Basic project isolation implementation
- **Auto-ACE on create**: Still needs to be implemented separately
- **Template isolation**: Can use same design pattern
### Unsolved Issues
1. **Auto-ACE on project creation**: Part of roadmap Phase 1 — `create_project()` sets `created_by` but doesn't create ACE entries
2. **Template and image isolation**: Can apply same design pattern
3. **Default ACE configuration**: Need reasonable default permissions for Users group
### Design Limitations
1. **Project sharing only through resource pools**: No direct ACE configuration for sharing
2. **ACE configuration required**: Users need basic ACE to access system
3. **Performance considerations**: ACE check queries database for each project path
### Future Improvement Directions
1. **Auto-create ACE**: Automatically add ACE for creator when creating projects
2. **Default ACE strategy**: Configure reasonable default permissions for Users group
3. **Performance optimization**: Cache ACE check results to reduce database queries
This design achieves effective user isolation while maintaining RBAC system integrity, and solves the problem of broad ACE configurations breaking isolation.
**Key insight**: The Step 2 created_by filtering is the critical innovation that allows ACE and user isolation to coexist properly.
@@ -0,0 +1,53 @@
# Web Wireshark JWT Token Flow
## Background
Question: What is the purpose of `jwt_token` parameter in UDPLink and how is it transmitted?
## JWT Token Complete Flow
1. **User initiates request** → HTTP request with `Authorization: Bearer <jwt_token>`
2. **API layer extracts token** → `gns3server/api/routes/controller/links.py`:
```python
auth_header = http_request.headers.get("Authorization", "")
jwt_token = auth_header.replace("Bearer ", "") if auth_header else None
```
3. **Pass to Link layer** → `Link.start_capture(wireshark=True, jwt_token=xxx)`
4. **UDPLink forwards** → `UDPLink.start_capture()` calls `super().start_capture(jwt_token=jwt_token)`
5. **Start Web Wireshark container** → `Link._start_web_wireshark(jwt_token)` calls management script
6. **Container uses token** → `manage_wireshark.py` executes inside container:
```bash
curl -N -H 'Authorization: Bearer {jwt_token}' \
'http://controller:3080/v3/projects/{project_id}/links/{link_id}/capture/stream' | \
wireshark -i - -k -display :{display}
```
## Why More Verbose Than gns3-copilot?
**gns3-copilot approach**:
- All code within the same process
- Uses `contextvars` to store and retrieve token
- Downstream code directly calls `get_current_jwt_token()`, no need to pass through layers
**Web Wireshark approach**:
- Token needs to be passed across processes (management script is separate process)
- Token needs to be passed across containers (Docker container isolation)
- Cannot use `contextvars`, must pass through command line arguments
## Conclusion
UDPLink does not use this token, it only forwards it to the parent class. Ultimately used by the curl command inside the Web Wireshark container to authenticate with the GNS3 controller's capture stream API.
Token flow: **Client → GNS3 API → Link → UDPLink → Web Wireshark container → GNS3 capture stream API**
## Related Files
- `gns3server/api/routes/controller/links.py:114-115` - JWT token extraction
- `gns3server/controller/link.py:321-360` - Web Wireshark startup logic
- `gns3server/controller/udp_link.py:178` - UDPLink start_capture signature
- `gns3server/agent/web_wireshark/manage_wireshark.py:527-529` - Container curl command with JWT
+148
View File
@@ -0,0 +1,148 @@
# Xpra HTML5 Client Configuration
## Overview
Web Wireshark integration uses xpra's built-in HTML5 client to provide browser-based packet capture viewing. The xpra HTML5 client is located at `/usr/share/xpra/www` in the container.
## Configuration Methods
### 1. URL Parameters (Per-Session)
Control toolbar menu items via URL query parameters (default: true):
| Parameter | Menu Item | Description |
|-----------|-----------|-------------|
| xpramenu | Xpra Menu | Main menu (Server, Information submenus) |
| open_windows | Open Windows | List of open windows |
| fullscreen_button | Fullscreen | Fullscreen toggle button |
| keyboard_button | Keyboard | Keyboard layout/shortcuts |
| clipboard_button | Clipboard Copy | Clipboard copy functionality |
| sound_button | Audio | Audio toggle |
| cursor_lock_button | Lock Cursor | Game cursor lock mode |
```bash
# Examples
?fullscreen_button=false&sound_button=false
?xpramenu=false&keyboard_button=false&clipboard_button=false&sound_button=false&cursor_lock_button=false
```
### 2. default-settings.txt (Recommended - Global/Persistent)
Modify `html5/default-settings.txt` (INI format) for all users.
**Features:**
| Parameter | Default | Description |
|-----------|---------|-------------|
| keyboard | auto-detect | Enable keyboard input |
| keyboard_layout | us | Keyboard layout |
| clipboard | yes | Clipboard sharing |
| printing | yes | Printer forwarding |
| file_transfer | yes | File transfer |
| swap_keys | MacOS yes | Swap Command/Control keys |
| scroll_reverse_x | no | Reverse mouse X-axis |
| floating_menu | yes | Show floating menu |
| toolbar_position | top-left | Toolbar position |
| autohide | no | Auto-hide toolbar |
| sound | yes | Audio forwarding |
| video | 64-bit yes | Video decoding |
**Connection Options:**
| Parameter | Description |
|-----------|-------------|
| server | Server address |
| port | Port number |
| username | Username |
| password | Password |
| ssl | Enable SSL |
| encryption | Encryption type (AES-CBC/CTR/CFB) |
| key | AES encryption key |
| sharing | Allow session sharing |
| steal | Steal session |
| reconnect | Auto-reconnect |
| bandwidth_limit | Bandwidth limit (bits/s) |
| override_width | Client desktop width |
**Advanced Options:**
| Parameter | Default | Description |
|-----------|---------|-------------|
| audio_codec | auto-detect | Audio codec |
| encoding | auto | Image encoding (png/jpeg/webp/etc) |
| remote_logging | yes | Send logs to server |
| action | connect | Connection mode (start/shadow) |
| submit | yes | Show diagnostics on disconnect |
### 3. default_settings in Code
Set directly in `<script>` tag in index.html:
```javascript
const default_settings = {};
default_settings["xpramenu"] = false;
```
### Priority Order
URL parameter > default_settings object > default-settings.txt > code default value
## Server-Controlled Submenu Items
The **Server submenu** items are controlled by server hello message:
| Menu Item ID | Content | Control Source |
|--------------|---------|----------------|
| clock_menu_entry | Clock | server-time in hello |
| upload_menu_entry | Upload file | file-transfer or file.enabled |
| download_menu_entry | Download file | file-transfer or file.enabled |
| shutdown_menu_entry | Shutdown Server | client-shutdown in hello |
**Information submenu** (About Xpra, Session Info, Bug Report) and fixed items (Reload, Disconnect) are always displayed.
To hide "Shutdown Server", set environment variable before starting xpra:
```bash
export XPRA_CLIENT_CAN_SHUTDOWN=false
xpra start :{display} ...
```
Code: `xpra/server/base.py:40` - `CLIENT_CAN_SHUTDOWN = envbool("XPRA_CLIENT_CAN_SHUTDOWN", True)`
## Customizing Background Image
Background image is defined in `html5/css/client.css`:
```css
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #021d3a;
background-image: url(../background.jpg);
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
```
### Methods
1. **Replace image file**: Create/replace `html5/background.jpg`
2. **Modify CSS**: Change `html5/css/client.css` line 9:
```css
background-image: url(../your-image.jpg);
```
### Notes
- Supported formats: jpg, png, svg, etc.
- Recommended resolution: 1920x1080 or higher
- `background-size: cover` auto-stretches to fill
### Temporary Modification (via URL)
Cannot modify background via URL directly, but can use browser DevTools:
```css
body { background-image: url(your-image-url); }
```
## Related Files
- Container Dockerfile: `gns3server/agent/web_wireshark/docker/Dockerfile`
- Container HTML5 client path: `/usr/share/xpra/www`
@@ -0,0 +1,72 @@
# XRd Console --More-- Pager Bug (PTY window size paging vs terminal length 0)
## Background
Copilot commands with long output consistently failed against XRd (IOS XRv 9000 container) nodes: `device_show_run` running `show ipv4 interface brief` always reported `netmiko_multiline (failed)` (even as a single command); short-output commands like `show ipv4 interface <iface>` worked fine.
Failure sequence (from the 2026-08-18 logs):
1. First failure: `ReadTimeout: Pattern not detected: 'RP/0/RP0/CPU0:ios\#'` — the command echo matched, but the prompt never appeared within 60s
2. The copilot's single-retry reused the same netmiko session (nornir caches it on the host object) with half-consumed output in the buffer → the second failure died earlier in `command_echo_read` — a follow-on effect of the dirty session, not an independent fault
## Root Cause (fully traced)
The XRd node uses the `docker_exec` console type (`gns3server/compute/docker/vendor_docker_vm.py`, `_LazyExecTelnetServer`): a telnet TCP server whose backend is a `docker exec` PTY. Three facts combine:
1. The XR pager (at least for table-engine/TABLAST-style commands) pages on the **PTY window size (TIOCGWINSZ)**, not the CLI-level `terminal length` — `show terminal` happily reports `Length: 0 lines` while output still pages
2. `_LazyExecTelnetServer.client_connected_hook` explicitly resized the exec PTY to **80×24** "before NAWS" (`await self._on_naws(80, 24)`) — the 24 rows were **our own initial geometry, not a Docker default**. Live test: `show ipv4 interface brief` paged after exactly 24 lines
3. netmiko's telnetlib never negotiates **NAWS**, so the initial geometry is never corrected for copilot/bare-telnet clients. Real NAWS clients resize to their own geometry via the existing `_on_naws` → `POST /exec/{id}/resize` wiring
### Dead ends (do not retry)
- `show ipv4 interface brief | no-more` → `% Invalid input detected`. `| no-more` is a **Junos** pipe modifier; IOS-XR does not have it
- `terminal length 0`: takes effect at the CLI layer, but this pager ignores it
- The XR CLI has no command to change PTY rows
### Related fact: paramiko vs docker_exec
paramiko (SSH) cannot connect to a `docker_exec` console — the client-side endpoint is a plain telnet server (`AsyncioTelnetServer`); only `console_type: ssh` (standard attach path, `AsyncioSSHServer`) speaks SSH. The copilot correctly uses netmiko `*_telnet` drivers (netmiko's vendored `_telnetlib`, stdlib-free on Python 3.13).
## Decision/Implementation
### Fix (implemented 2026-08-18, branch `feat/docker-exec-default-pty-geometry`)
Change the initial exec geometry in `vendor_docker_vm.py` `client_connected_hook` from 80×24 to **511×10000** (`await self._on_naws(511, 10000)`):
- Tall/wide default so CLIs that page on PTY rows never hit `--More--` for clients that never send NAWS (netmiko, bare telnet)
- Width 511 matches netmiko's `terminal width 511` convention
- Real NAWS clients still resize to their actual geometry right after connecting (existing `_on_naws` path unchanged)
- Test: `test_first_connect_sets_tall_default_pty_geometry` in `tests/compute/docker/test_vendor_docker_vm.py`
### Fallback design (NOT implemented — keep if the pager ever resurfaces on another console type)
Channel-level loop answering `--More--` in the copilot display tool for `cisco_xr*`: prompt regex breaks; **tail-anchored** `re.search(r"--More--\s*$", buf)` with a ~150ms quiet double-confirmation before `write_channel(" ")`. Never put `--More--` into netmiko's `expect_string` — expect `re.search`es accumulated output, so content containing "More" would false-trigger.
### Still-open copilot improvements (agreed, not yet implemented)
1. Reconnect before retry: `_run_all_device_configs_with_single_retry` (display tool) and the config tool's retry should `task.host.close_connection("netmiko")` first — retrying on a dirty session is doomed
2. `session_log_file` in hosts_data netmiko extras — the copilot has no session_log anywhere, which made this bug a guessing game
## Rationale
Resizing the PTY at exec creation attacks the root (geometry is fixed before the CLI outputs anything); it covers every consumer of the docker_exec console (copilot, MCP, bare telnet) with a one-line change, while the `--More--` auto-answer design remains as a generic fallback for consoles without a resize path.
## Related Files
- `gns3server/compute/docker/vendor_docker_vm.py` — `_LazyExecTelnetServer`: `_on_naws` (exec resize), `_create_exec` (Tty=True, TERM=xterm), `client_connected_hook` (initial geometry — the fix)
- `gns3server/compute/docker/docker_vm.py:1074-1087` — standard console path: NAWS → `containers/{cid}/resize`
- `gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py:284-341` — dirty-session retry (open item)
- `gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py` — hosts_data (session_log extras insertion point)
## Examples
Live console transcript (2026-08-17):
```
RP/0/RP0/CPU0:ios#show terminal
Length: 0 lines, Width: 511 columns <- CLI-layer setting in effect
RP/0/RP0/CPU0:ios#show ipv4 interface brief
(exactly 24 lines: timestamp + blank + header + 21 interface rows)
--More-- <- the 80x24 initial exec geometry was paging
```
@@ -0,0 +1,73 @@
---
name: gns3-api-test-writing
description: Use this skill when writing pytest tests for gns3-server API routes — the conftest fixture model, auth token variants, config isolation, and the shared-client order-dependency trap.
version: 1.0.0
---
# Writing pytest API Route Tests
## Test Environment
- Run tests with the repo venv: `venv/bin/python -m pytest tests/api/routes/controller/test_xxx.py` (there is no system python/pytest).
- The app runs in-process (httpx `ASGIWebSocketTransport`); the database is in-memory sqlite; superadmin `admin` is seeded when the users table is created.
- `pytestmark = pytest.mark.asyncio`. Tests run on function-scoped event loops while class-scoped fixtures bind to the class loop — this works, but don't move class fixtures to function scope casually.
## The Fixture Model (tests/conftest.py)
Class-scoped: `app`, `db_session`, `base_client` (**one** shared httpx `AsyncClient`), `test_user` (idempotent `user1` in the "Users" group).
`client` (admin), `authorized_client` (user1), `unauthorized_client`, `compute_client` are class-scoped wrappers that each **rewrite the shared `base_client.headers` at instantiation time**. They are instantiated lazily — by the first test that requests them.
### The order-dependency trap
- `unauthorized_client` is a passthrough: it sets no header and only behaves as "unauthorized" if nothing set a token on `base_client` before it.
- Mixing auth variants in one test class makes the default `Authorization` header depend on fixture instantiation order → tests pass alone but fail in a class run (or the reverse).
- Symptom signature: a 401/403 assertion receives 200. That is fixture pollution, **not** an RBAC/auth bug in the product.
### Rule: per-request headers for auth variants
Never rely on the client's default header for 401/403/specific-user tests. Send the token explicitly (request-level headers override client defaults — the `test_users.py` idiom):
```python
from gns3server.services import auth_service
from gns3server.services.authentication import DEFAULT_JWT_SECRET_KEY
token = auth_service.create_access_token(test_user.username, secret_key=DEFAULT_JWT_SECRET_KEY)
response = await client.get(url, headers={"Authorization": f"Bearer {token}"}) # specific user
response = await client.get(url, headers={"Authorization": "Bearer invalid_token"}) # 401
```
Note the import: `auth_service` lives in `gns3server.services`, NOT `gns3server.services.authentication` (which only exports `DEFAULT_JWT_SECRET_KEY` and the class).
Always pass `secret_key=DEFAULT_JWT_SECRET_KEY`: the autouse `run_around_tests` resets `Config` per test and forces the default secret, so a token minted with the config-of-the-moment dies in the next test.
## Config-Isolated Tests
- Request the function-scoped `config` fixture whenever the test reads/writes configuration or the endpoint under test reloads it. It points `Config` at `tmpdir/server.conf` (accessible as `config._main_config_file`).
- Any endpoint that triggers a config reload re-reads `<secrets_dir>/gns3_jwt_secret_key`, which invalidates class-scoped bearer tokens. Fix: write `DEFAULT_JWT_SECRET_KEY` to that file first — see the `stable_jwt_secret` fixture in `tests/api/routes/controller/test_settings.py`.
## Misc Gotchas
- Build URLs with `app.url_path_for("route_function_name")`. Router introspection is unreliable (lazy `_IncludedRouter` wrapper) — check `GET /openapi.json` instead.
- pydantic v2: an empty `SecretStr('')` serializes as `""`, **not** the mask — assert `in ("", SECRET_MASK)` for secrets that may be unset in tests.
- New privileges are seeded only at table creation (`gns3server/db/models/privileges.py`); the fresh in-memory test DB always has them, but existing deployments need manual grants.
- Error mapping: `ControllerBadRequestError` → 400, `ControllerError`/`HTTPException(409)` → 409, request schema violations → 422.
## Failure-Diagnosis Heuristic
**Passes in isolation, fails in a class run → suspect shared fixture state first** (`base_client.headers`, the `Config` singleton, class-scoped DB rows) — never the product code. Reproduce with `-k "test_a or test_b"` pairs to find the polluting test. Do not add debug prints to product code to chase test-order issues; make the test order-independent with explicit per-request headers instead.
## Order Independence
The suite runs in collection order by default, and a full run is green — but that hides order dependencies. Two real incident classes so far:
1. **The frozen from-import** (fixed 2026-09): `run_around_tests` monkeypatches `gns3server.utils.path.get_default_project_directory` with a lambda. A product module first-imported *while that patch is active* (e.g. `from gns3server.api.server import app` written inside a test body) freezes the patched lambda into its namespace forever — later tests then get a deleted tmpdir path (`FileNotFoundError` from `psutil.disk_usage`). The patched lambda now resolves `Config.instance()` at call time, so freezing is benign — keep it that way.
2. **Sequential-scenario DB tests**: `tests/api/routes/controller/test_users.py`, `test_roles.py`, `test_pools.py`, `test_templates.py`, `test_images.py`, `test_groups.py`, `test_appliances.py`, `test_acl.py` and `tests/controller/test_rbac.py` build shared rows across tests within a file (a test asserts on users/roles created by earlier tests). They are known-red under any reordering — do not copy this pattern into new files.
### Rules for new tests
- **Import product modules at test-module top level**, never first-import inside a test body (an autouse fixture's monkeypatches are live there, and module import executes product `from`-imports).
- **Autouse patch replacements must resolve state at call time** (`Config.instance().settings...`), never close over test-local values (tmppaths, fixture objects) — a closed-over value survives into other tests if the replacement object gets frozen anywhere.
- **Verify a new test file is order-independent**: `venv/bin/python -m pytest tests/<new_file>.py --random-order --random-order-seed=1 -q` (and a second seed). It must pass shuffled. `pytest-random-order` is pinned in `dev-requirements.txt`; it is inert unless `--random-order` is passed.
- A test that needs specific rows creates them itself (or via a fixture) — never relies on rows another test in the file created.
- Diagnosing a suspected order bug: rerun the exact failing pair with the seed printed by `--random-order` (`--random-order-seed=<n>` reproduces it), then bisect to the polluting test.
+172
View File
@@ -0,0 +1,172 @@
---
name: gns3-api-testing
description: Use this skill when testing GNS3 server REST API endpoints with curl — covers JWT auth, common patterns, and marker/link examples.
version: 1.0.0
---
# GNS3 Server API Testing with curl
## Core Principle
Fixed routine for testing the GNS3 server API: **get a JWT token first, then send `Authorization: Bearer <token>` with every request.**
Default address `http://127.0.0.1:3080`, API prefix `/v3`.
---
## Authentication (always first)
```bash
TOKEN=$(curl -s -X POST http://127.0.0.1:3080/v3/access/users/authenticate \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
```
Persist to a file for reuse (avoids re-logging in each time):
```bash
echo "$TOKEN" > /tmp/gns3_token.txt
TOKEN=$(cat /tmp/gns3_token.txt)
```
Then attach to every request:
```bash
AUTH="Authorization: Bearer $TOKEN"
curl -s -H "$AUTH" http://127.0.0.1:3080/v3/...
```
> **Endpoint note**: login is `/v3/access/users/authenticate`, **not** `/v3/auth/login`.
> OpenAPI spec is at `/openapi.json` (not `/v3/openapi.json`).
---
## Common Variables
```bash
BASE="http://127.0.0.1:3080/v3"
PID=<project_id>
LID=<link_id>
NID=<node_id>
AUTH="Authorization: Bearer $TOKEN"
```
---
## Generic Request Patterns
### GET (query)
```bash
curl -s -H "$AUTH" $BASE/projects/$PID/links | python3 -m json.tool
```
### POST (create) — with JSON body
```bash
curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"foo","bpf":"icmp"}' \
$BASE/projects/$PID/links/$LID/markers
```
### HTTP status code only (body not needed)
```bash
curl -s -o /dev/null -w "HTTP %{http_code}\n" -X DELETE -H "$AUTH" \
$BASE/projects/$PID/links/$LID/markers/global-icmp
```
### Extract a field from the response
```bash
LID=$(curl -s -H "$AUTH" -X POST ... | python3 -c "import sys,json; print(json.load(sys.stdin)['link_id'])")
```
---
## Status Code Reference
| Code | Meaning |
|---|---|
| 200 | GET/PUT succeeded |
| 201 | POST created |
| 204 | DELETE succeeded (no body) |
| 401 | Not authenticated (token missing/expired) |
| 404 | Resource not found |
| 409 | Conflict (e.g. per-link edit of an inherited marker) |
| 422 | Schema validation failed (e.g. marker name starting with `global`) |
---
## Marker Cheat Sheet
### Project-level global marker definitions (inheritance)
```bash
# Create a def → fans out to every link automatically
curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"icmp","bpf":"icmp","tag":1,"color":"#ff5722"}' \
$BASE/projects/$PID/marker-definitions
# List all defs + the link_ids each is bound to
curl -s -H "$AUTH" $BASE/projects/$PID/marker-definitions
# Update a def → syncs to every link
curl -s -X PUT -H "$AUTH" -H "Content-Type: application/json" \
-d '{"bpf":"icmp","tag":99}' \
$BASE/projects/$PID/marker-definitions/icmp
# Delete a def → removes the inherited marker from every link
curl -s -X DELETE -H "$AUTH" $BASE/projects/$PID/marker-definitions/icmp
```
### Per-link markers
```bash
# List markers on a link
curl -s -H "$AUTH" $BASE/projects/$PID/links/$LID/markers
# Create a private marker (name cannot start with "global")
curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"bpf":"tcp port 80"}' \
$BASE/projects/$PID/links/$LID/markers
# Delete (inherited markers return 409)
curl -s -X DELETE -H "$AUTH" $BASE/projects/$PID/links/$LID/markers/<name>
```
### Project-level aggregation query
```bash
curl -s -H "$AUTH" $BASE/projects/$PID/markers # all markers across links, flattened
```
---
## Link / Node Cheat Sheet
```bash
# List all links in a project (includes the markers field)
curl -s -H "$AUTH" $BASE/projects/$PID/links
# List nodes (check ports[].link_id to find free ports)
curl -s -H "$AUTH" $BASE/projects/$PID/nodes
# Create a VPCS
curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"t1","node_type":"vpcs","compute_id":"local"}' \
$BASE/projects/$PID/nodes
# Start a node
curl -s -o /dev/null -X POST -H "$AUTH" $BASE/projects/$PID/nodes/$NID/start
# Create a link (both ends: node + adapter/port)
curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d "{\"nodes\":[{\"node_id\":\"$N1\",\"adapter_number\":0,\"port_number\":0},{\"node_id\":\"$N2\",\"adapter_number\":0,\"port_number\":0}]}" \
$BASE/projects/$PID/links
```
> **Port occupancy**: VPCS has only one interface (port 0); once linked it cannot connect again.
> Confirm `ports[].link_id` is empty before creating a link; `"Port is already used"` means the port is taken.
---
## Gotchas
- **`POST /links` response may show `markers: []`** — the create response is serialized before the inheritance hook runs.
The inherited marker is actually applied; check `GET /links/{lid}/markers` or refresh `GET /links` to see it.
- **Restart gns3server after code changes** — the Python process does not hot-reload.
- **Wrap JSON bodies in single quotes** in the shell (double quotes inside); to interpolate a shell variable use `\"$VAR\"`.
- **Pipe long output through `python3 -m json.tool`** to pretty-print; extract fields with `python3 -c "import sys,json; ..."`.
@@ -0,0 +1,74 @@
---
name: documentation
description: Use this skill when creating or updating technical documentation under docs/ directory for GNS3 server
version: 3.1.0
---
# GNS3 Server Technical Documentation Standard
## Core Principle
Documentation answers: **What is this, how does it work at a high level.**
Code details are left to the codebase — readers can use AI to find implementation specifics.
---
## Document Structure
```markdown
# Feature Name
## Overview
[What it does, in 2-3 sentences]
## Architecture
[Mermaid diagram: components and their relationships]
## Business Process
[Mermaid sequence/flowchart: key flows]
## API Endpoints
[Table: Method | Path | Description | Privilege]
## Notes
[Known limitations, performance data, security — only when relevant]
```
---
## What to Include
- Mermaid diagrams for architecture and flow (GitHub renders natively) — see Mermaid Diagram Rules below
- `graph` for component relationships
- `sequenceDiagram` for request/response flows
- `flowchart` for data processing steps
- API endpoint tables
- Request/response JSON examples (for interfaces)
- Performance data (only measured numbers, no estimates)
## Mermaid Diagram Rules
Draw only the diagram kinds the story needs — each kind answers exactly one reader question, in reading order:
- **Anatomy — "what exists, and who owns it?"** — `flowchart LR` with the fewest nodes that show ownership: one subgraph per ownership boundary (a process, a namespace, userspace vs kernel), anything shared between owners a bare node inside the enclosing boundary. The steady-state path is bidirectional solid (`<-->`) edges labeled with the carrying technology, never with a direction; each observer/configurator gets one dashed sideband edge per role.
- **Comparison — "how does X differ from Y?"** — the mirror of its counterpart diagram: same scenario, same node ids, same concrete names, one variable changed. Draw one direction with unidirectional `-->` and state in prose that the reverse is the mirror image.
- **Control sequence — "how is it built / torn down?"** — `sequenceDiagram` spanning every layer (API → coordinator → per-node handlers → the managed process): local steps are self-messages, concurrent fan-out is a `par / and / end` block, each message to the bottom layer is one real command in real order, and a closing `Note` names the steady state.
- **Walkthrough — "how does one item traverse it?"** — `flowchart LR` as a linear pipeline: one subgraph per stage, titled with that stage's role in this trace (`X — ingress`), sideband dashed edges (reverse-direction role, observation point) anchored at the stage they belong to.
Whatever the kind:
- **One step per node, one short line per label.** If a label needs `<br/>` lines to explain itself, split the node into smaller steps instead of packing text — needing many words means the flow needs further decomposition.
- **Details belong to prose.** Parentheticals, exceptions, and parameter lists go to the surrounding text or the section that owns the topic; a diagram never duplicates what prose already says.
- **Define jargon before the first diagram.** A Term | Meaning table placed above the diagrams covers the domain terms they use (interface names, kernel mechanisms), so readers don't have to scan forward.
- **Edge style is semantics.** Solid arrows carry the main flow (data plane); dashed `-.->` edges are sideband relationships (taps, control installs). A node with multiple sideband roles gets one dashed edge per role, each labeled with a single function — and edge *direction* matters too: a config edge points from the configurere to its target, an observation edge from the target to the observer.
- **Decision points are diamonds with labeled outcomes**, not text-packed rectangles spelling out every branch inside one node.
- **A comparison diagram changes exactly one variable.** When two diagrams contrast approaches (kernel vs relay, old vs new), everything else — scenario, topology, node names — stays identical between them; a difference that isn't the point belongs in a prose aside, not in the picture.
- **Numbered crossings stay consistent.** When kernel/user or process-boundary copies are the point of a diagram, number the crossing edges (`copy N: user→kernel`) and keep one numbering scheme across every diagram in the document.
- **Concrete names instantiate stated rules.** Every interface/bridge/instance name appearing in a diagram instantiates a deterministic naming rule stated in prose before the first diagram — never invent ad-hoc names.
## What to Skip
- Code snippets — let readers search the codebase
- Verbose prose — use diagrams and tables
- Implementation details — link file paths instead of pasting code
+98
View File
@@ -0,0 +1,98 @@
---
name: memory
description: This skill should be used when the user asks to "record memory", "save to memory", "remember this", "create a memory", "add to memory", or discusses documenting technical decisions, architectural choices, or important case studies for the project. Use this skill to record project knowledge to the .claude/memory/ directory.
version: 1.0.0
---
# Memory Skill
## Overview
Record project-related technical decisions, important case studies, and lessons learned to the project memory directory, ensuring critical knowledge is managed with the code repository.
## When This Skill Activates
Activate this skill when user requests involve:
- "Record to memory", "save to memory", "add to memory"
- "Remember this", "create a memory"
- Documenting technical decisions, architectural choices
- Recording problem solutions and lessons learned
- Discussing API design, performance optimization, security implementations
## Memory Location
Project memory is stored in: `.claude/memory/`
## Memory Structure
```
.claude/
├── memory/
│ ├── MEMORY.md # Main index file
│ └── <topic>.md # Detailed records for specific topics
└── skills/
└── memory/
└── SKILL.md # This file
```
## What to Record
### ✅ Should Record
- Important architectural decisions and rationale
- Solutions to complex problems
- Key considerations for API design
- Performance optimization experiences
- Security-related implementation details
- Integration approaches with other systems
- Common errors and solutions
- Design changes based on user feedback
### ❌ Should Not Record
- Temporary debugging information
- Session-specific state
- Obvious code implementation details (code is documentation)
- Content already documented elsewhere
## Memory Template
```markdown
# <Topic Title>
## Background
<Why this record exists>
## Decision/Implementation
<What was done or how it was implemented>
## Rationale
<Why this approach was chosen, what alternatives were considered>
## Related Files
<Code files involved, use file_path:line_number format>
## Examples
<If there are code examples or other examples>
```
## Recording Process
1. **Identify content to record**
2. **Determine topic title** (concise, descriptive)
3. **Create record using template**
4. **Update MEMORY.md index**
5. **Save to .claude/memory/<topic>.md**
## Examples
- `web-wireshark-jwt-token-flow.md` - JWT token flow in Web Wireshark integration
- `docker-api-version-detection.md` - Docker API version dynamic detection implementation
## Best Practices
- Use clear, descriptive filenames
- Include references to related code files (with line numbers)
- Document "why" not just "what"
- Keep records updated, remove outdated ones
- Link to related memory files
+7
View File
@@ -1,2 +1,9 @@
[run]
source = gns3server
branch = True
[report]
fail_under = 55
[paths]
source = gns3server
+57
View File
@@ -0,0 +1,57 @@
# Version control
.git
.gitignore
.gitattributes
# CI / GitHub / Docker
.github
.whitesource
.dockerignore
# Editor / IDE
.idea
.vscode
.settings
.project
.pydevproject
.mr.developer.cfg
# Claude
.claude
# Python build artifacts
__pycache__
*.py[cod]
*.so
*.egg
*.egg-info
build/
dist/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg
lib/
lib64/
.ropeproject
# Test & coverage
tests/
pytest.ini
.coveragerc
.coverage
.coverage*
.tox
.cache
.pytest_cache
nosetests.xml
# Virtualenv
env/
venv/
.venv/
# Editor backup files
*~
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# Pre-commit checks mirroring the CI checks that are fast enough to run on
# every commit (justfile "lint" + "type-check"; pytest and pip check are not
# run here). Only staged Python files are checked.
#
# Install with: just install-hooks
set -euo pipefail
# Prefer the repo virtualenv, fall back to whatever python is on PATH
PYTHON="venv/bin/python"
if [ ! -x "$PYTHON" ]; then
PYTHON="python"
fi
if ! command -v "$PYTHON" >/dev/null 2>&1; then
echo "pre-commit: no python interpreter found, skipping checks" >&2
exit 0
fi
# Staged .py files (deletions excluded)
mapfile -t staged < <(git diff --cached --name-only --diff-filter=d -- '*.py')
if [ ${#staged[@]} -eq 0 ]; then
exit 0
fi
status=0
echo "pre-commit: ruff check"
"$PYTHON" -m ruff check --exit-non-zero-on-fix "${staged[@]}" || status=1
echo "pre-commit: ruff format --check"
"$PYTHON" -m ruff format --check --diff "${staged[@]}" || status=1
# mypy is configured with files = ["gns3server"] in pyproject.toml, i.e. CI
# never type-checks tests: only pass staged files from that package.
mypy_targets=()
for f in "${staged[@]}"; do
case "$f" in
gns3server/*) mypy_targets+=("$f") ;;
esac
done
if [ ${#mypy_targets[@]} -gt 0 ]; then
echo "pre-commit: mypy"
"$PYTHON" -m mypy "${mypy_targets[@]}" || status=1
fi
if [ "$status" -ne 0 ]; then
echo ""
echo "pre-commit: checks failed. Fix the issues above (try 'just format')," >&2
echo "or bypass with: git commit --no-verify" >&2
fi
exit "$status"
+40
View File
@@ -0,0 +1,40 @@
name: Bug report
description: Report a bug so we can fix it.
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear description of the bug.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: How can we reproduce this? Numbered steps if possible.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What did you expect to happen instead?
- type: input
id: version
attributes:
label: Version / commit
description: Which version or commit hash are you on?
- type: textarea
id: environment
attributes:
label: Environment
description: OS, runtime version, anything else that might be relevant.
- type: textarea
id: logs
attributes:
label: Relevant logs
description: Paste any relevant log output. This is automatically rendered as code.
render: shell
@@ -0,0 +1,16 @@
name: Add new issues to GNS3 project
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v2
with:
project-url: https://github.com/orgs/GNS3/projects/3
github-token: ${{ secrets.ADD_NEW_ISSUES_TO_PROJECT }}
+93
View File
@@ -0,0 +1,93 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '21 12 * * 4'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
+68
View File
@@ -0,0 +1,68 @@
name: Build and Push Docker Image
on:
workflow_dispatch:
push:
tags:
- v2.*
- v3.*
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKERHUB_ORG: ${{ vars.DOCKERHUB_ORG || 'gns3' }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Check for stable release
id: ver
run: |
TAG="${GITHUB_REF_NAME#v}"
echo "tag=$TAG" >> $GITHUB_OUTPUT
if echo "$TAG" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "stable=true" >> $GITHUB_OUTPUT
else
echo "stable=false" >> $GITHUB_OUTPUT
fi
- name: Set lowercase image name vars
if: steps.ver.outputs.stable == 'true'
id: names
run: |
echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
echo "repo=$(echo '${{ github.event.repository.name }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
if: steps.ver.outputs.stable == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: steps.ver.outputs.stable == 'true'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: steps.ver.outputs.stable == 'true'
uses: docker/login-action@v4
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: steps.ver.outputs.stable == 'true'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.DOCKERHUB_ORG }}/${{ github.event.repository.name }}:${{ steps.ver.outputs.tag }}
${{ env.DOCKERHUB_ORG }}/${{ github.event.repository.name }}:latest
ghcr.io/${{ steps.names.outputs.owner }}/${{ steps.names.outputs.repo }}:${{ steps.ver.outputs.tag }}
ghcr.io/${{ steps.names.outputs.owner }}/${{ steps.names.outputs.repo }}:latest
@@ -0,0 +1,40 @@
name: publish-api-documentation
on:
workflow_dispatch:
push:
tags:
- v3.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: "gh-pages"
- uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Merge changes from 3.1 branch
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git merge origin/3.1 -X theirs
- name: Install GNS3 server and dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Generate the API documentation
run: |
cd scripts
python3 publish_api_documentation.py
- name: Publish the API documentation
run: |
git add docs
git status
git commit -m "Publish API documentation"
git push
+44
View File
@@ -0,0 +1,44 @@
name: testing
on:
push:
branches:
- master
- 3.1
pull_request:
branches:
- master
- 3.1
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[ai-features,dev]
- name: Install sharkd (marker replay engine)
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: wireshark-common
version: linux-amd64
- name: Run all checks
run: |
just test
+35 -2
View File
@@ -1,9 +1,16 @@
*.py[cod]
__pycache__
.pytest_cache
#py.test
.cache
# environment file
.env
# hypothesis files
.hypothesis
# C extensions
*.so
@@ -18,8 +25,8 @@ var
sdist
develop-eggs
.installed.cfg
lib
lib64
/lib
/lib64
# Installer logs
pip-log.txt
@@ -30,6 +37,10 @@ pip-log.txt
.tox
.cache
nosetests.xml
coverage.xml
htmlcov/
.mypy_cache/
.ruff_cache/
# Translations
*.mo
@@ -57,4 +68,26 @@ startup.vpcs
# Virtualenv
env
venv
*venv
.ropeproject
# Claude Code settings (may contain API keys)
.claude/settings*.json
.claude/minmax-settings.json
.claude/zhipu-settings.json
.claude/settings.local.json
.claude/deepseek-settings.json
.claude/claude-settings.json
.claude/gemini-settings.json
.claude/grok-settings.json
!.claude/development.md # Exception: allow development docs
!.claude/skills/ # Exception: allow project skills
!.claude/memory/ # Exception: allow project memory
# PROJECT_CONTEXT.md # Commented out: allow tracking project context
# Tiktoken cache files
gns3server/agent/gns3_copilot/cache/tiktoken/
gns3.log
/configs/
-2
View File
@@ -1,2 +0,0 @@
branch:
2.2
-32
View File
@@ -1,32 +0,0 @@
sudo: required
services:
- docker
install:
- sed -e 's/${PYTHON_VERSION}/'${PYTHON_VERSION}/g DockerfileTests.tpl > /tmp/DockerfileTests
- docker-compose build
script:
- docker-compose run tests
before_deploy:
- sudo pip install twine
- sudo pip install urllib3[secure]
deploy:
provider: pypi
edge:
branch: v1.8.45
user: noplay
password:
secure: Fa66zp8ML4oSGwzkUMZi07MIYfO3tbS5gHFUaLN2mk2MBknhCjDYexmFJqT//sC/+xqv6sSJE6rz1EPoy/THbxj8R96ZgIyiUZIbDCbzgdy92d7J/eusrDoNdpApBLke8NqQqtFETb3addMZZNofQ3IDANFD2m2jY+KECU8z8NI=
on:
tags: true
repo: GNS3/gns3-server
env:
matrix:
- PYTHON_VERSION=3.4
- PYTHON_VERSION=3.5
- PYTHON_VERSION=3.6
+45
View File
@@ -0,0 +1,45 @@
{
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken": "",
"baseBranches": []
},
"scanSettingsSAST": {
"enableScan": false,
"scanPullRequests": false,
"incrementalScan": true,
"baseBranches": [],
"snippetSize": 10
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"checkRunSettingsSAST": {
"checkRunConclusionLevel": "failure",
"severityThreshold": "high"
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
},
"issueSettingsSAST": {
"minSeverityLevel": "high",
"issueType": "repo"
},
"remediateSettings": {
"workflowRules": {
"enabled": true
}
},
"imageSettings":{
"imageTracing":{
"enableImageTracingPR": false,
"addRepositoryCoordinate": false,
"addDockerfilePath": false,
"addMendIdentifier": false
}
}
}
-2
View File
@@ -1,2 +0,0 @@
Jeremy Grossmann
Julien Duponchelle
+2157 -2
View File
File diff suppressed because it is too large. Load diff
+28 -27
View File
@@ -1,36 +1,37 @@
# Dockerfile for GNS3 server development
FROM ubuntu:noble
FROM ubuntu:16.04
WORKDIR /gns3server
ENV DEBIAN_FRONTEND noninteractive
# Set the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:gns3/ppa
RUN apt-get update && apt-get install -y \
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
locales \
locales-all
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
COPY ./requirements.txt /gns3server/requirements.txt
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
locales \
software-properties-common \
python3-pip \
python3-dev \
qemu-system-x86 \
qemu-system-arm \
python3-all \
python3-setuptools \
python3-dev \
busybox-static \
gcc \
qemu-kvm \
libvirt-bin \
x11vnc
libvirt-daemon-system
RUN locale-gen en_US.UTF-8
RUN add-apt-repository ppa:gns3/ppa && apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
vpcs \
ubridge \
dynamips
# Install uninstall to install dependencies
RUN apt-get install -y vpcs ubridge
COPY . /gns3server
ADD . /server
WORKDIR /server
RUN mkdir -p ~/.config/GNS3/3.1/
RUN cp scripts/gns3_server.conf ~/.config/GNS3/3.1/
RUN pip3 install -r /server/requirements.txt
EXPOSE 3080
CMD python3 -m gns3server --local
RUN python3 -m pip install --break-system-packages --ignore-installed .
-15
View File
@@ -1,15 +0,0 @@
FROM python:${PYTHON_VERSION}
RUN pip install -U setuptools pip
ADD requirements.txt /server/requirements.txt
ADD dev-requirements.txt /server/dev-requirements.txt
RUN pip install -r/server/dev-requirements.txt
RUN useradd -ms /bin/bash gns3
USER gns3
ADD . /server
WORKDIR /server
+3 -7
View File
@@ -1,11 +1,7 @@
include README.rst
include AUTHORS
include README.md
include LICENSE
include MANIFEST.in
include tox.ini
include requirements.txt
recursive-include tests *
recursive-exclude docs *
include CHANGELOG
recursive-include gns3server *
recursive-exclude docs *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
+374
View File
@@ -0,0 +1,374 @@
# GNS3 Server - Project Context for Claude Code
> This document provides project context information for the Claude Code AI assistant to work more efficiently.
---
## Project Overview
**Project Name**: GNS3 Server
**Description**: Network simulation server supporting the GNS3 network virtualization platform
**Primary Language**: Python
**Current Branch**: `feature/ai-copilot-bridge`
**Main Branch**: `master`
---
## Project Structure
```
gns3server/
├── agent/ # AI Copilot related modules
│ └── gns3_copilot/ # GNS3-Copilot AI Assistant
│ ├── agent/ # LangGraph Agent implementation
│ ├── tools_v2/ # Tool collection (device config, display commands, etc.)
│ ├── utils/ # Utility functions and helper modules
│ ├── gns3_client/ # GNS3 API client
│ ├── prompts/ # AI prompt templates
│ ├── agent_service.py # Agent service layer
│ └── project_agent_manager.py # Project Agent manager
│
├── api/ # API routes
│ └── routes/controller/ # Controller API
│ └── chat.py # AI Chat API endpoint
│
├── controller/ # Core controller
│ ├── project.py # Project management
│ └── ...
│
├── schemas/ # Pydantic data models
│ └── controller/
│ └── chat.py # Chat API Schema
│
├── db/ # Database module
│ └── tasks.py # Database tasks
│
└── docs/ # Documentation
└── gns3-copilot/ # AI Copilot documentation
```
---
## Key Module Descriptions
### 1. AI Copilot Data Flow
```
Tool Layer → Agent Layer → Service Layer → API Layer → Frontend
```
**Tool Output Format**: All tools return `dict` or `list[dict]`, automatically serialized to JSON in the Service layer
**Key Files**:
- `agent/gns3_copilot/tools_v2/*.py` - Tool implementations
- `agent/gns3_copilot/agent_service.py:460-473` - Event conversion logic
- `agent/gns3_copilot/utils/parse_tool_content.py` - Tool result parsing
### 2. SSE Event Types
| Type | Description |
|------|-------------|
| `content` | AI text streaming output |
| `tool_call` | LLM tool invocation (progressive parameters) |
| `tool_start` | Tool execution started |
| `tool_end` | Tool execution completed (output as JSON) |
| `error` | Error message |
| `done` | Stream ended |
### 3. Important Tools
| Tool Name | File | Function |
|-----------|------|----------|
| `ExecuteMultipleDeviceCommands` | `display_tools_nornir.py` | Read-only diagnostic commands |
| `ExecuteMultipleDeviceConfigCommands` | `config_tools_nornir.py` | Configuration commands |
| `VPCSMultiCommands` | `vpcs_tools_telnetlib3.py` | VPCS virtual PC commands |
| `GNS3TemplateTool` | `gns3_get_node_temp.py` | Get GNS3 templates |
| `GNS3CreateNodeTool` | `gns3_create_node.py` | Create nodes |
---
## Code Standards
### Static Code Analysis (Flake8)
The project uses **flake8** for static code analysis. You must run checks before committing code.
#### Running Flake8
```bash
# Activate virtual environment
source venv/bin/activate
# Check a single file
flake8 path/to/file.py
# Check the entire project
flake8 gns3server/
# Check a specific directory
flake8 gns3server/utils/
```
#### Common Flake8 Error Codes
| Code | Description | Example |
|------|-------------|---------|
| **F401** | Module imported but unused | `import os` never used |
| **F841** | Local variable assigned but never used | `x = 1` not used later |
| **F824** | `global` declaration never assigned | `global _bar` never assigned in scope |
| **E501** | Line too long (>79 characters) | Single line exceeds 79 characters |
#### Fix Examples
```python
# F401: Remove unused imports
# Bad
import os # Never used
# Good: Delete this line
# F841: Mark as intentionally unused
# Bad
def foo():
x = 1 # Never used
# Good: Use or mark as intentionally unused
def foo():
x = 1
_ = x # Mark as intentionally unused
# F824: Remove unnecessary global declaration
# Bad
def foo():
global _fernet # Never assigned in this scope
# Good: Remove global statement (if only reading)
def foo():
# Just read the global variable, no global declaration needed
pass
# E501: Break long lines
# Bad
raise RuntimeError("Encryption not initialized. Call init_encryption() first.")
# Good
raise RuntimeError("Encryption not initialized. Call init_encryption() first.")
```
#### Ruff (Alternative)
[Ruff](https://docs.astral.sh/ruff/) is a faster Python linter that can replace flake8, isort, black, and more.
```bash
# Install
pip install ruff
# Usage
ruff check gns3server/ # Check code
ruff check --fix gns3server/ # Auto-fix
ruff format gns3server/ # Format code
```
### Python Code Style
```python
# 1. Type annotations
def process_data(input_data: dict[str, Any]) -> list[dict[str, Any]]:
pass
# 2. Error handling
try:
result = tool.invoke(args)
except Exception as e:
logger.error("Tool failed: %s", e, exc_info=True)
return {"error": str(e)}
# 3. JSON serialization
if not isinstance(output, str):
output = json.dumps(output, ensure_ascii=False, indent=2)
```
### Import Order
```python
# 1. Standard library
import asyncio
import json
import logging
# 2. Third-party libraries
from langchain.tools import BaseTool
from pydantic import BaseModel
# 3. Local modules
from gns3server.agent.gns3_copilot.agent import agent_builder
from gns3server.controller import Controller
```
### Copyright Header
```python
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GNS3-Copilot - AI-powered Network Lab Assistant for GNS3
#
# Copyright (C) 2025 Yue Guobin (岳国宾)
# Author: Yue Guobin (岳国宾)
#
# Project Home: https://github.com/yueguobin/gns3-copilot
```
---
## Git Commit Standards
### Commit Message Format
```
<type>(<scope>): <subject>
<body>
<footer>
```
### Type Categories
| Type | Description | Example |
|------|-------------|---------|
| `feat` | New feature | `feat(copilot): add user authentication` |
| `fix` | Bug fix | `fix(api): correct JSON serialization` |
| `docs` | Documentation update | `docs: update API design doc` |
| `refactor` | Refactoring | `refactor(agent): simplify state management` |
| `chore` | Build/toolchain | `chore: update dependencies` |
### Example
```
fix(copilot): serialize tool output to standard JSON format
Changed tool output serialization in AgentService._convert_event_to_chunk()
from str() to json.dumps() to ensure structured data is properly formatted.
Changes:
- Added json import to agent_service.py
- Modified on_tool_end event handling
Benefits:
- Frontend can parse tool results with JSON.parse()
- Chinese characters are preserved (not escaped)
Co-Authored-By: YueGuobin <yueguobin@outlook.com>
```
### IMPORTANT: Use Your Own Git Account for Commits
When creating git commits, **ALWAYS** use your own git account information for authorship.
**Before committing**, verify your git configuration:
```bash
# Check current git user configuration
git config user.name
git config user.email
# If incorrect, set your own information
git config user.name "Your Name"
git config user.email "your.email@example.com"
```
**For this project**, the current configured user is:
```
Name: YueGuobin
Email: yueguobin@outlook.com
```
You may use `Co-Authored-By` to credit contributors, but the `Author` field should always be **your own account**:
```bash
git commit -m "feat: add new feature
Co-Authored-By: ContributorName <contributor@example.com>"
```
---
## Development Notes
### 1. When Modifying Tool Output Format
**Must update the following locations**:
- `agent/gns3_copilot/tools_v2/*.py` - Tool implementation
- `agent/gns3_copilot/agent_service.py` - Event conversion
- `docs/gns3-copilot/ai-chat-api-design.md` - API documentation
### 2. Data Serialization Principles
- **Tool Layer**: Return Python `dict`/`list`
- **Service Layer**: Use `json.dumps()` for serialization
- **API Layer**: Use Pydantic validation then serialize to SSE
### 3. Logging
```python
logger.info("Operation started: project_id=%s", project_id)
logger.debug("Detailed info: data=%s", data)
logger.error("Error occurred: %s", error, exc_info=True)
```
### 4. Security Considerations
- Prohibit dangerous commands (reload, erase startup-config, etc.)
- Use `filter_forbidden_commands()` to filter commands
- Validate user input (project_id format, etc.)
---
## Common Commands
```bash
# Run tests
pytest tests/
# Static code analysis (must run before committing)
source venv/bin/activate
flake8 gns3server/
# Check a single file
flake8 path/to/file.py
# Syntax check
python3 -m py_compile gns3server/agent/gns3_copilot/agent_service.py
# Check git status
git status
# View git history
git log --oneline -15
# View file modification history
git blame file.py -L 100,120
# Commit code (verify your git user info first!)
git config user.name && git config user.email
git add files...
git commit -m "type(scope): description"
```
---
## Related Documentation
- [AI Chat API Design](./docs/gns3-copilot/ai-chat-api-design.md)
- [Command Security Policy](./docs/gns3-copilot/command-security.md)
- [LLM Model Configuration](./docs/gns3-copilot/llm-model-configs-api.md)
- [Context Window Management](./docs/gns3-copilot/context-window-management.md)
---
**Document Maintenance**: Please update this document promptly when project structure or development standards change.
+195
View File
@@ -0,0 +1,195 @@
# GNS3 server repository
[![Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![GitHub Actions tests](https://github.com/GNS3/gns3-server/workflows/testing/badge.svg?branch=3.1)](https://github.com/GNS3/gns3-server/actions?query=workflow%3Atesting+branch%3A3.0)
[![Latest PyPi version](https://img.shields.io/pypi/v/gns3-server.svg)](https://pypi.python.org/pypi/gns3-server)
[![Snyk scanning](https://snyk.io/test/github/GNS3/gns3-server/badge.svg)](https://snyk.io/test/github/GNS3/gns3-server)
The GNS3 server manages emulators and other virtualization software such as Dynamips, Qemu/KVM, Docker, VPCS, VirtualBox and VMware Workstation.
Clients like the [GNS3 GUI](https://github.com/GNS3/gns3-gui/) and the [GNS3 Web UI](https://github.com/GNS3/gns3-web-ui/) control the server using a HTTP REST API.
## Installation
These instructions are for using GNS3, please see below for development.
### Windows & macOS
Please use our [Windows installer or DMG package](https://gns3.com/software/download) to install the stable build along with the GNS3 VM.
Note that as of GNS3 version above 3.0, you must run the server using the GNS3 VM or on a Linux system (remote, cloud or virtual machine).
### Linux
#### Ubuntu based distributions
We build and test packages for actively supported Ubuntu versions.
Other distros based on Ubuntu, like Mint, should also be supported.
Packages can be installed from our Personal Package Archives (PPA) repository:
```shell
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:gns3/ppa
sudo apt update
sudo apt install gns3-gui gns3-server
```
#### Other Linux distributions
GNS3 is often packaged for other distributions by third-parties:
* [Gentoo](https://packages.gentoo.org/package/net-misc/gns3-server)
* [Alpine](https://pkgs.alpinelinux.org/package/v3.10/community/x86_64/gns3-server)
* [NixOS](https://search.nixos.org/packages?channel=21.11&from=0&size=50&sort=relevance&type=packages&query=gns3-server)
#### PyPi
You may use PyPi in case no package is provided, or you would like to do a manual installation:
* https://pypi.org/project/gns3-server/
* https://pypi.org/project/gns3-gui/
```shell
python3 -m pip install gns3-gui
python3 -m pip install gns3-server
```
#### Optional Features
GNS3 server supports optional features that can be installed as needed:
**AI Features** (Optional — includes AI Copilot and MCP):
```shell
python3 -m pip install gns3-server[ai-features]
```
AI-powered assistant for network topology design, automation, and MCP protocol support for AI agent integration.
**Development** (For contributors):
```shell
python3 -m pip install gns3-server[dev]
```
**Web Wireshark** (Optional):
```shell
pip install gns3-server && gns3server-web-wireshark-setup
```
Browser-based packet capture analysis using Wireshark in a Docker container.
**Combination Installation**:
You can install multiple optional features together:
```shell
python3 -m pip install gns3-server[ai-features,dev]
```
**Why optional?**
- Reduces installation size for users who don't need specific features
- Supports restricted environments (government, education, corporate) where certain libraries may not be allowed
- Faster installation for basic GNS3 usage
- Allows users to choose only the features they need
**Note:** If you install without optional extras, the server will work normally but optional features will be disabled. You can add features later by running the appropriate install command.
**Uninstalling AI Features:**
To remove AI Features dependencies (AI Copilot + MCP):
```shell
gns3server-uninstall-ai-features
```
This will remove all AI Copilot and MCP dependencies while keeping the core functionality intact. The server will continue to work, but AI features will be disabled.
Please see our [documentation](https://docs.gns3.com/docs/getting-started/installation/linux) for more details.
### Software dependencies
In addition to Python dependencies, other software may be required, recommended or optional.
* [uBridge](https://github.com/GNS3/ubridge/) is required, it interconnects the nodes.
* [Dynamips](https://github.com/GNS3/dynamips/) is required for running IOS routers (using real IOS images) as well as the internal switches and hubs.
* [VPCS](https://github.com/GNS3/vpcs/) is recommended, it is a builtin node simulating a very simple computer to perform connectivity tests using ping, traceroute etc.
* Qemu is strongly recommended as most node types are based on Qemu, for example Cisco IOSv and Arista vEOS.
* libvirt is recommended as it's needed for the NAT cloud.
* Docker is optional, some nodes are based on Docker.
* mtools is recommended to support data transfer to/from QEMU VMs using virtual disks.
* i386-libraries of libc and libcrypto are optional, they are only needed to run IOU based nodes.
Note that Docker needs the script program (`bsdutils` or `util-linux` package), when running a Docker VM and a static busybox during installation (python3 setup.py install / pip3 install / package creation).
## Development
### Setting up
These commands will install the server with core Python dependencies:
```shell
git clone https://github.com/GNS3/gns3-server
cd gns3-server
git checkout 3.1
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
python3 -m pip install .
python3 -m gns3server
```
**For AI Copilot development**, install with additional dependencies:
```shell
python3 -m pip install .[ai-features,dev]
```
**For development (tests and linting)**:
```shell
python3 -m pip install .[dev]
```
You will have to manually install other software dependencies (see above), for Dynamips, VPCS and uBridge the easiest is to install from our PPA.
### Docker container
Alternatively, you can run the GNS3 server in a container
```shell
bash scripts/docker_dev_server.sh
```
#### use Docker Compose
``` {.bash}
docker compose up -d
```
### Running tests
First, install the development dependencies:
```shell
python3 -m pip install -r dev-requirements.txt
```
Then run the tests using pytest:
```shell
python3 -m pytest -vv tests/
```
### API documentation
The API documentation can be accessed when running the server locally:
* On `http://IP:PORT/docs` to see with Swagger UI (i.e. `http://localhost:3080/docs`)
* On `http://IP:PORT/redoc` to see with ReDoc (i.e. `http://localhost:3080/redoc`)
The documentation can also be viewed [online](http://apiv3.gns3.net) however it may not be the most up-to-date version since it needs manually synchronization with the current code. Also, you cannot use this to interact with a GNS3 server.
### Branches
#### master
master is the next stable release, you can test it in your day-to -day activities.
Bug fixes or small improvements pull requests go here.
3.x development brand for the next major release.
**Never** use this branch for production. Pull requests for major new features go here.
-223
View File
@@ -1,223 +0,0 @@
GNS3-server
===========
.. image:: https://travis-ci.org/GNS3/gns3-server.svg?branch=master
:target: https://travis-ci.org/GNS3/gns3-server
.. image:: https://img.shields.io/pypi/v/gns3-server.svg
:target: https://pypi.python.org/pypi/gns3-server
This is the GNS3 server repository.
The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM.
Clients like the GNS3 GUI controls the server using a HTTP REST API.
You will need the GNS3 GUI (gns3-gui repository) to control the server.
Branches
--------
master
******
master is the next stable release, you can test it in your day to day activities.
Bug fixes or small improvements pull requests go here.
2.x (2.1 for example)
********
Next major release
*Never* use this branch for production. Pull requests for major new features go here.
Linux
-----
GNS3 is perhaps packaged for your distribution:
* Gentoo: https://packages.gentoo.org/package/net-misc/gns3-server
Linux (Debian based)
--------------------
The following instructions have been tested with Ubuntu and Mint.
You must be connected to the Internet in order to install the dependencies.
Dependencies:
- Python 3.4 or above
- aiohttp
- setuptools
- psutil
- jsonschema
The following commands will install some of these dependencies:
.. code:: bash
sudo apt-get install python3-setuptools
Finally these commands will install the server as well as the rest of the dependencies:
.. code:: bash
cd gns3-server-master
sudo python3 setup.py install
gns3server
To run tests use:
.. code:: bash
py.test -v
Docker container
****************
For development you can run the GNS3 server in a container
.. code:: bash
bash scripts/docker_dev_server.sh
Run as daemon (Unix only)
**************************
You will found init sample script for various systems
inside the init directory.
Usefull options:
* --daemon: start process as a daemon
* --log logfile: store output in a logfile
* --pid pidfile: store the pid of the running process in a file and prevent double execution
All the init script require the creation of a GNS3 user. You can change it to another user.
.. code:: bash
sudo adduser gns3
upstart
~~~~~~~
For ubuntu < 15.04
You need to copy init/gns3.conf.upstart to /etc/init/gns3.conf
.. code:: bash
sudo chown root /etc/init/gns3.conf
sudo service gns3 start
systemd
~~~~~~~~
You need to copy init/gns3.service.systemd to /lib/systemd/system/gns3.service
.. code:: bash
sudo chown root /lib/systemd/system/gns3.service
sudo systemctl start gns3
Windows
-------
Please use our `all-in-one installer <https://community.gns3.com/community/software/download>`_ to install the stable build.
If you install via source you need to first install:
- Python (3.3 or above) - https://www.python.org/downloads/windows/
- Pywin32 - https://sourceforge.net/projects/pywin32/
Then you can call
.. code:: bash
python setup.py install
to install the remaining dependencies.
To run the tests, you also need to call
.. code:: bash
pip install pytest pytest-capturelog
before actually running the tests with
.. code:: bash
python setup.py test
or with
.. code:: bash
py.test -v
Mac OS X
--------
Please use our DMG package for a simple installation.
If you want to test the current git version or contribute to the project.
You can follow this instructions with virtualenwrapper: http://virtualenvwrapper.readthedocs.org/
and homebrew: http://brew.sh/.
.. code:: bash
brew install python3
mkvirtualenv gns3-server --python=/usr/local/bin/python3.4
python3 setup.py install
gns3server
SSL
---
If you want enable SSL support on GNS3 you can generate a self signed certificate:
.. code:: bash
bash gns3server/cert_utils/create_cert.sh
This command will put the files in ~/.config/GNS3/ssl
After you can start the server in SSL mode with:
.. code:: bash
python gns3server/main.py --certfile ~/.config/GNS3/ssl/server.cert --certkey ~/.config/GNS3/ssl/server.key --ssl
Or in your gns3_server.conf by adding in the Server section:
.. code:: ini
[Server]
certfile=/Users/noplay/.config/GNS3/ssl/server.cert
certkey=/Users/noplay/.config/GNS3/ssl/server.key
ssl=True
Running tests
*************
Just run:
.. code:: bash
py.test -vv
If you want test coverage:
.. code:: bash
py.test --cov-report term-missing --cov=gns3server
Security issues
----------------
Please contact us using contact informations available here:
http://docs.gns3.com/1ON9JBXSeR7Nt2-Qum2o3ZX0GU86BZwlmNSUgvmqNWGY/index.html
+17
View File
@@ -0,0 +1,17 @@
# Security Policy
## Supported Versions
These are the versions of the GNS3 server that are
currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 3.x.x | :white_check_mark: |
| 2.2.x | :white_check_mark: |
| 2.1.x | :x: |
| 1.x.x | :x: |
## Reporting a Vulnerability
Please use GitHub's report a vulnerability feature. More information can be found in https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability
+51
View File
@@ -0,0 +1,51 @@
# ==============================================================================
# GNS3 Copilot AI Agent Dependencies
# ==============================================================================
# Install with: pip install gns3-server[ai-features]
# Or directly: pip install -r ai-requirements.txt
# ==============================================================================
# Core AI and Automation Framework
# Note: aiosqlite is in core requirements.txt
langchain>=1.2.10
langchain-core>=1.7.3
langgraph>=1.2.19
langgraph-checkpoint>=4.0.0
langgraph-checkpoint-sqlite>=3.1.3
langgraph-checkpoint-postgres>=3.0.4
# Model Providers
langchain-openai>=1.7.3
langchain-anthropic>=1.3.4
langchain-google-genai>=4.4.2
langchain-aws>=1.9.0
langchain-ollama>=1.1.0
langchain-deepseek>=1.1.1
langchain-xai>=1.3.0
# Token Counting
tiktoken>=0.14.0
# LangSmith SDK
langsmith>=0.14.7
# Network Automation
paramiko>=5.0.0 # install version >= 5.0.0 to address CVE-2026-44405
netmiko>=4.8.0
nornir>=3.6.0
nornir-netmiko>=1.0.1
nornir-utils>=0.3.0
nornir-salt>=0.23.4
# Environment & Configuration
python-dotenv>=1.2.4
# Authentication
PyJWT>=2.15.1
psycopg-pool>=3.1.0
# Skills Repository Management
PyYAML>=6.0.3
GitPython>=3.1.0
# Note: httpx is only for testing (in dev-requirements.txt)
-21
View File
@@ -1,21 +0,0 @@
version: '{build}-{branch}'
image: Visual Studio 2015
platform: x64
environment:
PYTHON: "C:\\Python36-x64"
DISTUTILS_USE_SDK: "1"
API_TOKEN:
secure: VEKn4bYH3QO0ixtQW5ni4Enmn8cS1NlZV246ludBDgQ=
install:
- cinst nmap
- "%PYTHON%\\python.exe -m pip install -r dev-requirements.txt"
- "%PYTHON%\\python.exe -m pip install -r win-requirements.txt"
build: off
test_script:
- "%PYTHON%\\python.exe -m pytest -v"
+7
View File
@@ -0,0 +1,7 @@
services:
gen3-server:
build:
context: .
dockerfile: Dockerfile
ports:
- "8001:3080"
-67
View File
@@ -1,67 +0,0 @@
[Server]
; IP where the server listen for connections
host = 0.0.0.0
; HTTP port for controlling the servers
port = 3080
; Option to enable SSL encryption
ssl = False
certfile=/home/gns3/.config/GNS3/ssl/server.cert
certkey=/home/gns3/.config/GNS3/ssl/server.key
; Path where devices images are stored
images_path = /home/gns3/GNS3/images
; Path where user projects are stored
projects_path = /home/gns3/GNS3/projects
; Path where user appliances are stored
appliances_path = /home/gns3/GNS3/appliances
; Option to automatically send crash reports to the GNS3 team
report_errors = True
; First console port of the range allocated to devices
console_start_port_range = 5000
; Last console port of the range allocated to devices
console_end_port_range = 10000
; First port of the range allocated for inter-device communication. Two ports are allocated per link.
udp_start_port_range = 10000
; Last port of the range allocated for inter-device communication. Two ports are allocated per link
udp_end_port_range = 20000
; uBridge executable location, default: search in PATH
;ubridge_path = ubridge
; Option to enable HTTP authentication.
auth = False
; Username for HTTP authentication.
user = gns3
; Password for HTTP authentication.
password = gns3
[VPCS]
; VPCS executable location, default: search in PATH
;vpcs_path = vpcs
[Dynamips]
; Enable auxiliary console ports on IOS routers
allocate_aux_console_ports = False
mmap_support = True
; Dynamips executable path, default: search in PATH
;dynamips_path = dynamips
sparse_memory_support = True
ghost_ios_support = True
[IOU]
; iouyap executable path, default: search in PATH
;iouyap_path = iouyap
; Path of your .iourc file. If not provided, the file is searched in $HOME/.iourc
iourc_path = /home/gns3/.iourc
; Validate if the iourc license file is correct. If you turn this off and your licence is invalid IOU will not start and no errors will be shown.
license_check = True
[Qemu]
; !! Remember to add the gns3 user to the KVM group, otherwise you will not have read / write permssions to /dev/kvm !!
enable_kvm = True
; Require KVM to be installed in order to start VMs
require_kvm = True
+10 -7
View File
@@ -1,7 +1,10 @@
-rrequirements.txt
sphinx==1.6.2
pytest==3.1.1
pep8==1.7.0
pytest-catchlog==1.2.2
pytest-timeout==1.2.0
pytest==9.2.0
pytest-timeout==2.4.0
pytest-asyncio==1.4.1
httpx==0.28.1
httpx_ws==0.9.0
pytest-random-order==1.2.0 # opt-in: --random-order --random-order-bucket=global (legacy suites are not shuffle-clean yet, see .claude/skills/gns3-api-test-writing)
pytest-cov==7.1.0
ruff==0.17.3
mypy==2.4.1
rust-just==1.59.0 # provides the `just` command runner, see justfile
+15 -4
View File
@@ -1,4 +1,15 @@
tests:
build: .
dockerfile: /tmp/DockerfileTests
command: py.test -v -s tests
version: '3.7'
services:
gns3server:
privileged: true
build:
context: .
dockerfile: Dockerfile
volumes:
- ./gns3server:/server/
- /var/run/docker.sock:/var/run/docker.sock
command: python3 -m gns3server --local --port 3080
ports:
- 3080:3080
- 5000-5100:5000-5100
+1
View File
@@ -0,0 +1 @@
apiv3.gns3.net
+443
View File
@@ -0,0 +1,443 @@
Creative Commons Attribution-ShareAlike 4.0 International
Copyright (c) 2026 GNS3 Web UI Project
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International
Copyright (C) 2025 Creative Commons Corporation
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and conditions.
Section 1 – Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
publication, distribution, public performance, public display, and
adaptation rights, and rights in database extensions and
collections.
d. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
e. Licensed Rights means rights granted to You subject to the terms
and conditions of this Public License, which are limited to all
Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
f. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
g. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
h. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and
of the Council of 11 March 1996 on the legal protection of
databases, as amended and/or succeeded, as well as other
essentially equivalent rights anywhere in the world.
i. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 – Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt,
where Exceptions and Limitations apply to Your use, this
Public License does not apply, and You do not need to
comply with its terms and conditions.
3. Term. The term of this Public License is specified in
Section 6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor – Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor – Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You
apply.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights. Moral rights, such as the right of integrity, are
not licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to the
extent possible, the Licensor waives and/or agrees not to assert
any such rights held by the Licensor to the limited extent
necessary to allow You to exercise the Licensed Rights, but not
otherwise.
c. Patent and trademark rights are not licensed under this Public
License.
d. To the extent possible, the Licensor waives any right to collect
royalties from You for the exercise of the Licensed Rights,
whether directly or through a collecting society under any
voluntary or waivable statutory or compulsory licensing scheme.
In all other cases the Licensor expressly reserves any right to
collect such royalties.
Section 3 – License Conditions.
Your exercise of the Licensed Rights is expressly made subject to
the following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the
Licensor with the Licensed Material:
i. identification of the creator(s) of the
Licensed Material and any others designated to
receive attribution, in any reasonable manner
requested by the Licensor (including by
pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to
the extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI
or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may
be reasonable to satisfy the conditions by providing a URI
or hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the
Adapted Material from complying with this Public License.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to,
the Adapter's License You apply. You may satisfy this
condition in any reasonable manner based on the medium,
means, and context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 – Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 – Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the
extent possible, the Licensor offers the Licensed Material as-is
and as-available, and makes no representations or warranties of
any kind concerning the Licensed Material, whether express,
implied, statutory, or other. This includes, without limitation,
warranties of title, merchantability, fitness for a particular
purpose, non-infringement, absence of latent or other defects,
accuracy, or the presence or absence of errors, whether or not
known or discoverable. Where disclaimers of warranties are not
allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable
to You on any legal theory (including, without limitation,
negligence) or otherwise for any direct, special, indirect,
incidental, consequential, punitive, exemplary, or other losses,
costs, expenses, or damages that arise out of this Public License
or use of the Licensed Material, even if the Licensor has been
advised of the possibility of such losses, costs, expenses, or
damages. Where a limitation of liability is not allowed in full
or in part, this limitation may not apply to You.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 – Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply
with this Public License, then Your rights under this Public
License terminate automatically.
b. Where Your right to use the Licensed Material has terminated
under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured,
provided it is cured within 30 days of Your discovery of
the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 – Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 – Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License
is deemed unenforceable, it shall be automatically reformed to
the minimum extent necessary to make it enforceable. If the
provision cannot be reformed, it shall be severed from this
Public License without affecting the enforceability of the
remaining terms and conditions.
c. No term or condition of this Public License will be waived and
no failure to comply consented to unless expressly agreed to by
the Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses. Notwithstanding,
Creative Commons may elect to apply one of its public licenses to
material it publishes and in those instances will be considered the
"Licensor." The text of the Creative Commons public licenses is
dedicated to the public domain under the CC0 Public Domain Dedication.
The text of the Creative Commons public licenses is dedicated to the
public domain under the CC0 Public Domain Dedication. Except for the
limited purpose of indicating that material is shared under a Creative
Commons public license or as otherwise permitted by the Creative Commons
policies published at creativecommons.org/policies, Creative Commons
does not authorize the use of the trademark "Creative Commons" or any
other trademark or logo of Creative Commons without its prior written
consent including, without limitation, in connection with any
unauthorized modifications to any of its public licenses or any other
arrangements, understandings, or agreements concerning use of licensed
material. For the avoidance of doubt, this paragraph does not form part
of the public licenses.
Creative Commons may be contacted at creativecommons.org.
=======================================================================
For the GNS3 Web UI documentation:
- Documentation License: CC BY-SA 4.0
- Project License: GPLv3 (see root LICENSE file)
- License URL: https://creativecommons.org/licenses/by-sa/4.0/
All documentation files in this directory are licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License
(CC BY-SA 4.0).
=======================================================================
IMPORTANT: ShareAlike Requirements for Software Derivatives
Under the CC BY-SA 4.0 ShareAlike condition, if you create derivative
works based on this documentation, including software that is considered
a derivative of the documentation, you must:
1. **License your derivative work under CC BY-SA 4.0 or a compatible
license** (such as GPLv3, which is compatible with CC BY-SA 4.0)
2. **Attribute the original documentation** to the GNS3 Web UI Project
3. **Indicate if you modified the documentation** and retain
indications of previous modifications
4. **Include the license notice** and link to the CC BY-SA 4.0 license
What constitutes a derivative work:
- Translations of the documentation
- Adaptations, modifications, or enhancements to the documentation
- Software that incorporates substantial portions of the documentation
- Works based on the documentation's structure, organization, or content
Compatible licenses include:
- CC BY-SA 4.0 or later
- GPLv3 (GNU General Public License version 3)
- AGPLv3 (GNU Affero General Public License version 3)
- Other licenses approved as compatible by Creative Commons
For more information on CC BY-SA compatibility, see:
https://creativecommons.org/compatiblelicenses
If you are unsure whether your use constitutes a derivative work or
which license to apply, please consult the full CC BY-SA 4.0 license
text above or seek legal advice.
-177
View File
@@ -1,177 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GNS3.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GNS3.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/GNS3"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GNS3"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
+160
View File
@@ -0,0 +1,160 @@
<!--
SPDX-License-Identifier: CC-BY-SA-4.0
See LICENSE file for licensing information.
-->
> This documentation is organized by AI with reference to actual code. AI can make mistakes — please verify against the source code when in doubt.
# GNS3 Server Documentation
---
## License
This documentation is licensed under the **Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)**.
⚠️ **Important - ShareAlike Requirement**: If you create derivative works based on this documentation (including software that incorporates substantial portions of the documentation), your work must also be licensed under **CC BY-SA 4.0 or a compatible license** (such as GPLv3).
- 📄 **Full License Text**: See [docs/LICENSE](./LICENSE)
- 🔗 **License URL**: https://creativecommons.org/licenses/by-sa/4.0/
- 📖 **Compatibility**: https://creativecommons.org/compatiblelicenses
**Dual License Structure**:
- 📚 **Documentation**: CC BY-SA 4.0 (this directory)
- 💻 **Software Code**: GPLv3 (see root [LICENSE](../LICENSE))
---
Technical documentation for the GNS3 server project, covering features, AI Copilot, development setup, and known issues.
## Directory Structure
```
docs/
├── README.md # This file
├── development-setup.md # Ubuntu 24.04 development environment setup
├── openapi.json # OpenAPI specification
├── features/ # Feature documentation
│ ├── compute-controller-setup.md # Controller + Compute architecture & configuration
│ ├── packet-filters.md # Link impairment filters: 13 kernel types + relay
│ ├── statistics-api.md # Aggregated statistics API for monitoring
│ ├── vnc-websocket-console.md # Browser-based VNC console via WebSocket
│ └── web-wireshark-business-process.md # Web Wireshark (Docker + xpra packet capture)
├── design/ # Design proposals & roadmaps (not yet implemented)
│ └── docker-image-type.md # Docker image types: vendor profile discriminator + registry
├── gns3-copilot/ # AI Copilot feature documentation
│ ├── netmiko_devices.md # Netmiko supported devices (366 types)
│ ├── template-based-configuration-roadmap.md # Future: template-based config with HITL
│ └── implemented/ # Implemented features
│ ├── chat-api.md # Chat API (SSE, session management)
│ ├── llm-model-configs.md # LLM model configuration system
│ ├── command-security.md # Command security and filtering
│ ├── context-window-management.md # Context window optimization
│ ├── node-control-tools.md # Node start/stop/suspend tools
│ └── multi-vendor-device-support.md # Multi-vendor device support
└── bugs/ # Known issues & bug reports
└── telnet-server-connection-race-condition.md
```
---
## Features
### Image inventory synchronization
Image Manager's **Sync Images** action reconciles the catalog with the configured
image directories. Automatic synchronization uses filesystem events and periodic
scans (`auto_discover_images`, `image_sync_interval`, default 900 seconds).
New and changed images are checksummed; missing records retain their IDs and
template associations and become available again when restored at the same path.
The `/v3/images/sync` API supports dry-run and forced checksum verification.
Database migration `d9e8a2b7c401` is required when upgrading an existing catalog.
Atomic image publication requires filesystem hard-link support.
### Controller + Compute Setup (`features/compute-controller-setup.md`)
Architecture and minimum configuration for setting up GNS3 Controller with remote Compute nodes. Covers compute node config, controller registration, and multi-compute deployment.
### Statistics API (`features/statistics-api.md`)
Aggregated server statistics API (`GET /v3/statistics`) for monitoring dashboards. Collects compute resources, project/node/link counts, and Web Wireshark container status in a single request.
### VNC WebSocket Console (`features/vnc-websocket-console.md`)
Browser-based VNC console access via WebSocket. The Controller acts as WebSocket-to-WebSocket relay, and Compute bridges WebSocket to TCP for QEMU/Docker VMs. Supports noVNC clients.
### API Error Responses (`features/api-error-responses.md`)
Unified error response format across all GNS3 API endpoints. Documents HTTP status codes, error types, and client-side error handling patterns.
### Web Wireshark (`features/web-wireshark-business-process.md`)
Web-based packet capture analysis using Docker + xpra HTML5 client. Zero-install Wireshark experience directly in the browser, integrated with GNS3 topologies.
### Marker (Traffic Insight) (`features/marker-traffic-insight.md`)
Real-time traffic insight via per-link BPF markers and project-level inherited definitions. A marker taps a link in uBridge, emitting match notifications and pcap capture on BPF hit; definitions fan out to every capable link automatically.
### Marker Tag Replay (`features/marker-tag-replay.md`)
Aggregate playback across links keyed by `tag`: once every marker under a tag is paused, their pcaps merge into one timestamp-ordered timeline; frames are decoded on demand via tshark into an isomorphic JSON protocol tree. The cross-link delta of the same packet measures the intermediate node's forwarding latency.
### Packet Filters (`features/packet-filters.md`)
Link impairment filters on both datapaths: the 13 kernel types (one netem qdisc, cls_bpf match-drop, the eBPF stateful classifier) with the per-frame evaluation order, plus the 5 relay userspace types; reconcile semantics, capability gating through `available_filters`, and the window/quota drop models.
### Docker exec Console (Vendor NOS) (`features/docker-exec-console.md`)
Console for vendor NOS containers (SR Linux, XRd, …) whose CLI is a TUI off PID 1: runs the vendor CLI via the Docker exec API, plus `GNS3_SKIP_INIT`/`GNS3_INTERFACE_NAMES` boot knobs and SKIP_INIT volume persistence.
### Cisco XRd Control Plane (`features/vendor-nos-xrd.md`)
Cisco XRd as a GNS3 Docker router: vendor path + shm/device injection (`GNS3_SHM_SIZE`/`GNS3_DEVICES`), config-file injection (`extra_configs`), udev masking (`GNS3_MASK_UDEV`) so privileged systemd containers don't disturb the host, and the host-readiness check.
### IOL Images with iol-runner (`features/iol-runner-docker.md`)
Cisco CML containerized IOL (e.g. `iol-xe/iol-xe:17-18-02`) as GNS3 Docker routers: generic unix-socket NIO (`GNS3_UNIX_SOCKET_NIO` — adapters wired via AF_UNIX datagram socket pairs instead of TAP/netns) plus `IOLDockerVM` (`GNS3_IOL_RUNNER=1` — per-start config generation, `/tmp/run` preparation, stale-socket cleanup, console on PID 1 stdio).
---
## Design & Roadmaps (`design/`)
### Docker Image Types (`design/docker-image-type.md`)
Proposed `image_type` discriminator on Docker templates plus a compute-side profile registry: vendor parameters graduate from environment markers into schema-gated fields, generic-feature applicability becomes declared capability data, and the existing markers remain as a compatibility fallback. Not a new node type — vendor images are content, not mechanism.
---
## GNS3 AI Copilot (`gns3-copilot/`)
### Implemented Features
| Feature | Description | Status |
|---------|-------------|--------|
| [Chat API](gns3-copilot/implemented/chat-api.md) | SSE streaming, session management, token statistics | Implemented |
| [LLM Model Configs](gns3-copilot/implemented/llm-model-configs.md) | Multi-level model config (system/group/user) | Implemented |
| [Command Security](gns3-copilot/implemented/command-security.md) | Command filtering, dangerous operation detection, HITL | Implemented |
| [Context Window Management](gns3-copilot/implemented/context-window-management.md) | Token optimization, content filtering, compression | Implemented |
| [Node Control Tools](gns3-copilot/implemented/node-control-tools.md) | Start/stop/suspend with batch ops and progress tracking | Implemented |
| [Multi-Vendor Support](gns3-copilot/implemented/multi-vendor-device-support.md) | Cisco, Huawei, Ruijie, VPCS with custom Netmiko drivers | Implemented |
### Reference
- [Netmiko Supported Devices](gns3-copilot/netmiko_devices.md) — 366 device types (154 SSH, 55 Telnet, 3 custom GNS3 drivers)
### Roadmap
- [Template-Based Configuration with HITL](gns3-copilot/template-based-configuration-roadmap.md) — Jinja2 templates with human-in-the-loop confirmations for device configuration and node creation
---
## Known Issues (`bugs/`)
- [Telnet Server Connection Race Condition](bugs/telnet-server-connection-race-condition.md) — `getpeername()` error when client disconnects during connection setup (High severity, Open)
- [Docker Link UDP Self-Loop](bugs/link-udp-self-loop.md) — intermittent one-way link (both ends handed the same UDP port by an allocation race); **fixed** (Medium severity)
- [SIGHUP on SSH Session Disconnect Kills All Nodes](bugs/sighup-session-disconnect-kills-nodes.md) — server survives (SIGHUP=reload) while every emulator child default-terminates without cleanup; sticky TAPs then 409 the first start; **root-caused, deployment guidance** (Medium severity)
---
## Development Setup (`development-setup.md`)
Quick-start guide for Ubuntu 24.04: install via PPA, set up dependencies, and run gns3-server from source.
---
## Related Documentation
- [GNS3 Server API Documentation](https://api.gns3.com/) — Interactive API docs (also available locally via `redoc.html`)
- [GNS3 Web UI Documentation](https://docs.gns3.com/)
- [LangGraph Documentation](https://langchain-ai.github.io/langgraph/)
---
_Last updated: 2026-09-01_
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/f95094c7-e60b-494a-9e2e-1029e8ba7520'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/f95094c7-e60b-494a-9e2e-1029e8ba7520 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:53 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/cb9bad9b-ce54-4e3d-bfc8-ce71102679f3/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/cb9bad9b-ce54-4e3d-bfc8-ce71102679f3/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:52 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/f1895cc9-b108-4d2d-9124-4dce48c1c129/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/f1895cc9-b108-4d2d-9124-4dce48c1c129/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/66c8500b-f0d5-44c9-82c1-0d3da540244e'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/66c8500b-f0d5-44c9-82c1-0d3da540244e HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/d6229240-1a46-4d3c-a1a9-337d26a77b5e/adapters/1/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/d6229240-1a46-4d3c-a1a9-337d26a77b5e/adapters/1/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/4a2593fd-366d-4522-a97e-073a181286d2'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/4a2593fd-366d-4522-a97e-073a181286d2 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/2ba5227f-4507-4711-844a-99dec989438e/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/2ba5227f-4507-4711-844a-99dec989438e/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/3473a78b-a3f5-4881-8b9e-f19aa53bd728'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/3473a78b-a3f5-4881-8b9e-f19aa53bd728 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/7c89c8c7-e145-4025-a087-a7d7e07d608f/adapters/1/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/7c89c8c7-e145-4025-a087-a7d7e07d608f/adapters/1/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/9ec32584-d2e6-4755-9e90-43a6f183eb4b'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/9ec32584-d2e6-4755-9e90-43a6f183eb4b HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:58 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/0d9d51bc-c5a5-45a9-ad54-5f6e9f363cdf/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/0d9d51bc-c5a5-45a9-ad54-5f6e9f363cdf/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:58 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/e829e5dc-bd64-4143-ae29-fae4badae401/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/e829e5dc-bd64-4143-ae29-fae4badae401/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:59 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/d5bc283f-2d66-4cf6-8ee2-98ad1262b32f/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/d5bc283f-2d66-4cf6-8ee2-98ad1262b32f/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:35:09 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vmware/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/ffbdfb95-bf03-4183-8a10-9d33f16ac422'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/ffbdfb95-bf03-4183-8a10-9d33f16ac422 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:35:11 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}
@@ -1,14 +0,0 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/4696f8f1-830d-4075-bd0e-717732c8dec5/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/4696f8f1-830d-4075-bd0e-717732c8dec5/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:35:11 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
@@ -1,34 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/capabilities'
GET /v2/compute/capabilities HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 366
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:52 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/capabilities
{
"node_types": [
"cloud",
"ethernet_hub",
"ethernet_switch",
"nat",
"vpcs",
"virtualbox",
"dynamips",
"frame_relay_switch",
"atm_switch",
"qemu",
"vmware",
"traceng",
"docker",
"iou"
],
"platform": "linuxdebian",
"version": "2.1.8dev1"
}
@@ -1,22 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/iou/images'
GET /v2/compute/iou/images HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 149
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/iou/images
[
{
"filename": "iou.bin",
"filesize": 7,
"md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
"path": "iou.bin"
}
]
@@ -1,106 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/network/interfaces'
GET /v2/compute/network/interfaces HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 2298
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/network/interfaces
[
{
"id": "docker0",
"ip_address": "172.17.0.1",
"mac_address": "02:42:3f:1f:8d:78",
"name": "docker0",
"netmask": "255.255.0.0",
"special": true,
"type": "ethernet"
},
{
"id": "lo",
"ip_address": "127.0.0.1",
"mac_address": "00:00:00:00:00:00",
"name": "lo",
"netmask": "255.0.0.0",
"special": true,
"type": "ethernet"
},
{
"id": "virbr0",
"ip_address": "192.168.122.1",
"mac_address": "00:00:00:00:00:00",
"name": "virbr0",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "virbr0-nic",
"ip_address": "",
"mac_address": "52:54:00:cb:6a:77",
"name": "virbr0-nic",
"netmask": "",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet1",
"ip_address": "172.16.1.1",
"mac_address": "00:50:56:c0:00:01",
"name": "vmnet1",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet2",
"ip_address": "172.16.2.1",
"mac_address": "00:50:56:c0:00:02",
"name": "vmnet2",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet3",
"ip_address": "172.16.3.1",
"mac_address": "00:50:56:c0:00:03",
"name": "vmnet3",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet4",
"ip_address": "172.16.10.1",
"mac_address": "00:50:56:c0:00:04",
"name": "vmnet4",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet8",
"ip_address": "192.168.195.1",
"mac_address": "00:50:56:c0:00:08",
"name": "vmnet8",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "wlp58s0",
"ip_address": "192.168.208.79",
"mac_address": "9c:b6:d0:dc:20:29",
"name": "wlp58s0",
"netmask": "255.255.248.0",
"special": false,
"type": "ethernet"
}
]
@@ -1,26 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects'
GET /v2/compute/projects HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 252
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects
[
{
"name": "test",
"project_id": "52010203-0405-0607-0809-0a0b0c0d0e0b",
"variables": null
},
{
"name": "test",
"project_id": "51010203-0405-0607-0809-0a0b0c0d0e0f",
"variables": null
}
]
@@ -1,19 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/40010203-0405-0607-0809-0a0b0c0d0e02'
GET /v2/compute/projects/40010203-0405-0607-0809-0a0b0c0d0e02 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 103
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}
{
"name": "test",
"project_id": "40010203-0405-0607-0809-0a0b0c0d0e02",
"variables": null
}
@@ -1,81 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/b81b6f71-e77e-4b7b-8db9-916d4fa832e3'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/b81b6f71-e77e-4b7b-8db9-916d4fa832e3 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 1608
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:52 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}
{
"interfaces": [
{
"name": "docker0",
"special": true,
"type": "ethernet"
},
{
"name": "lo",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0-nic",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet1",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet2",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet3",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet4",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet8",
"special": true,
"type": "ethernet"
},
{
"name": "wlp58s0",
"special": false,
"type": "ethernet"
}
],
"name": "Cloud 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/builtin/b81b6f71-e77e-4b7b-8db9-916d4fa832e3",
"node_id": "b81b6f71-e77e-4b7b-8db9-916d4fa832e3",
"ports_mapping": [
{
"interface": "wlp58s0",
"name": "wlp58s0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "started"
}
@@ -1,33 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/2e0bc10f-63ba-4eb6-92fb-9a0ae7b63604'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/2e0bc10f-63ba-4eb6-92fb-9a0ae7b63604 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 614
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}
{
"application_id": 1,
"command_line": "",
"console": 5004,
"console_type": "telnet",
"ethernet_adapters": 2,
"l1_keepalives": false,
"md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
"name": "PC TEST 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/iou/2e0bc10f-63ba-4eb6-92fb-9a0ae7b63604",
"node_id": "2e0bc10f-63ba-4eb6-92fb-9a0ae7b63604",
"nvram": 128,
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"status": "stopped",
"use_default_iou_values": true
}
@@ -1,28 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/aa1d9e41-69f6-4963-9d02-480579c677ba'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/aa1d9e41-69f6-4963-9d02-480579c677ba HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 335
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}
{
"name": "Nat 1",
"node_id": "aa1d9e41-69f6-4963-9d02-480579c677ba",
"ports_mapping": [
{
"interface": "virbr0",
"name": "nat0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "started"
}
@@ -1,59 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/e8bbffed-1df7-4d26-a087-da71227cbfeb'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/e8bbffed-1df7-4d26-a087-da71227cbfeb HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 1380
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}
{
"acpi_shutdown": false,
"adapter_type": "e1000",
"adapters": 1,
"bios_image": "",
"bios_image_md5sum": null,
"boot_priority": "c",
"cdrom_image": "",
"cdrom_image_md5sum": null,
"command_line": "",
"console": 5004,
"console_type": "telnet",
"cpu_throttling": 0,
"cpus": 1,
"hda_disk_image": "",
"hda_disk_image_md5sum": null,
"hda_disk_interface": "ide",
"hdb_disk_image": "",
"hdb_disk_image_md5sum": null,
"hdb_disk_interface": "ide",
"hdc_disk_image": "",
"hdc_disk_image_md5sum": null,
"hdc_disk_interface": "ide",
"hdd_disk_image": "",
"hdd_disk_image_md5sum": null,
"hdd_disk_interface": "ide",
"initrd": "",
"initrd_md5sum": null,
"kernel_command_line": "",
"kernel_image": "",
"kernel_image_md5sum": null,
"legacy_networking": false,
"mac_address": "0c:dd:80:bf:eb:00",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/e8bbffed-1df7-4d26-a087-da71227cbfeb",
"node_id": "e8bbffed-1df7-4d26-a087-da71227cbfeb",
"options": "",
"platform": "x86_64",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/tmp/tmpxudfhxk5/qemu-system-x86_64",
"ram": 256,
"status": "stopped",
"usage": ""
}
@@ -1,26 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/31217585-67d0-48b8-b629-97282dd2529e'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/31217585-67d0-48b8-b629-97282dd2529e HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 443
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:58 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}
{
"command_line": "",
"console": 5004,
"console_type": "none",
"default_destination": "",
"ip_address": "",
"name": "TraceNG TEST 1",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/traceng/31217585-67d0-48b8-b629-97282dd2529e",
"node_id": "31217585-67d0-48b8-b629-97282dd2529e",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}
@@ -1,31 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/49b530f4-2887-4493-8863-5ba7b7ca65c6'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/49b530f4-2887-4493-8863-5ba7b7ca65c6 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 465
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:58 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}
{
"acpi_shutdown": false,
"adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
"adapters": 0,
"console": 5004,
"console_type": "telnet",
"headless": false,
"linked_clone": false,
"name": "VMTEST",
"node_directory": null,
"node_id": "49b530f4-2887-4493-8863-5ba7b7ca65c6",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 0,
"status": "stopped",
"use_any_adapter": false,
"vmname": "VMTEST"
}
@@ -1,30 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/1da29a87-e7df-48f5-a409-2627e47f6895'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/1da29a87-e7df-48f5-a409-2627e47f6895 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 593
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:35:00 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vmware/nodes/{node_id}
{
"acpi_shutdown": false,
"adapter_type": "e1000",
"adapters": 0,
"console": 5004,
"console_type": "telnet",
"headless": false,
"linked_clone": false,
"name": "VMTEST",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vmware/1da29a87-e7df-48f5-a409-2627e47f6895",
"node_id": "1da29a87-e7df-48f5-a409-2627e47f6895",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped",
"use_any_adapter": false,
"vmx_path": "/tmp/pytest-of-grossmj/pytest-23/test_vmware_get0/test.vmx"
}
@@ -1,24 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 384
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:35:11 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}
{
"command_line": "",
"console": 5004,
"console_type": "telnet",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7",
"node_id": "2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}
@@ -1,32 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/qemu/binaries' -d '{"archs": ["i386"]}'
GET /v2/compute/qemu/binaries HTTP/1.1
{
"archs": [
"i386"
]
}
HTTP/1.1 200
Connection: close
Content-Length: 212
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/qemu/binaries
[
{
"path": "/tmp/x86_64",
"version": "2.2.0"
},
{
"path": "/tmp/alpha",
"version": "2.1.0"
},
{
"path": "/tmp/i386",
"version": "2.1.0"
}
]
@@ -1,19 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/qemu/capabilities'
GET /v2/compute/qemu/capabilities HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 39
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/qemu/capabilities
{
"kvm": [
"x86_64"
]
}
-18
View File
@@ -1,18 +0,0 @@
curl -i -X GET 'http://localhost:3080/v2/compute/version'
GET /v2/compute/version HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 49
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/version
{
"local": true,
"version": "2.1.8dev1"
}
@@ -1,22 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects' -d '{"name": "test", "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"}'
POST /v2/compute/projects HTTP/1.1
{
"name": "test",
"project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"
}
HTTP/1.1 201
Connection: close
Content-Length: 103
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects
{
"name": "test",
"project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
"variables": null
}
@@ -1,14 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/close
@@ -1,83 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes' -d '{"name": "Cloud 1"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes HTTP/1.1
{
"name": "Cloud 1"
}
HTTP/1.1 201
Connection: close
Content-Length: 1608
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:52 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes
{
"interfaces": [
{
"name": "docker0",
"special": true,
"type": "ethernet"
},
{
"name": "lo",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0-nic",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet1",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet2",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet3",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet4",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet8",
"special": true,
"type": "ethernet"
},
{
"name": "wlp58s0",
"special": false,
"type": "ethernet"
}
],
"name": "Cloud 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/builtin/6afa389a-7677-4c7c-9ba4-92c792d58254",
"node_id": "6afa389a-7677-4c7c-9ba4-92c792d58254",
"ports_mapping": [
{
"interface": "wlp58s0",
"name": "wlp58s0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "started"
}
@@ -1,25 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/d65cf983-0042-48a7-866c-e14a2acb09b4/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/d65cf983-0042-48a7-866c-e14a2acb09b4/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}
HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:52 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}
@@ -1,25 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/dff4edfe-a290-47c3-aa89-599e848cdffd/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/dff4edfe-a290-47c3-aa89-599e848cdffd/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}
HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:53 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}
@@ -1,20 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/b4be74c6-88ef-496b-b0d4-988282e777cb/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/b4be74c6-88ef-496b-b0d4-988282e777cb/adapters/0/ports/0/start_capture HTTP/1.1
{
"capture_file_name": "test.pcap",
"data_link_type": "DLT_EN10MB"
}
HTTP/1.1 200
Connection: close
Content-Length: 94
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/tmp/pytest-of-grossmj/pytest-23/test_json4/tmp/captures/test.pcap"
}
@@ -1,14 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/6dcbdc92-435a-4b17-beaf-8ec8ab75a2e3/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/6dcbdc92-435a-4b17-beaf-8ec8ab75a2e3/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture
@@ -1,17 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/321e9656-62f1-4e50-a390-4296f37c9f19/duplicate' -d '{"destination_node_id": "0c4fae0a-6712-4fb2-a85f-713c204de98f"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/321e9656-62f1-4e50-a390-4296f37c9f19/duplicate HTTP/1.1
{
"destination_node_id": "0c4fae0a-6712-4fb2-a85f-713c204de98f"
}
HTTP/1.1 201
Connection: close
Content-Length: 4
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/duplicate
true
@@ -1,38 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes' -d '{"name": "PC TEST 1", "node_id": "f327173c-2a79-4dee-b57f-eb60c907483b", "path": "iou.bin", "startup_config_content": "hostname test"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes HTTP/1.1
{
"name": "PC TEST 1",
"node_id": "f327173c-2a79-4dee-b57f-eb60c907483b",
"path": "iou.bin",
"startup_config_content": "hostname test"
}
HTTP/1.1 201
Connection: close
Content-Length: 614
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes
{
"application_id": 1,
"command_line": "",
"console": 5004,
"console_type": "telnet",
"ethernet_adapters": 2,
"l1_keepalives": false,
"md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
"name": "PC TEST 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/iou/f327173c-2a79-4dee-b57f-eb60c907483b",
"node_id": "f327173c-2a79-4dee-b57f-eb60c907483b",
"nvram": 128,
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"status": "stopped",
"use_default_iou_values": true
}
@@ -1,21 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/8df211ee-c604-4870-b13e-b175a3dff8d7/adapters/1/ports/0/nio' -d '{"ethernet_device": "docker0", "type": "nio_ethernet"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/8df211ee-c604-4870-b13e-b175a3dff8d7/adapters/1/ports/0/nio HTTP/1.1
{
"ethernet_device": "docker0",
"type": "nio_ethernet"
}
HTTP/1.1 201
Connection: close
Content-Length: 64
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{
"ethernet_device": "docker0",
"type": "nio_ethernet"
}
@@ -1,20 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/98f97bfa-322d-425a-ba2e-d03486033ae9/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/98f97bfa-322d-425a-ba2e-d03486033ae9/adapters/0/ports/0/start_capture HTTP/1.1
{
"capture_file_name": "test.pcap",
"data_link_type": "DLT_EN10MB"
}
HTTP/1.1 200
Connection: close
Content-Length: 94
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/tmp/pytest-of-grossmj/pytest-23/test_json4/tmp/captures/test.pcap"
}
@@ -1,14 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/751ce475-5613-443f-8780-5b5972a90129/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/751ce475-5613-443f-8780-5b5972a90129/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture
@@ -1,17 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/8142c124-6d3f-4625-a823-4bf6cc153ab1/duplicate' -d '{"destination_node_id": "71b49bc3-8bd3-4c5f-aea9-5d10e9e6f925"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/8142c124-6d3f-4625-a823-4bf6cc153ab1/duplicate HTTP/1.1
{
"destination_node_id": "71b49bc3-8bd3-4c5f-aea9-5d10e9e6f925"
}
HTTP/1.1 201
Connection: close
Content-Length: 4
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/duplicate
true
@@ -1,14 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/b2581707-0cb5-489c-b5c8-bd3eaacdd553/reload' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/b2581707-0cb5-489c-b5c8-bd3eaacdd553/reload HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/reload
@@ -1,35 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/32cba1e5-0164-45a4-872f-82a5f6ef03a4/start' -d '{"iourc_content": "test"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/32cba1e5-0164-45a4-872f-82a5f6ef03a4/start HTTP/1.1
{
"iourc_content": "test"
}
HTTP/1.1 200
Connection: close
Content-Length: 614
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/start
{
"application_id": 1,
"command_line": "",
"console": 5004,
"console_type": "telnet",
"ethernet_adapters": 2,
"l1_keepalives": false,
"md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
"name": "PC TEST 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/iou/32cba1e5-0164-45a4-872f-82a5f6ef03a4",
"node_id": "32cba1e5-0164-45a4-872f-82a5f6ef03a4",
"nvram": 128,
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"status": "stopped",
"use_default_iou_values": true
}
@@ -1,14 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/e6efba87-de17-4acf-8b20-d87707995a8c/stop' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/e6efba87-de17-4acf-8b20-d87707995a8c/stop HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:54 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/stop
@@ -1,30 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes' -d '{"name": "Nat 1"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes HTTP/1.1
{
"name": "Nat 1"
}
HTTP/1.1 201
Connection: close
Content-Length: 335
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes
{
"name": "Nat 1",
"node_id": "c7f8a476-550c-44a3-8f05-bf466a41269a",
"ports_mapping": [
{
"interface": "virbr0",
"name": "nat0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "started"
}
@@ -1,25 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/4c485c6e-cdbe-4c02-aecb-c2d5e780660a/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/4c485c6e-cdbe-4c02-aecb-c2d5e780660a/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}
HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:55 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}
@@ -1,17 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/ports/udp' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/ports/udp HTTP/1.1
{}
HTTP/1.1 201
Connection: close
Content-Length: 25
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:56 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/ports/udp
{
"udp_port": 10000
}
@@ -1,64 +0,0 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes' -d '{"hda_disk_image": "linux\u8f7d.img", "name": "PC TEST 1", "qemu_path": "/tmp/tmpxudfhxk5/qemu-system-x86_64", "ram": 1024}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes HTTP/1.1
{
"hda_disk_image": "linux\u8f7d.img",
"name": "PC TEST 1",
"qemu_path": "/tmp/tmpxudfhxk5/qemu-system-x86_64",
"ram": 1024
}
HTTP/1.1 201
Connection: close
Content-Length: 1426
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:57 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes
{
"acpi_shutdown": false,
"adapter_type": "e1000",
"adapters": 1,
"bios_image": "",
"bios_image_md5sum": null,
"boot_priority": "c",
"cdrom_image": "",
"cdrom_image_md5sum": null,
"command_line": "",
"console": 5004,
"console_type": "telnet",
"cpu_throttling": 0,
"cpus": 1,
"hda_disk_image": "linux\u8f7d.img",
"hda_disk_image_md5sum": "c4ca4238a0b923820dcc509a6f75849b",
"hda_disk_interface": "ide",
"hdb_disk_image": "",
"hdb_disk_image_md5sum": null,
"hdb_disk_interface": "ide",
"hdc_disk_image": "",
"hdc_disk_image_md5sum": null,
"hdc_disk_interface": "ide",
"hdd_disk_image": "",
"hdd_disk_image_md5sum": null,
"hdd_disk_interface": "ide",
"initrd": "",
"initrd_md5sum": null,
"kernel_command_line": "",
"kernel_image": "",
"kernel_image_md5sum": null,
"legacy_networking": false,
"mac_address": "0c:dd:80:13:88:00",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/996eaefe-4054-4d06-b168-fca77cf51388",
"node_id": "996eaefe-4054-4d06-b168-fca77cf51388",
"options": "",
"platform": "x86_64",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/tmp/tmpxudfhxk5/qemu-system-x86_64",
"ram": 1024,
"status": "stopped",
"usage": ""
}
Loaded 100 of 2443 files, more files were not shown because too many files have changed in this diff. Show more