mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-07 02:25:21 +03:00
feat: ship an iol-xe-base.txt base config for IOL Docker nodes
Follows the IOU pattern: the file lives in gns3server/configs/ and the controller installs it into the user's configs directory on startup (never overwriting a customized copy). Referenced by the documented GNS3_IOL_STARTUP_CONFIG=iol-xe-base.txt template knob — without it a fresh install had no file for the knob to resolve and nodes booted to the initial configuration dialog. Also fixes the configs directory named in the docs (~/GNS3/configs, the configs_path server setting default — not ~/.config/GNS3/...).
This commit is contained in:
parent
5685f40dd6
commit
e318afef86
@ -128,9 +128,11 @@ from it boots with that configuration as its personal starting point.
|
||||
```
|
||||
|
||||
* The file lives in the controller's configs directory (the `configs_path`
|
||||
server setting, e.g. `~/.config/GNS3/3.1/configs`) — the same place IOU
|
||||
and VPCS base configs live. `%h` in the content is replaced with the node
|
||||
name at start.
|
||||
server setting, by default `~/GNS3/configs`) — the same place IOU and
|
||||
VPCS base configs live. A minimal `iol-xe-base.txt` ships with the
|
||||
server and is installed there on startup (never overwriting a
|
||||
user-modified copy); an absolute path in the knob bypasses the directory
|
||||
entirely. `%h` in the content is replaced with the node name at start.
|
||||
* **Creation materializes it once**: the controller reads the file and
|
||||
sends its content with the node; afterwards the knob is consumed and the
|
||||
template file is never referenced again — editing it does not affect
|
||||
|
||||
16
gns3server/configs/iol-xe-base.txt
Normal file
16
gns3server/configs/iol-xe-base.txt
Normal file
@ -0,0 +1,16 @@
|
||||
!
|
||||
service timestamps debug datetime msec
|
||||
service timestamps log datetime msec
|
||||
!
|
||||
hostname %h
|
||||
!
|
||||
no ip domain lookup
|
||||
!
|
||||
ip tcp synwait-time 5
|
||||
!
|
||||
line con 0
|
||||
exec-timeout 0 0
|
||||
privilege level 15
|
||||
logging synchronous
|
||||
!
|
||||
end
|
||||
@ -462,6 +462,9 @@ async def test_install_base_configs(controller, config, tmpdir):
|
||||
|
||||
await controller._install_base_configs()
|
||||
assert os.path.exists(str(tmpdir / 'iou_l3_base_startup-config.txt'))
|
||||
# the IOL docker base config ships with the server too (referenced by the
|
||||
# GNS3_IOL_STARTUP_CONFIG knob in the documented template)
|
||||
assert os.path.exists(str(tmpdir / 'iol-xe-base.txt'))
|
||||
|
||||
# Check is the file has not been overwritten
|
||||
with open(str(tmpdir / 'iou_l2_base_startup-config.txt')) as f:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user