From dc04c29e7e24f4aab5109aa7c5060ef11607e593 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Sun, 24 May 2026 21:54:50 +0800 Subject: [PATCH] docs: add GNS3 appliance loading mechanism to memory Document how GNS3 loads appliance files from builtin and custom directories with priority rules, including storage locations and the design rationale that allows users to customize devices without losing changes during registry updates. Co-Authored-By: Claude Sonnet 4.6 --- .claude/memory/MEMORY.md | 3 +++ .claude/memory/gns3-appliance-loading.md | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .claude/memory/gns3-appliance-loading.md diff --git a/.claude/memory/MEMORY.md b/.claude/memory/MEMORY.md index b1891785a..9451a0f36 100644 --- a/.claude/memory/MEMORY.md +++ b/.claude/memory/MEMORY.md @@ -16,5 +16,8 @@ - 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 +### Appliance Management +- **[GNS3 Appliance Loading](./gns3-appliance-loading.md)** - How GNS3 loads appliance files from builtin and custom directories with priority rules + ### uBridge Permission - **[uBridge Permission Issue](./gns3-ubridge-permission.md)** - Docker containers fail to start due to missing CAP_NET_ADMIN/CAP_NET_RAW capabilities on uBridge diff --git a/.claude/memory/gns3-appliance-loading.md b/.claude/memory/gns3-appliance-loading.md new file mode 100644 index 000000000..1032f0373 --- /dev/null +++ b/.claude/memory/gns3-appliance-loading.md @@ -0,0 +1,20 @@ +--- +name: gns3-appliance-loading +description: GNS3 appliance file loading mechanism and storage locations +metadata: + type: reference +--- + +GNS3 loads appliance (.gns3a) files from two locations with specific priority order: + +1. **Builtin appliances directory**: `~/.local/share/GNS3/appliances/` + - Stores automatically downloaded devices from GNS3 registry + - Maintained and updated by the system automatically + +2. **Custom appliances directory**: `~/GNS3/appliances/` + - Stores user-customized or modified appliance files + - Manually managed by users + +**Loading priority**: System loads builtin appliances first, then custom appliances. If both directories contain devices with the same `device_id`, the custom appliance overwrites the builtin one. This design allows users to customize devices without having their modifications overwritten by automatic registry updates. + +**Implementation**: See `gns3server/controller/appliance_manager.py` in the `load_appliances()` method (lines 314-351).