Compare commits

..

65 Commits

Author SHA1 Message Date
Jeremy Grossmann
a3e85b7041
Merge pull request #2853 from hjicks/master
add support basic support for OpenBSD.
2026-08-18 18:01:15 +02: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
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
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
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
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
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
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
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
YueGuobin
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
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
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
db605120fa
Merge pull request #2741 from Volo6uev/issue-2735/api-base-config
api endpoint implemented
2026-05-31 19:10:55 +02:00
Volobue
9106ac4522 api endpoint implemented 2026-05-18 21:49:01 +03: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
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
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
1424 changed files with 105999 additions and 160831 deletions

View File

@ -1,20 +0,0 @@
# 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
### 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

View File

@ -1,25 +0,0 @@
# 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

View File

@ -1,53 +0,0 @@
# 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

View File

@ -1,148 +0,0 @@
# 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`

View File

@ -1,54 +0,0 @@
---
name: documentation
description: Use this skill when creating or updating technical documentation under docs/ directory for GNS3 server
version: 3.0.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)
- `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)
## 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

View File

@ -1,98 +0,0 @@
---
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

57
.dockerignore Normal file
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
*~

40
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
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

View File

@ -10,7 +10,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.1
- uses: actions/add-to-project@v2
with:
project-url: https://github.com/orgs/GNS3/projects/3
github-token: ${{ secrets.ADD_NEW_ISSUES_TO_PROJECT }}

View File

@ -56,11 +56,11 @@ jobs:
# 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@v4
uses: actions/checkout@v7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@ -88,6 +88,6 @@ jobs:
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"

View File

@ -10,31 +10,59 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKERHUB_ORG: ${{ vars.DOCKERHUB_ORG || 'gns3' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
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
uses: docker/login-action@v3
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
uses: docker/login-action@v3
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 to GitHub Container Registry
run: |
docker build -t ghcr.io/$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):latest .
docker push ghcr.io/$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):latest
- name: Build and push to Docker Hub
run: |
docker build -t gns3/${{ github.event.repository.name }}:latest .
docker push gns3/${{ github.event.repository.name }}:latest
- 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

View File

@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: "gh-pages"
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: 3.9
python-version: 3.8
- name: Merge changes from 3.0 branch
run: |
git config user.name github-actions

View File

@ -4,11 +4,11 @@ on:
push:
branches:
- master
- 3.0
- 2.2
pull_request:
branches:
- master
- 3.0
- 2.2
jobs:
build:
@ -18,20 +18,18 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[ai-copilot,dev]
python -m pip install -r dev-requirements.txt
- name: Install Windows specific dependencies
if: runner.os == 'Windows'
@ -48,4 +46,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest -vv
pytest -vv

20
.gitignore vendored
View File

@ -5,12 +5,6 @@ __pycache__
#py.test
.cache
# environment file
.env
# hypothesis files
.hypothesis
# C extensions
*.so
@ -65,18 +59,4 @@ 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/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/

2
AUTHORS Normal file
View File

@ -0,0 +1,2 @@
Jeremy Grossmann
Julien Duponchelle

503
CHANGELOG
View File

@ -1,92 +1,34 @@
# Change Log
## 3.1.0a1 25/04/2026
## 2.2.61 30/07/2026
* New completely revamped Web interface.
* Add GNS3 Copilot AI agent back-end
* Web-wireshark: packet capture and live traffic analysis in the browser
* Fix using SSL with remote computes. Fixes https://github.com/GNS3/gns3-gui/issues/3733
* Add --url and --branch parameters to update-bundled-web-ui.sh
* Fix bug when custom_adapters is None in port_factory.py
* Have optional body in start node API endpoint
* Fix snapshots after merging
* Potential fix for pull request finding 'CodeQL / Information exposure through an exception'
* Refactored the way snapshots are handled in the server
* fix(symbols): add authentication to symbol raw endpoint
* fix(symbols): add CORS headers to symbol file responses
* Allow to find new project in sub dirs
* Enhancement: Refresh projects list without restarting the GNS3 server
* Fix accessing username in authentication.py
* Improved exception handling and telnet client disconnect
* Use get method for registry_version to avoid KeyError
* Add support for appliance format version 8
* Convert database template fields from PickleType to JSON
* feat(statistics): distinguish open vs closed project nodes
* fix(statistics): handle closed projects where nodes/links are dicts
* feat(controller): extend /statistics API with project, node and link stats
* Use FastAPI Lifespan Events
* feat(link): add control_offset field to LinkStyle
* feat(symbols): add DELETE API for removing custom symbol files
* Enhancement: Re-write current Telnet server implementation using telnetlib3 library
* feat: improve error handling for API configuration errors
* Enhancement Added link type support on the server side
* Ignore HTTPException received when closing a project
* Prevent router to be duplicated when running and add tests
* Fixed issue #1605 regarding Cisco slots causing configs to break
* feat: add VNC WebSocket console support for Docker and QEMU nodes
* Return 405 error for unsupported actions for other node types
* feat(telnet_server): improve error handling and connection management
* fix(telnet): handle connection race condition during broadcast
* Change first() to one_or_none() for image query
* Fix for duplicating Qemu nodes
* Minor optimizations to logic
* Fixed an issue with the server causing errors when uploading large images + Preparation for a smarter check when uploading images
* Implemented a smarter node_type system
* docs: restructure copilot docs and update node tools
* fix(acl): correct endpoint paths for users, groups, and roles
* fix(iou): return 405 error for unsupported suspend operation
* feat(api): enhance max_tokens field with robust null handling
* feat(docs): add AI prompting guide for configuration templates
* Deactivate 'use default IOU values' by default and update RAM/NVRAM values
* Make sure the node shows as stopped when the wrap console cannot be stopped. Ref https://github.com/GNS3/gns3-registry/pull/1010
* chore: update author name and copyright headers
* feat(docs): enhance AI chat API documentation with examples and details
* feat: add .claude directory to gitignore for API key security
* Revert "Fix QEMU serial console artifacts by filtering ANSI CPR responses in …"
* docs: add troubleshooting guide for datetime timezone issue
* Drop support for Python 3.9
* feat: add multi-user concurrency control design document
* docs: add troubleshooting guide for force kill residual processes
* Fixed the path traversal check
* Fix image handling
* Qemu VMs: only compute MD5 checksums for existing disks
* Copy config files and database from a previous version if it exists
* Add enable_http_auth in gns3_server.conf sample
* feat(compute): option to disable compute authentication
* tests(controller,port): short_name finishes successfully when port name is None
* fix(controller,port): handle None port name to prevent TypeError in short_name method
* Sync appliances
* fix(import): unvalidated symlink creation in import_project
* fix(qemu): fix addition of QEMU RNG device causes interface names to change
* fix(qemu): remove trailing space from RNG object argument
* fix: do not start nodes when deleting a project
* fix: correct always-true state check in DockerVM.stop()
## 2.2.60 15/07/2026
* Sync appliances
* Only set IOU images to be executable when importing images
* fix(import): project import does not move images symlinks into place
* Search for system UEFI that is compatible with Python < 3.12
* Add OVMF firmware directory configuration
* Automatically add a Random Number Generator (RNG) device when using uefi option is enabled
* fix(docker): handle container name conflict automatically
* feat(virtualbox): add fallback for VBoxManage executable detection
* feat: simplify port name assignment logic
* feat(ports): add null checks for port name in short name generation
* Remove unneeded rbac_repo in get_templates
* Use lists for tags instead of dicts
* Fix for resizing Qemu VM disks
* feat(templates): safely access settings dict keys
* feat(api): fix ETag handling and JSON serialization in template endpoint
* feat(api): add tag filtering to nodes and templates endpoints
* Update project schema and fix tests
* Add 'created_by' field to track project creator
* Fix updating packet filters
* Add vendor, model and netmiko_device_type fields to templates
* fix: handle RuntimeError in notification_manager emit()
* fix: busybox static link detection on Alpine/musl
* Fix bug when updating compute password to be empty
* Cancel tasks if controller cannot be started
* Enable parallel compression with zstandard. Fixes #2324
* Add Dynamips to Dockerfile dependencies
* Take populated disks into consideration when calculating PCI device ID
* Fix telnet keepalive options on macOS
* fix: gns3-server crashes on startup if "Open this project in the background" is active but there is a problem with that project
* Handle HTTPNotFound exception when retrieving compute status
* Fix: Check compute connectivity before open() during project deletion
* API endpoints to manage base configuration files for templates
## 2.2.59 08/05/2026
* Sync appliances
* Fix snapshot restore does not work after export/import of project
* Warn to use 64-bit IOU images. Fixes #2716 32-bit IOU image support has been removed from the GNS3 VM.
* Fix telnet console silent-proxy hang on non-ConnectionError exit (#2344)
## 2.2.58.1 12/04/2026
@ -114,17 +56,6 @@
* Upgrade dependencies
* Drop Python 3.8 support
## 3.0.6 28/01/2026
* Sync appliances
* Fix creating Qemu disk image. Fixes #2542
* Disable checking for available disk space. Ref #2548
* Set default location of udhcpc in "/etc/network/udhcpc". Fixes #2582
* Support for Python 3.14
* Fix non-ASCII characters in project names
* Increase DB engine pool size and max overflow
* Enable ip cef in IOU L2 and IOU L3 base configs
## 2.2.56 21/01/2026
* Set default location of udhcpc in "/etc/network/udhcpc". Fixes #2582
@ -143,31 +74,6 @@
* Add missing 'nat' template type in schema. Fixes #2529
* Resolve deprecation warnings of regex library
## 3.0.5 14/05/2025
* Bundle web-ui v3.0.5
* Sync appliances
* Use Ubuntu 24.04 LTS in Dockerfile. Ref #2523
* Fix tests and require Qemu version >= 2.4
* Fix adding pci_bridges to qemu vms
* Resolve deprecation warnings of regex library
* Remove OVMF_CODE_4M.secboot.fd and associated code
* Add edk2-stable202502 UEFI firmwares and try to first use firmwares from the ovmf package if installed. Fixes #2494
* Prettify TPM error message
* Fix bug in qemu_stdout message
* Try to detect swtpm and AppArmor issue. Ref https://github.com/GNS3/gns3-gui/issues/3725
* Fix Docker logs decoding. Ref #2522
* Add delay after starting a Docker container and adding connections in uBridge. Ref #2522
* Fix TypeError when reading Docker container logs. Ref #2522
* Allow an image to be uploaded to the controller again even if it is already in the database
* Fix controller not reporting an error if invalid options are passed to Qemu command line. Fixes #2517
* Replace "Docker hub" by "Docker repository" because it is possible to use different repositories
* Fix unable to add NAT cloud after configuring “allowed_interfaces” in configuration file. Fixes #2508
* Fix interface information API endpoint for Cloud/NAT devices
* Upgrade Jinja2 to v3.1.6. Fixes #2515
* Fix packet capture for links connected to a cloud node. Fixes #2513
* fix: check if remote-install.sh is being run as root
## 2.2.54 21/04/2025
* Bundle web-ui v2.2.54
@ -182,24 +88,6 @@
* Improvements for remote-install.sh
## 3.0.4 25/02/2025
* Require minimum 8 characters for passwords
* Bundle web-ui v3.0.4
* Upgrade dependencies
* Fix auto idle-pc for IOS templates
* Update schemas to add constraints for values like ram, nvram etc.
* Install custom symbols. Fixes #2492
* Fix VMware add ubridge connection. Fixes #2490
## 3.0.3 22/01/2025
* Bundle web-ui v3.0.3
* Refactor command line arguments parsing
* Fix capture on IOU/IOL links. Fixes #2477
* Use Python 3.9 to publish API documentation
* Upgrade dependencies
## 2.2.53 21/01/2025
* Bundle web-ui v2.2.53
@ -210,33 +98,6 @@
* Update remote-install.sh to support a custom repository and the deb822 source format
* Fix: do not use the iourc file if IOU licence check is not enabled
## 3.0.2 03/01/2025
* Bundle web-ui v3.0.2
* Support to create templates based on image checksums.
* Improvements for installing built-in disks.
* Use watchdog instead of watchfiles to monitor for new images on the file system
* Drop Python 3.8
* Replace python-jose library by joserfc
* Upgrade dependencies
* Remove blocking IOU phone home call.
## 3.0.1 27/12/2024
* Bundle web-ui v3.0.1
* Allow for upgrading built-in disks
* Fix config parsing when configuring server protocol. Fixes https://github.com/GNS3/gns3-gui/issues/3681
* Update empty Qemu disks with correct MD5 checksums
* Increase timeout to run compute HTTP queries. Fixes #3453
## 3.0.0 20/12/2024
* Bundle web-ui v3.0.0
* Use static favicon for API docs. Ref #3674
* Configure self-hosting JavaScript and CSS for docs
* Fix project auto open feature. Fixes #2455
* Store IOU licence in the secrets directory and disable the check by default
* Require "Project.Audit" permission to duplicate a project and check if "Project.Allocate" permission for the destination.
## 2.2.52 02/12/2024
@ -246,21 +107,6 @@
* Overwrite user resources when the originals have changed.
* Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy
## 3.0.0rc2 20/11/2024
* Bundle web-ui v3.0.0rc2
* Fix error 500 on PUT for cloud, nat, vmware and vpcs nodes. Fixes #2426
* Add a duplicated project in the same resource pools as the original project if it is in any
* Upgrade FastAPI to v0.115.5
* Overwrite user resources when the originals have changed.
* Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy
* Increase SQLite timeout. Ref #2422
* Fix test user with wrong creds
* Upgrade dependencies and fix Pydantic warnings
* Upgrade aiohttp to v3.10.10. Fixes #2411
* Replace aiohttp.web.HTTPConflict()
* Python 3.13 support
## 2.2.51 07/11/2024
* Catch error when cannot resize Docker container TTY.
@ -285,12 +131,6 @@
* Support for configuring MAC address in Docker containers
* Upgrade aiohttp to v3.10.3
## 3.0.0rc1 11/08/2024
* Bundle web-ui v3.0.0rc1
* Convert topologies < 3.0 to have valid node hostnames
* Fix to access resources_path and install_builtin_appliances settings
## 2.2.49 06/08/2024
* Bundle web-ui v2.2.49
@ -312,17 +152,6 @@
* Upgrade sentry-sdk, psutil and aiofiles packages
* Fix check for IPv6 enabled on host
## 3.0.0b3 19/05/2024
* Bundle web-ui v3.0.0b3
* Fix to allow duplicating IOS routers
* Fix to allow changing the auxiliary console for IOS router nodes.
* Replace deprecated method datetime.utcnow()
* Upgrade FastAPI to v0.111.0
* Fix reset console for non running IOU devices
* Do not allow to create a builtin template using the API.
* Use cryptography backend for python-jose. Ref #2372
## 2.2.47 15/05/2024
* Fix update-bundled-web-ui.sh script
@ -345,19 +174,6 @@
* Fix cannot stop Docker VM while console connection is still active.
* Upgrade sentry-sdk to version 1.40.6
## 3.0.0b2 07/04/2024
* Bundle web-ui v3.0.0b2
* Fix cannot stop Docker VM while console connection is still active.
* Support for custom Qemu path in templates and nodes
* Fix CPU fractional values for Docker VMs.
* Use bcrypt directly instead of passlib
* Update CORS policy
* Do not stop searching for Qemu binaries if one binary cannot be executed. Ref #2306
* Fix Ethernet switch and Ethernet hub port validations. Fixes #2334
* Update CORS policy
## 2.2.46 26/02/2024
* Bundle web-ui v2.2.46
@ -382,29 +198,6 @@
* Add custom executable paths on Windows
* Upgrade sentry-sdk and aiohttp
## 3.0.0b1 27/11/2023
* Bundle web-ui v3.0.0b1
* Upgrade sentry-sdk to v1.37.1
* Upgrade aiohttp to v3.9.1
* Fix bug when listing endpoints for opened project
* Make images executable after importing a project
* Disable IOS hostname check for Dynamips ghost instances
## 3.0.0a6 15/11/2023
* Bundle web-ui v3.0.0a6
* Upgrade to aiohttp v3.9.0rc0
* Install Docker resources in writable location
* Default compute username is "gns3"
* Non-blocking checksums computation when server starts. Fixes #2228
* Fix timeout issue when creating Qemu disk image. Fixes https://github.com/GNS3/gns3-server/issues/2313
* Fix broken link to Web UI in 3.0 branch. Fixes #2312
* Fix sample config: VMware section declared twice. Fixes #2311
* Fix ws console and packet capture over SSL
* Support for web socket console over HTTPS
* Allow disabling hardware virtualization check
## 2.2.44.1 07/11/2023
* Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228
@ -424,78 +217,6 @@
* Add Python 3.12 support.
* Fix issue with importlib.resources.files() and Python 3.9
## 3.0.0a5 27/10/2023
* Bundle web-ui v3.0.0a5
* Fix L2IOU "failed code signing checks" when IOU base file name is >= 63 characters
* Python 3.12 support
* Add igb Qemu adapter
* Change "ip cef" to "no ip cef" in IOU default configs. Fixes #2298
* Drop support for Python 3.7 and upgrade dependencies
* Fix compute authentication for websocket endpoints
* Add Qemu IGB network device
## 3.0.0a4 18/10/2023
* Bundle web-ui v3.0.0a4
* Do not enforce Compute.Audit and Template.Audit privileges due to current web-ui limitations
* Support to create empty disk images on the controller
* Fix issue with importlib.resources.files() and Python 3.9
* New RBAC system with resource pools support.
* Use controller vars file to store version and appliance etag
* Pydantic v2 migration
* Allow connection to ws console over IPv6
* Allow computes to be dynamically or manually allocated
* Add UEFI boot mode option for Qemu VMs
* Mark VMware and VirtualBox support as deprecated
* Make port name for custom adapters optional. Fixes https://github.com/GNS3/gns3-web-ui/issues/1430
* Support for database schema migrations using alembic
* Add config option to change the server name. Ref #2149
* Option to disable image discovery and do not scan parent directory
* Allow raw images by default. Fixes https://github.com/GNS3/gns3-server/issues/2097
* Fix bug when creating Dynamips router with chassis setting
* Stricter checks to create/update an Ethernet switch and add tests
* Fix schema for removing WICs from Cisco routers. Fixes #3392
* Fix some issues with HTTP notification streams
* API endpoint to get the locked status of a project
* Global project lock and unlock
* Require name for custom adapters. Fixes #2098
* Allow empty adapter slots for Dynamips templates. Ref https://github.com/GNS3/gns3-gui/issues/3373
* Custom adapters should not be in node (compute) properties returned to clients. Fixes https://github.com/GNS3/gns3-gui/issues/3366
* Optionally allow Qemu raw images
* Ignore image detection for IOU user libraries in image directory
* Checks for valid hostname on server side for Dynamips, IOU, Qemu and Docker nodes
* Only check files (not directories) when looking for new images on file system.
* Support user defined loader/libraries to run IOU
* Remove explicit Response for VPCS endpoints returning HTTP 204 status code
* Remove explicit Response for endpoints returning HTTP 204 status code
* Make 'vendor_url' and 'maintainer_email' optional for template validation.
* Allow auth token to be passed as a URL param
* Add controller endpoints to get VirtualBox VMs, VMware VMs and Docker images
* 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
* Support delete Qemu disk image from API Return the real disk image name in the 'hdx_disk_image_backed' property for Qemu VMs
* Fix ComputeConflictError import
* Handle creating Qemu disk images and resizing
* Finish to clean up local setting usage. Ref #1460
* "Local" command line parameter is only for stopping a server that has been started by the desktop GUI
* Fix AsyncSession handling after breaking changes in FastAPI 0.74.0 See https://github.com/tiangolo/fastapi/releases/tag/0.74.0 for details.
* Detect image type instead of requesting it from user
* Add connect endpoint for computes Param to connect to compute after creation Report compute unauthorized HTTP errors to client
* Replace CORS origins by origin regex
* Allow empty compute_id. Ref #1657
* Secure controller to compute communication using HTTP basic authentication
* Secure websocket endpoints
* Allocate compute when compute_id is unset
* Return the current controller hostname/IP from any compute
* Remove Qemu legacy networking support
* Appliance management refactoring: * Install an appliance based on selected version * Each template have unique name and version * Allow to download an appliance file
* Add isolate and unisolate endpoints. Ref https://github.com/GNS3/gns3-gui/issues/3190
* Allow images to be stored in subdirs and used by templates.
* Use uuid5 to create new compute_id. Fixes #1641 #1887
* Migrate PCAP streaming code to work with FastAPI.
* Refactor WebSocket console code to work with FastAPI. Fix endpoint routes.
## 2.2.43 19/09/2023
* Force English output for VBoxManage. Fixes #2266
@ -578,28 +299,6 @@
* Only use importlib_resources for Python <= 3.9. Fixes #2147
* Support when the user field defined in Docker container is an ID. Fixes #2134
## 3.0.0a3 27/12/2022
* Add web-ui v3.0.0a3
* Add config option to change the server name. Ref #2149
* Option to disable image discovery and do not scan parent directory
* Allow raw images by default. Fixes https://github.com/GNS3/gns3-server/issues/2097
* Fix bug when creating Dynamips router with chassis setting
* Stricter checks to create/update an Ethernet switch and add tests
* Fix schema for removing WICs from Cisco routers. Fixes #3392
* Fix issues with VMnet interface on macOS >= 11.0. Ref #3381
* Use importlib_resources instead of pkg_resources and install built-in appliances in config dir.
* Fix console vnc don't use configured ports in some case. Fixes #2111
* Add missing VMware settings in gns3_server.conf
* Make version PEP 440 compliant
* Support for Python 3.11
* Allow for more dependency versions at patch level
* Replace deprecated distro.linux_distribution() call
* Update gns3.service.systemd
* Fix some issues with HTTP notification streams
* gns3.service.openrc: make openrc script posix compliant
* fix: use exact match to find interface in windows to avoid get wrong interface
## 2.2.35.1 10/11/2022
* Re-release Web-Ui v2.2.35
@ -619,154 +318,6 @@
* gns3.service.openrc: make openrc script posix compliant
* fix: use exact match to find interface in windows to avoid get wrong interface
## 3.0.0a2 06/09/2022
* Add web-ui v3.0.0a2
* Upgrade FastAPI to v0.82.0
* API endpoint to get the locked status of a project
* Global project lock and unlock
* Update appliance files
* Require name for custom adapters. Fixes #2098
* Allow empty adapter slots for Dynamips templates. Ref https://github.com/GNS3/gns3-gui/issues/3373
* Use original $PATH in init.sh for Docker containers. Ref #2069
## 3.0.0a1 04/08/2022
* Bundle gns3-web-ui v3.0.0a1
* Use default symbol theme if none is provided when loading appliances
* Allow default symbol theme to be configured in config file
* Optionally allow Qemu raw images
* Ignore image detection for IOU user libraries in image directory
* Don't show optional token param in API docs
* Fix check for 32-bit in ELF header
* Checks for valid hostname on server side for Dynamips, IOU, Qemu and Docker nodes
* Only check files (not directories) when looking for new images on file system.
* Support user defined loader/libraries to run IOU
* Make 'vendor_url' and 'maintainer_email' optional for template validation.
* Allow auth token to be passed as a URL param
* HTTP middleware create issues when streaming project archive
* Add zstandard compression support for project export
* Make sure that the temporary image file is removed after uploading an image
* Do not cache to md5sum file in some situations
* 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
* Support delete Qemu disk image from API Return the real disk image name in the 'hdx_disk_image_backed' property for Qemu VMs
* Handle creating Qemu disk images and resizing
* Finish to clean up local setting usage. Ref #1460
* "Local" command line parameter is only for stopping a server that has been started by the desktop GUI
* Fix AsyncSession handling after breaking changes in FastAPI 0.74.0 See https://github.com/tiangolo/fastapi/releases/tag/0.74.0 for details.
* Detect image type instead of requesting it from user
* Drop Python 3.6 support and require Python >= 3.7
* Drop Windows support
* Add connect endpoint for computes Param to connect to compute after creation Report compute unauthorized HTTP errors to client
* Replace CORS origins by origin regex
* Change default config settings
* Update Docker image for tests
* Fix calls to static methods in server.py
* Do not require the local server param to open a .gns3 file. Fixes https://github.com/GNS3/gns3-gui/issues/2421 Ref #1460
* Do not automatically install appliance after uploading image
* Ignore OSError when closing websocket
* Allow empty compute_id. Ref #1657
* Secure controller to compute communication using HTTP basic authentication
* Secure websocket endpoints
* Fix issue when updating a template
* Allocate compute when compute_id is unset
* Return the current controller hostname/IP from any compute
* Remove Qemu legacy networking support
* Add a custom version to an appliance
* Appliance management refactoring: * Install an appliance based on selected version * Each template have unique name and version * Allow to download an appliance file
* Finalize image management refactoring and auto install appliance if possible
* Sqlite doesn't allow BigInteger to be used as an primary key with autoincrement
* Add isolate and unisolate endpoints. Ref https://github.com/GNS3/gns3-gui/issues/3190
* Small db tables adjustments
* Add index for "name" field in role table
* Allow images to be stored in subdirs and used by templates.
* Option to prune images when deleting template.
* Associate images when creating or updating a template.
* Add prune images endpoint. Use many-to-many relationship between images and templates.
* Check if user has the right to add a permission
* Only use the necessary HTTP methods for default permissions
* Add /permissions/prune to delete orphaned permissions
* Check a permission matches an existing route before it is allowed to be created.
* Remove busybox and copy system busybox in setup.py
* Save image size + start to automatic template creation based on image checksum.
* Upgrade dependencies
* Fix "-machine accel=tcg" check
* Allow logged in user to change some of its data. Administrators can lock users using the `is_active` field.
* Symbols endpoints (except upload) don't require authentication.
* Update to the udhcpc wrapper script. Ref #1890
* Fix link style merge
* Start refactoring for images management
* Allow controller to be reloaded using the API. Fixes #1743
* Use a stock BusyBox for the Docker Integration
* Move "/{project_id}/templates/{template_id}" endpoint.
* Add last login info for users.
* Change RBAC field names from builtin to is_builtin
* Add user permissions + RBAC tests.
* Add description for user permission.
* Save/restore appliances Etag.
* Allow to set the initial super admin username / password in server config file. Ref #1857
* Require authentication for get_user_memberships endpoint.
* Change method to prevent forbidden directory traversal. Ref #1894
* Add user groups support.
* Add delete cascade on foreign keys for appliance table
* Enable SQL foreign key support for SQLite
* Add missing CORS origins.
* Show topology path when check topology schema fails.
* Protect controller notification endpoints. Ref #1888 (WebSocket endpoint is not secured, it takes an optional token).
* Use uuid5 to create new compute_id. Fixes #1641 #1887
* Protect the API and add alternative authentication endpoint.
* Secure users API and handle manual password recovery.
* Add default super admin account in controller db.
* Complete type annotations for API endpoints.
* Detect the app is exiting and avoid reconnecting to computes.
* Move schemas between compute and controller subpackages
* Remove traceng code.
* Move error responses to API routers.
* Wait for local compute to be started. Don't reconnect to local compute when server is being stopped.
* 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.
* Generate new config for each test. Fixes tests.
* Use Pydantic to validate the server config file.
* Add symbol dimensions endpoint and SSL support for packet capture with remote HTTPS server.
* Save computes to database
* Generate a new list in template schema defaults.
* Generate JWT secret key if none is configured in the config file. Change location of the database.
* User authentication with tests.
* Refactor tests and start work on database integration.
* Move endpoints to routes & preparations to use a database.
* Providing the path to create a project is now deprecated.
* Add back script to create a self-signed SSL certificate.
* Make sure all HTTP exceptions return JSON with a "message" field instead of "detail"
* Make Swagger Ui the default for API documentation
* Move to version 3 of the REST API. Rename packet capture endpoints.
* Use pydantic for data validation (instead of jsonschema) Fix/improve various pydantic schema models.
* Automate API documentation publishing.
* Publish API documentation generated by FastAPI.
* Overwrite uvicorn loggers.
* Do not automatically connect to local compute.
* Add HTTP client to reuse the aiohttp session where needed. Remove unnecessary aiohttp exceptions.
* Warn not to use the private compute API. Fixes #1593.
* Migrate PCAP streaming code to work with FastAPI.
* Refactor WebSocket console code to work with FastAPI. Fix endpoint routes.
* Use dependencies and group common HTTP responses in endpoints.
* Migration to FastAPI
* Prioritize the config disk over HD-D for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/3036
* Create config disk property false by default for Qemu templates
* 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.
* Add explicit option to automatically create or not the config disk. Off by default.
* Auxiliary console support for Qemu. Ref #2873 Improvements for auxiliary console support for Docker and Dynamips.
* Fix AUX console not allocated for Dynamips IOS routers.
* Disallow to rename a running node. Fixes https://github.com/GNS3/gns3-gui/issues/2499
* Support to reset all console connections. Ref https://github.com/GNS3/gns3-server/issues/1619
* Support to reset links. Fixes https://github.com/GNS3/gns3-server/issues/1620
* Add maxcpus property for Qemu VMs. Ref #1674
* QEMU config disk support
* Read folder structure correctly for custom symbols. Fixes https://github.com/GNS3/gns3-gui/issues/2856
* 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
* Resource constraints for Docker VMs.
* Update IOUtools. Ref #1627
* Use parent directory as working directory for project duplication and snapshots. Fixes https://github.com/GNS3/gns3-gui/issues/2909
* 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).
## 2.2.34 28/08/2022
* Use original $PATH in init.sh for Docker containers. Ref #2069

View File

@ -1,37 +1,38 @@
FROM ubuntu:noble
# Dockerfile for GNS3 server development
WORKDIR /gns3server
FROM ubuntu:24.04
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
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
# this environment is externally managed
ENV PIP_BREAK_SYSTEM_PACKAGES=1
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 \
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-all \
python3-setuptools \
python3-dev \
busybox-static \
gcc \
qemu-system-x86 \
qemu-kvm \
libvirt-daemon-system
libvirt-daemon-system libvirt-clients \
x11vnc
RUN add-apt-repository ppa:gns3/ppa && apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
vpcs \
ubridge \
dynamips
RUN locale-gen en_US.UTF-8
COPY . /gns3server
# Install uninstall to install dependencies
RUN apt-get install -y vpcs ubridge dynamips
RUN mkdir -p ~/.config/GNS3/3.0/
RUN cp scripts/gns3_server.conf ~/.config/GNS3/3.0/
ADD . /server
WORKDIR /server
RUN python3 -m pip install --break-system-packages .
RUN pip3 install --no-cache-dir -r /server/requirements.txt
EXPOSE 3080
CMD [ "python3", "-m", "gns3server", "--port", "3080" ]

View File

@ -1,7 +1,11 @@
include README.md
include AUTHORS
include LICENSE
include CHANGELOG
recursive-include gns3server *
include MANIFEST.in
include requirements.txt
include conf/*.conf
recursive-include tests *
recursive-exclude docs *
recursive-include gns3server *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

View File

@ -1,370 +0,0 @@
# 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.

377
README.md
View File

@ -1,158 +1,114 @@
# GNS3 server repository
GNS3-server
===========
[![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.0)](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)
[![image](https://github.com/GNS3/gns3-server/workflows/testing/badge.svg)](https://github.com/GNS3/gns3-server/actions?query=workflow%3Atesting)
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.
[![image](https://img.shields.io/pypi/v/gns3-server.svg)](https://pypi.python.org/pypi/gns3-server)
## Installation
[![image](https://snyk.io/test/github/GNS3/gns3-server/badge.svg)](https://snyk.io/test/github/GNS3/gns3-server)
These instructions are for using GNS3, please see below for development.
This is the GNS3 server repository.
### Windows & macOS
The GNS3 server manages emulators such as Dynamips, VirtualBox or
Qemu/KVM. 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 an HTTP REST API.
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).
Software dependencies
---------------------
### Linux
In addition of Python dependencies listed in a section below, other
software may be required, recommended or optional.
#### Ubuntu based distributions
- [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
connectitivy tests using ping, traceroute etc.
- Qemu is strongly recommended on Linux, as most node types are based
on Qemu, for example Cisco IOSv and Arista vEOS.
- libvirt is recommended (Linux only), as it\'s needed for the NAT
cloud.
- Docker is optional (Linux only), 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 (Linux only), they
are only needed to run IOU based nodes.
We build and test packages for actively supported Ubuntu versions.
Other distros based on Ubuntu, like Mint, should also be supported.
### Docker support
Packages can be installed from our Personal Package Archives (PPA) repository:
Docker support 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).
```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
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.3 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>
- Alpine:
<https://pkgs.alpinelinux.org/package/v3.10/community/x86_64/gns3-server>
- NixOS:
<https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=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.8, setuptools and the ones listed
[here](https://github.com/GNS3/gns3-server/blob/master/requirements.txt)
The following commands will install some of these dependencies:
``` {.bash}
sudo apt-get install python3-setuptools python3-pip
```
#### Other Linux distributions
Finally, these commands will install the server as well as the rest of
the dependencies:
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 Copilot** (Optional):
```shell
python3 -m pip install gns3-server[ai-copilot]
```
AI-powered assistant for network topology design and automation.
**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-copilot,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 Copilot:**
To remove AI Copilot dependencies:
```shell
gns3server-uninstall-ai-copilot
```
This will remove all AI Copilot dependencies while keeping the core functionality intact. The server will continue to work, but AI features will return a 501 (Not Implemented) status code.
The downside of this method is you will have to manually install all dependencies (see below).
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.0
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
``` {.bash}
cd gns3-server-master
python3 -m pip install -r requirements.txt
python3 -m pip install .
python3 -m gns3server
gns3server
```
**For AI Copilot development**, install with additional dependencies:
To run tests use:
```shell
python3 -m pip install .[ai-copilot,dev]
``` {.bash}
python3 -m pytest tests
```
**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
For development, you can run the GNS3 server in a container
```shell
``` {.bash}
bash scripts/docker_dev_server.sh
```
@ -162,36 +118,145 @@ bash scripts/docker_dev_server.sh
docker compose up -d
```
### Run as daemon (Unix only)
You will find init sample scripts for various systems inside the init
directory.
Useful 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 init scripts require the creation of a GNS3 user. You can change it
to another user.
``` {.bash}
sudo adduser gns3
```
upstart
-------
For ubuntu < 15.04
You need to copy init/gns3.conf.upstart to /etc/init/gns3.conf
``` {.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
``` {.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/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
``` {.bash}
python setup.py install
```
to install the remaining dependencies.
To run the tests, you also need to call
``` {.bash}
pip install pytest pytest-capturelog
```
before actually running the tests with
``` {.bash}
python setup.py test
```
or with
``` {.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 these instructions with virtualenvwrapper:
<http://virtualenvwrapper.readthedocs.org/> and homebrew:
<http://brew.sh/>.
``` {.bash}
brew install python3
mkvirtualenv gns3-server --python=/usr/local/bin/python3.5
python3 setup.py install
gns3server
```
SSL
---
If you want enable SSL support on GNS3 you can generate a self signed
certificate:
``` {.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:
``` {.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:
``` {.ini}
[Server]
certfile=/Users/noplay/.config/GNS3/ssl/server.cert
certkey=/Users/noplay/.config/GNS3/ssl/server.key
ssl=True
```
### Running tests
First, install the development dependencies:
Just run:
```shell
python3 -m pip install -r dev-requirements.txt
``` {.bash}
py.test -vv
```
Then run the tests using pytest:
If you want test coverage:
```shell
python3 -m pytest -vv tests/
``` {.bash}
py.test --cov-report term-missing --cov=gns3server
```
### API documentation
Security issues
---------------
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.
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

View File

@ -1,46 +0,0 @@
# ==============================================================================
# GNS3 Copilot AI Agent Dependencies
# ==============================================================================
# Install with: pip install gns3-server[ai-copilot]
# 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.2.16
langgraph>=1.0.9
langgraph-checkpoint>=4.0.0
langgraph-checkpoint-sqlite>=3.0.3
langgraph-checkpoint-postgres>=3.0.4
# Model Providers
langchain-openai>=1.1.10
langchain-anthropic>=1.3.4
langchain-google-genai>=4.2.1
langchain-aws>=1.3.1
langchain-ollama>=1.0.1
langchain-deepseek>=1.0.1
langchain-xai>=1.2.2
# Token Counting
tiktoken>=0.8.0
# LangSmith SDK
langsmith>=0.7.7
# Network Automation
netmiko>=4.6.0
nornir>=3.5.0
nornir-netmiko>=1.0.1
nornir-utils>=0.2.0
nornir-salt>=0.23.0
# Environment & Configuration
python-dotenv>=1.2.1
# Authentication
PyJWT>=2.10.1
psycopg-pool>=3.1.0
# Note: httpx is only for testing (in dev-requirements.txt)

View File

@ -1,45 +1,17 @@
[Controller]
; Options for JWT tokens (user authentication)
jwt_secret_key = efd08eccec3bd0a1be2e086670e5efa90969c68d07e072d7354a76cea5e33d4e
jwt_algorithm = HS256
jwt_access_token_expire_minutes = 1440
; Initial default super admin username
; It cannot be changed once the controller has started once
default_admin_username = admin
; Initial default super admin password
; It cannot be changed once the controller has started once
default_admin_password = admin
[Server]
; Server name, default is what is returned by socket.gethostname()
name = GNS3_Server
; What protocol the server uses (http or https)
protocol = http
; IP where the server listen for connections
host = 0.0.0.0
; HTTP port for controlling the servers
port = 3080
; Secrets directory
secrets_dir = /home/gns3/.config/GNS3/secrets
; Options to enable SSL encryption
enable_ssl = False
certfile = /home/gns3/.config/GNS3/ssl/server.cert
certkey = /home/gns3/.config/GNS3/ssl/server.key
; 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 binary images are stored
images_path = /home/gns3/GNS3/images
; Additional paths to look for images
additional_images_paths = /opt/images;/mnt/disk1/images
; Path where user projects are stored
projects_path = /home/gns3/GNS3/projects
@ -49,25 +21,11 @@ appliances_path = /home/gns3/GNS3/appliances
; Path where custom user symbols are stored
symbols_path = /home/gns3/GNS3/symbols
; Path where custom configs are stored
configs_path = /home/gns3/GNS3/configs
; Path where files like built-in appliances and Docker resources are stored
; The default path is the local user data directory
; (Linux: "~/.local/share/GNS3", macOS: "~/Library/Application Support/GNS3", Windows: "%APPDATA%\GNS3")
; resources_path = /home/gns3/GNS3/resources
; Default symbol theme
; Currently available themes are "Classic", Affinity-square-blue", "Affinity-square-red"
; "Affinity-square-gray", "Affinity-circle-blue", "Affinity-circle-red" and "Affinity-circle-gray"
default_symbol_theme = Affinity-square-blue
; Option to enable or disable raw images to be uploaded to the server
allow_raw_images = True
; Option to automatically discover images in the images directory
auto_discover_images = True
; Option to automatically send crash reports to the GNS3 team
report_errors = True
@ -91,13 +49,12 @@ udp_end_port_range = 30000
; uBridge executable location, default: search in PATH
;ubridge_path = ubridge
; Option to enable or disable compute HTTP authentication
enable_http_auth = True
; Username for compute HTTP authentication, "gns3" is the default if not specified
compute_username = gns3
; Password for compute HTTP authentication, a randomly generated password is used if not specified
compute_password = gns3
; Option to enable HTTP authentication.
auth = False
; Username for HTTP authentication.
user = gns3
; Password for HTTP authentication.
password = gns3
; Only allow these interfaces to be used by GNS3, for the Cloud node for example (Linux/OSX only)
; Do not forget to allow virbr0 in order for the NAT node to work
@ -135,44 +92,22 @@ 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
[VirtualBox]
; Path to the VBoxManage binary used to manage VirtualBox
vboxmanage_path = vboxmanage
[Qemu]
; !! Remember to add the gns3 user to the KVM group, otherwise you will not have read / write permissions to /dev/kvm !! (Linux only, has priority over enable_hardware_acceleration)
enable_kvm = True
; Require KVM to be installed in order to start VMs (Linux only, has priority over require_hardware_acceleration)
require_kvm = True
; Enable hardware acceleration (all platforms)
enable_hardware_acceleration = True
; Require hardware acceleration in order to start VMs (all platforms)
require_hardware_acceleration = False
; Allow unsafe additional command line options
allow_unsafe_options = False
; Path to the OVMF firmware directory
ovmf_firmware_dir = "/usr/share/OVMF"
[VMware]
; Path to vmrun binary used to manage VMware
vmrun_path = vmrun
; First vmnet interface of the range that can be managed by the GNS3 server
vmnet_start_range = 2
; Last vmnet interface of the range that can be managed by the GNS3 server. It must be maximum 19 on Windows.
vmnet_end_range = 255
; block network traffic originating from the host OS
block_host_traffic = False
[Qemu]
; Use Qemu monitor feature to communicate with Qemu VMs
enable_monitor = True
; IP used to listen for the monitor
monitor_host = 127.0.0.1
; !! Remember to add the gns3 user to the KVM group, otherwise you will not have read / write permissions to /dev/kvm !!
; Enable hardware acceleration (all platforms)
enable_hardware_acceleration = True
; Require hardware acceleration in order to start VMs
require_hardware_acceleration = False
; Allow unsafe additional command line options
allow_unsafe_options = False
[WebWireshark]
; Enable Web Wireshark feature (container-based Wireshark in browser)
enabled = True
; Docker image for Web Wireshark container
image = gns3/web-wireshark:latest
; Docker network subnet for Web Wireshark containers (default: 172.31.0.0/22)
; Change this if it conflicts with your existing network
network_subnet = 172.31.0.0/22
; Memory limit per container (e.g., "1g", "2g", "512m")
memory = 2g
; CPU cores per container (e.g., 1.0, 2.0)
cpus = 1.0
; Process limit per container
pids_limit = 1000

View File

@ -1,7 +1,6 @@
pytest==9.0.3 # fix CVE-2025-71176; Python 3.10+ required
-rrequirements.txt
pytest==8.4.2 # version 8.4.2 is the last one supporting Python 3.9
flake8==7.3.0
pytest-timeout==2.4.0
pytest-asyncio==1.2.0; python_version == '3.9' # version 1.2.0 is the last one supporting Python 3.9
pytest-asyncio==1.3.0; python_version >= '3.10'
httpx==0.28.1
httpx_ws==0.7.2 # upgrading leads to failures in tests
pytest-aiohttp==1.1.0

View File

@ -1,15 +0,0 @@
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

View File

@ -1 +0,0 @@
apiv3.gns3.net

View File

@ -1,443 +0,0 @@
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
docs/Makefile Normal file
View File

@ -0,0 +1,177 @@
# 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."

View File

@ -1,120 +0,0 @@
<!--
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
│ ├── 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)
├── 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
### 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.
---
## 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)
---
## 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-04-20_

View File

@ -0,0 +1,14 @@
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: Wed, 08 Jan 2020 02:26:17 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/a022e62a-a40b-42a5-8efd-3d8141806276'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/a022e62a-a40b-42a5-8efd-3d8141806276 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:49 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/8a5e5e38-6a8a-408a-9d8c-31315e11d6f2/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/8a5e5e38-6a8a-408a-9d8c-31315e11d6f2/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:43 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c5e6e56f-2698-4bae-9365-0a9f9efd3418/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c5e6e56f-2698-4bae-9365-0a9f9efd3418/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:50 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/81f7488a-6a28-46f0-8b26-331906bdcf2e'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/81f7488a-6a28-46f0-8b26-331906bdcf2e HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:57 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/04e77370-e8a1-4c6c-9c2a-d7d9076a6f63/adapters/1/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/04e77370-e8a1-4c6c-9c2a-d7d9076a6f63/adapters/1/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:59 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/b77c05e8-dd60-4772-aedf-066339baee14'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/b77c05e8-dd60-4772-aedf-066339baee14 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:16 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/bd5f949e-b288-4e5f-97c7-f6a053898140/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/bd5f949e-b288-4e5f-97c7-f6a053898140/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:10 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/55307537-62a4-48ab-ac1c-ebd998794120'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/55307537-62a4-48ab-ac1c-ebd998794120 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:40 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/ab332598-68ef-4ef6-bb29-d2f31a961273/adapters/1/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/ab332598-68ef-4ef6-bb29-d2f31a961273/adapters/1/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:50 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/36979ca4-4892-4b3e-9202-2143e261d128'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/36979ca4-4892-4b3e-9202-2143e261d128 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:26 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/09736166-0e3a-4fe5-b914-72151a6362e2/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/09736166-0e3a-4fe5-b914-72151a6362e2/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:26 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/a0d3abeb-9538-4660-a6e5-677822f8f943/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/a0d3abeb-9538-4660-a6e5-677822f8f943/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:28 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/90f57222-bdca-4d92-867c-de3f945f83f5/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/90f57222-bdca-4d92-867c-de3f945f83f5/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:42 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/vmware/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/f84fd457-cc5c-4eb9-88b8-3ac691d1fe52'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/f84fd457-cc5c-4eb9-88b8-3ac691d1fe52 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:48 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

View File

@ -0,0 +1,14 @@
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/358e43b9-c971-4a31-a42a-b62d18342bc6/adapters/0/ports/0/nio'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/358e43b9-c971-4a31-a42a-b62d18342bc6/adapters/0/ports/0/nio HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:48 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -0,0 +1,34 @@
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: Wed, 08 Jan 2020 02:25:43 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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.2.4dev1"
}

View File

@ -0,0 +1,22 @@
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: Wed, 08 Jan 2020 02:25:59 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/iou/images
[
{
"filename": "iou.bin",
"filesize": 7,
"md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
"path": "iou.bin"
}
]

View File

@ -0,0 +1,79 @@
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: 1601
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:16 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/network/interfaces
[
{
"id": "docker0",
"ip_address": "172.17.0.1",
"mac_address": "02:42:0f:c7:42:69",
"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": "52:54:00:d4:71:01",
"name": "virbr0",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "virbr0-nic",
"ip_address": "",
"mac_address": "52:54:00:d4:71:01",
"name": "virbr0-nic",
"netmask": "",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet1",
"ip_address": "172.16.9.1",
"mac_address": "00:50:56:c0:00:01",
"name": "vmnet1",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "vmnet8",
"ip_address": "192.168.193.1",
"mac_address": "00:50:56:c0:00:08",
"name": "vmnet8",
"netmask": "255.255.255.0",
"special": true,
"type": "ethernet"
},
{
"id": "wlp2s0",
"ip_address": "192.168.1.175",
"mac_address": "9c:b6:d0:99:3c:07",
"name": "wlp2s0",
"netmask": "255.255.255.0",
"special": false,
"type": "ethernet"
}
]

View File

@ -0,0 +1,26 @@
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: Wed, 08 Jan 2020 02:26:17 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects
[
{
"name": "test",
"project_id": "51010203-0405-0607-0809-0a0b0c0d0e0f",
"variables": null
},
{
"name": "test",
"project_id": "52010203-0405-0607-0809-0a0b0c0d0e0b",
"variables": null
}
]

View File

@ -0,0 +1,19 @@
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: Wed, 08 Jan 2020 02:26:17 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}
{
"name": "test",
"project_id": "40010203-0405-0607-0809-0a0b0c0d0e02",
"variables": null
}

View File

@ -0,0 +1,70 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/75228bef-1806-41fc-8b73-1c5752870ac6'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/75228bef-1806-41fc-8b73-1c5752870ac6 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 1406
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:43 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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": "vmnet8",
"special": true,
"type": "ethernet"
},
{
"name": "wlp2s0",
"special": false,
"type": "ethernet"
}
],
"name": "Cloud 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-41/test_json4/project-files/builtin/75228bef-1806-41fc-8b73-1c5752870ac6",
"node_id": "75228bef-1806-41fc-8b73-1c5752870ac6",
"ports_mapping": [
{
"interface": "wlp2s0",
"name": "wlp2s0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"remote_console_host": "",
"remote_console_http_path": "/",
"remote_console_port": 23,
"remote_console_type": "none",
"status": "started"
}

View File

@ -0,0 +1,34 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/a4155e63-9b40-4c8e-bbbc-d93aad187b07'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/a4155e63-9b40-4c8e-bbbc-d93aad187b07 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 631
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:57 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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-41/test_json4/project-files/iou/a4155e63-9b40-4c8e-bbbc-d93aad187b07",
"node_id": "a4155e63-9b40-4c8e-bbbc-d93aad187b07",
"nvram": 128,
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"status": "stopped",
"usage": "",
"use_default_iou_values": true
}

View File

@ -0,0 +1,28 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/f76e8c5c-0a0c-451d-a4ba-f01286d06a16'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/f76e8c5c-0a0c-451d-a4ba-f01286d06a16 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 335
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:09 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}
{
"name": "Nat 1",
"node_id": "f76e8c5c-0a0c-451d-a4ba-f01286d06a16",
"ports_mapping": [
{
"interface": "virbr0",
"name": "nat0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "started"
}

View File

@ -0,0 +1,59 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/c54889dc-8163-4fa4-8e7c-14eca8dd6474'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/c54889dc-8163-4fa4-8e7c-14eca8dd6474 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 1381
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:29 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}
{
"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:64:74:00",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/c54889dc-8163-4fa4-8e7c-14eca8dd6474",
"node_id": "c54889dc-8163-4fa4-8e7c-14eca8dd6474",
"on_close": "power_off",
"options": "",
"platform": "x86_64",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/tmp/tmphb4tqqk2/qemu-system-x86_64",
"ram": 256,
"status": "stopped",
"usage": ""
}

View File

@ -0,0 +1,26 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/c03cc894-a5e9-4359-b85a-1fd917184de4'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/c03cc894-a5e9-4359-b85a-1fd917184de4 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 443
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:26 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}
{
"command_line": "",
"console": null,
"console_type": "none",
"default_destination": "",
"ip_address": "",
"name": "TraceNG TEST 1",
"node_directory": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/traceng/c03cc894-a5e9-4359-b85a-1fd917184de4",
"node_id": "c03cc894-a5e9-4359-b85a-1fd917184de4",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}

View File

@ -0,0 +1,32 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/bcd3206f-3edd-4b44-b5c8-e40f4a5c8909'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/bcd3206f-3edd-4b44-b5c8-e40f4a5c8909 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 483
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:27 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}
{
"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": "bcd3206f-3edd-4b44-b5c8-e40f4a5c8909",
"on_close": "power_off",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 0,
"status": "stopped",
"usage": "",
"use_any_adapter": false,
"vmname": "VMTEST"
}

View File

@ -0,0 +1,31 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/716f8727-4421-4ba9-9e24-031505533c36'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vmware/nodes/716f8727-4421-4ba9-9e24-031505533c36 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 611
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:29 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/vmware/nodes/{node_id}
{
"adapter_type": "e1000",
"adapters": 0,
"console": 5004,
"console_type": "telnet",
"headless": false,
"linked_clone": false,
"name": "VMTEST",
"node_directory": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vmware/716f8727-4421-4ba9-9e24-031505533c36",
"node_id": "716f8727-4421-4ba9-9e24-031505533c36",
"on_close": "power_off",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped",
"usage": "",
"use_any_adapter": false,
"vmx_path": "/tmp/pytest-of-grossmj/pytest-41/test_vmware_get0/test.vmx"
}

View File

@ -0,0 +1,24 @@
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/aa44ff6f-52fa-4bf9-9b93-2e73c9eb8071'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/aa44ff6f-52fa-4bf9-9b93-2e73c9eb8071 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 384
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:47 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/aa44ff6f-52fa-4bf9-9b93-2e73c9eb8071",
"node_id": "aa44ff6f-52fa-4bf9-9b93-2e73c9eb8071",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}

View File

@ -0,0 +1,32 @@
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: Wed, 08 Jan 2020 02:26:55 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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"
}
]

View File

@ -0,0 +1,19 @@
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: Wed, 08 Jan 2020 02:27:19 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/qemu/capabilities
{
"kvm": [
"x86_64"
]
}

View File

@ -0,0 +1,18 @@
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: Wed, 08 Jan 2020 02:27:25 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/version
{
"local": true,
"version": "2.2.4dev1"
}

View File

@ -0,0 +1,22 @@
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: Wed, 08 Jan 2020 02:26:17 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects
{
"name": "test",
"project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
"variables": null
}

View File

@ -0,0 +1,14 @@
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: Wed, 08 Jan 2020 02:26:17 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/close

View File

@ -0,0 +1,72 @@
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: 1406
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:43 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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": "vmnet8",
"special": true,
"type": "ethernet"
},
{
"name": "wlp2s0",
"special": false,
"type": "ethernet"
}
],
"name": "Cloud 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-41/test_json4/project-files/builtin/3cba86a4-73d7-4989-9c83-f0bb480ff950",
"node_id": "3cba86a4-73d7-4989-9c83-f0bb480ff950",
"ports_mapping": [
{
"interface": "wlp2s0",
"name": "wlp2s0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"remote_console_host": "",
"remote_console_http_path": "/",
"remote_console_port": 23,
"remote_console_type": "none",
"status": "started"
}

View File

@ -0,0 +1,25 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/5a669280-f313-421f-8d05-5cd30731964f/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/5a669280-f313-421f-8d05-5cd30731964f/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: Wed, 08 Jan 2020 02:25:43 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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"
}

View File

@ -0,0 +1,20 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/3c524997-ecb4-43c8-b0eb-4978446be73d/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/cloud/nodes/3c524997-ecb4-43c8-b0eb-4978446be73d/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: 104
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:49 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/tmp/pytest-of-grossmj/pytest-41/test_json4/project-files/captures/test.pcap"
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/5def67e9-a974-4da2-9cd3-17866ede1898/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/5def67e9-a974-4da2-9cd3-17866ede1898/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:49 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -0,0 +1,25 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/bfba66b2-35db-441e-8015-3041cf886105/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/bfba66b2-35db-441e-8015-3041cf886105/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: Wed, 08 Jan 2020 02:25:50 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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"
}

View File

@ -0,0 +1,20 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/937a4da0-7334-4fee-a351-5433acaaa298/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/937a4da0-7334-4fee-a351-5433acaaa298/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: 104
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:51 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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-41/test_json4/project-files/captures/test.pcap"
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/e44e037c-3b3e-4172-aff7-b9bb510646c6/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/e44e037c-3b3e-4172-aff7-b9bb510646c6/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:51 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -0,0 +1,17 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c5f0877d-6201-4fe8-8c0b-aaeb84222bee/duplicate' -d '{"destination_node_id": "72462999-933a-4be7-9ef5-0528f04c3870"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c5f0877d-6201-4fe8-8c0b-aaeb84222bee/duplicate HTTP/1.1
{
"destination_node_id": "72462999-933a-4be7-9ef5-0528f04c3870"
}
HTTP/1.1 201
Connection: close
Content-Length: 4
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:51 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/duplicate
true

View File

@ -0,0 +1,39 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes' -d '{"name": "PC TEST 1", "node_id": "0de29446-fa90-4e91-89f3-5ea84860f212", "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": "0de29446-fa90-4e91-89f3-5ea84860f212",
"path": "iou.bin",
"startup_config_content": "hostname test"
}
HTTP/1.1 201
Connection: close
Content-Length: 631
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:56 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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-41/test_json4/project-files/iou/0de29446-fa90-4e91-89f3-5ea84860f212",
"node_id": "0de29446-fa90-4e91-89f3-5ea84860f212",
"nvram": 128,
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"status": "stopped",
"usage": "",
"use_default_iou_values": true
}

View File

@ -0,0 +1,21 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/fadca255-3eb8-44fa-9a14-31c52604d094/adapters/1/ports/0/nio' -d '{"ethernet_device": "docker0", "type": "nio_ethernet"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/fadca255-3eb8-44fa-9a14-31c52604d094/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: Wed, 08 Jan 2020 02:25:58 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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"
}

View File

@ -0,0 +1,20 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/b63d611d-066b-4673-ad6c-c0e8a93cedbb/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/b63d611d-066b-4673-ad6c-c0e8a93cedbb/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: 104
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:59 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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-41/test_json4/project-files/captures/test.pcap"
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/73ab14a4-9338-4428-89a7-bce3d8daf1eb/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/73ab14a4-9338-4428-89a7-bce3d8daf1eb/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:59 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -0,0 +1,17 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/12cd096f-f0c1-45f9-ac57-360f1d379c48/duplicate' -d '{"destination_node_id": "3949cfaa-2574-4064-a088-5f48ae784e9b"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/12cd096f-f0c1-45f9-ac57-360f1d379c48/duplicate HTTP/1.1
{
"destination_node_id": "3949cfaa-2574-4064-a088-5f48ae784e9b"
}
HTTP/1.1 201
Connection: close
Content-Length: 4
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:09 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/duplicate
true

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/c9e6143c-cf69-416d-8935-8af81fb8ff1d/reload' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/c9e6143c-cf69-416d-8935-8af81fb8ff1d/reload HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:57 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/reload

View File

@ -0,0 +1,36 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/03423f2a-311d-4436-8c9a-8b34945f6cd2/start' -d '{"iourc_content": "test"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/03423f2a-311d-4436-8c9a-8b34945f6cd2/start HTTP/1.1
{
"iourc_content": "test"
}
HTTP/1.1 200
Connection: close
Content-Length: 631
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:57 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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-41/test_json4/project-files/iou/03423f2a-311d-4436-8c9a-8b34945f6cd2",
"node_id": "03423f2a-311d-4436-8c9a-8b34945f6cd2",
"nvram": 128,
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"status": "stopped",
"usage": "",
"use_default_iou_values": true
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/5fcb7418-3e0c-4a47-8cff-c5e0b3e68000/stop' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/5fcb7418-3e0c-4a47-8cff-c5e0b3e68000/stop HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:57 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/stop

View File

@ -0,0 +1,30 @@
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: Wed, 08 Jan 2020 02:26:09 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes
{
"name": "Nat 1",
"node_id": "4b2c0443-0726-4507-a30b-7ac535b1bbaf",
"ports_mapping": [
{
"interface": "virbr0",
"name": "nat0",
"port_number": 0,
"type": "ethernet"
}
],
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "started"
}

View File

@ -0,0 +1,25 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/d8f89cb0-b60f-404a-8431-af581957e29c/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/d8f89cb0-b60f-404a-8431-af581957e29c/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: Wed, 08 Jan 2020 02:26:09 GMT
Server: Python/3.6 GNS3/2.2.4dev1
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"
}

View File

@ -0,0 +1,20 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/bc78e678-408d-4d03-9670-c29da452f6c7/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/nat/nodes/bc78e678-408d-4d03-9670-c29da452f6c7/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: 104
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:16 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/tmp/pytest-of-grossmj/pytest-41/test_json4/project-files/captures/test.pcap"
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/da53ab8a-106c-48a9-ba35-48167fb1b6d1/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/da53ab8a-106c-48a9-ba35-48167fb1b6d1/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:16 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -0,0 +1,17 @@
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: Wed, 08 Jan 2020 02:26:16 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/ports/udp
{
"udp_port": 20000
}

View File

@ -0,0 +1,63 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes' -d '{"hda_disk_image": "hello.img", "name": "PC TEST 1", "qemu_path": "/tmp/tmphb4tqqk2/qemu-system-x86_64"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes HTTP/1.1
{
"hda_disk_image": "hello.img",
"name": "PC TEST 1",
"qemu_path": "/tmp/tmphb4tqqk2/qemu-system-x86_64"
}
HTTP/1.1 201
Connection: close
Content-Length: 1420
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:28 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes
{
"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": "hello.img",
"hda_disk_image_md5sum": "7d793037a0760186574b0282f2f435e7",
"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:dd:e2:00",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/2320a0b9-ed9b-45d9-9bef-c6d13bd9dde2",
"node_id": "2320a0b9-ed9b-45d9-9bef-c6d13bd9dde2",
"on_close": "power_off",
"options": "",
"platform": "x86_64",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/tmp/tmphb4tqqk2/qemu-system-x86_64",
"ram": 256,
"status": "stopped",
"usage": ""
}

View File

@ -0,0 +1,25 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/5048489f-46b4-4720-bee9-f4cf1ec7af49/adapters/1/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/qemu/nodes/5048489f-46b4-4720-bee9-f4cf1ec7af49/adapters/1/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: Wed, 08 Jan 2020 02:26:44 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}

View File

@ -0,0 +1,20 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/40fc7ce3-f4fe-469e-a94a-fb95906d9e22/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/qemu/nodes/40fc7ce3-f4fe-469e-a94a-fb95906d9e22/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: 123
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:24 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/4258adbd-3115-4b8f-b751-cb117dcff450/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/4258adbd-3115-4b8f-b751-cb117dcff450/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:24 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -0,0 +1,17 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/839fb609-bd90-4a20-b496-6e225594c697/duplicate' -d '{"destination_node_id": "eb9e761d-0029-4644-b586-dc903e7abd71"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/839fb609-bd90-4a20-b496-6e225594c697/duplicate HTTP/1.1
{
"destination_node_id": "eb9e761d-0029-4644-b586-dc903e7abd71"
}
HTTP/1.1 201
Connection: close
Content-Length: 4
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:21 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/duplicate
true

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/314c42be-e138-42f3-a59e-a7c3c2e6514f/reload' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/314c42be-e138-42f3-a59e-a7c3c2e6514f/reload HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:33 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/reload

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/ad58dbd9-6558-4750-bec5-1de4cf77ed70/resume' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/ad58dbd9-6558-4750-bec5-1de4cf77ed70/resume HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:35 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/resume

View File

@ -0,0 +1,59 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/9a4b2f04-74a6-4528-a6a7-b02365417fe9/start' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/9a4b2f04-74a6-4528-a6a7-b02365417fe9/start HTTP/1.1
{}
HTTP/1.1 200
Connection: close
Content-Length: 1381
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:26:30 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/start
{
"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:7f:e9:00",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/9a4b2f04-74a6-4528-a6a7-b02365417fe9",
"node_id": "9a4b2f04-74a6-4528-a6a7-b02365417fe9",
"on_close": "power_off",
"options": "",
"platform": "x86_64",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/tmp/tmphb4tqqk2/qemu-system-x86_64",
"ram": 256,
"status": "stopped",
"usage": ""
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/6aacea07-76ca-4fb9-94d2-24da00e33037/stop' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/6aacea07-76ca-4fb9-94d2-24da00e33037/stop HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:31 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/stop

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/073074f6-83d4-40b4-8042-771b3df49f60/suspend' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/073074f6-83d4-40b4-8042-771b3df49f60/suspend HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:26:33 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/suspend

View File

@ -0,0 +1,28 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes' -d '{"name": "TraceNG TEST 1"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes HTTP/1.1
{
"name": "TraceNG TEST 1"
}
HTTP/1.1 201
Connection: close
Content-Length: 443
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:26 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes
{
"command_line": "",
"console": null,
"console_type": "none",
"default_destination": "",
"ip_address": "",
"name": "TraceNG TEST 1",
"node_directory": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/traceng/f27f5247-e419-4404-9150-b1bb9306d783",
"node_id": "f27f5247-e419-4404-9150-b1bb9306d783",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}

View File

@ -0,0 +1,25 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/243bc8d3-6531-4e9e-99c6-23ad9a4898c8/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/traceng/nodes/243bc8d3-6531-4e9e-99c6-23ad9a4898c8/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: Wed, 08 Jan 2020 02:27:26 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{
"lport": 4242,
"rhost": "127.0.0.1",
"rport": 4343,
"type": "nio_udp"
}

View File

@ -0,0 +1,20 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/770d23d8-e568-4fc4-8497-216c2e129d53/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/traceng/nodes/770d23d8-e568-4fc4-8497-216c2e129d53/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: 123
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:27 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/tmp/tmp3gc2avyo/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
}

View File

@ -0,0 +1,14 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/2a0e5c7d-6773-45a3-886c-d19e329eaeba/adapters/0/ports/0/stop_capture' -d '{}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/2a0e5c7d-6773-45a3-886c-d19e329eaeba/adapters/0/ports/0/stop_capture HTTP/1.1
{}
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:27:27 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -0,0 +1,17 @@
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/fe70324f-78a3-4ada-a675-bd693250d403/duplicate' -d '{"destination_node_id": "64e0db26-82e6-416a-ac11-97add4614131"}'
POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/traceng/nodes/fe70324f-78a3-4ada-a675-bd693250d403/duplicate HTTP/1.1
{
"destination_node_id": "64e0db26-82e6-416a-ac11-97add4614131"
}
HTTP/1.1 201
Connection: close
Content-Length: 4
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:27:27 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/traceng/nodes/{node_id}/duplicate
true

Some files were not shown because too many files have changed in this diff Show More