Commit Graph
73 Commits
Author SHA1 Message Date
Mark Paronyan 634189d443 style: sort imports in api and utils modules 2026-10-02 12:43:26 +03:00
Mark Paronyan 2512556770 fix(typing): resolve mypy errors in config 2026-09-28 04:55:20 +00:00
Mark Paronyan a0450b6bce refactor: ruff autofixes 2026-09-27 15:55:10 +03:00
YueGuobin 7d3cbf1023 feat: add config read-modify-write update and harden file watcher
Config.update_config() applies submitted options to the main
configuration file via configparser read-modify-write: unknown
options are preserved, null removes an option, the merged view
of all files is validated as ServerConfig before anything is
written (a bad file would kill the FileWatcher polling loop),
and the write is atomic (.tmp + os.replace, mode 0600). Options
whose effective value is owned by a later configuration file
raise ConfigConflictError instead of writing a no-op. The
reload logic is factored into reload_and_notify() and the file
watcher callback is exception-guarded so polling never dies.
2026-08-23 18:54:23 +08:00
Guobin Yue 87f8f22524 Merge branch '3.0' into feature/ai-copilot-bridge 2026-03-06 01:42:47 +08:00
grossmj 5b00529666 Copy config files and database from a previous version if it exists 2026-03-04 17:23:10 +08:00
YueGuobin aef337e86f feat(config): load secret files even without main config
When no configuration file is found or readable, the server now still loads secret files. This ensures that secret configurations (like API keys or passwords) are available even if the primary config file is missing, improving robustness and security in environments where secrets are stored separately.
2026-03-03 18:16:37 +08:00
YueGuobin 9315f06e1f feat(config): add encryption key loading for sensitive data
Add a new method `_load_encryption_key` to initialize encryption for sensitive data such as API keys. This method is called within `_load_secret_files` alongside JWT secret key loading, ensuring encryption is set up during server configuration. The change enhances security by enabling encryption for secrets stored in the server's secrets directory.
2026-03-03 16:46:23 +08:00
grossmj 0c12849d0d Use controller vars file to store version and appliance etag 2023-09-06 16:28:46 +07:00
grossmj e5eeab662e Check if server config file is readable 2023-06-20 21:26:21 +09:30
grossmj 74c675d5b0 Drop Windows support 2022-01-19 22:28:36 +10:30
grossmj edb20482c7 Fix bug when no server config file is present. 2021-04-28 14:44:34 +09:30
grossmj c021e21309 Use black with -l 120 param. 2021-04-13 18:46:50 +09:30
grossmj f928738bd5 Use pyupgrade with --py36-plus param. 2021-04-13 18:37:58 +09:30
grossmj 71725aade6 Rename ssl and auth configuration file settings.
Add enable SSL config validator.
Strict configuration file validation: any error will prevent the server to start.
Core server logic moved to a Server class.
2021-04-12 23:26:42 +09:30
grossmj 30ebae207f Use Pydantic to validate the server config file. 2021-04-12 17:02:23 +09:30
grossmj bde706d19a Generate JWT secret key if none is configured in the config file.
Change location of the database.
2020-12-16 18:24:21 +10:30
JCDraaijer 7117b1fb65 Improved how the path to the config file is actually determined 2019-11-11 11:20:51 +01:00
JCDraaijer 3bd394b637 Added workaround for #1690. Added venv/ to .gitignore 2019-11-10 20:41:39 +01:00
grossmj 5a3f8b9a9b Use versioned config directory for profiles. Fixes #1664 2019-10-09 15:20:19 +08:00
grossmj e8b8554c1a Fix Qemu VM state support after closing a project and check for JSON data returned by qemu-img. Fixes #1591 2019-05-19 17:59:00 +07:00
grossmj fb470dd4b5 Back to the major.minor version for config files. Ref https://github.com/GNS3/gns3-gui/issues/2756 2019-04-14 21:31:40 +07:00
grossmj 6dbb992513 Fix templates missing after server restart. Fixes https://github.com/GNS3/gns3-gui/issues/2769 2019-04-14 20:39:55 +07:00
grossmj 7a55ba3c1e Use the full version number for path to config files. Ref https://github.com/GNS3/gns3-gui/issues/2756 2019-04-05 18:44:31 +08:00
grossmj c075baa05b Store config files in version specific location 2019-04-01 15:53:39 +07:00
grossmj 927f7e6b9d Do not show log message if configuration file doesn't exist. Fixes #1206. 2018-01-08 18:07:15 +07:00
Julien Duponchelle 9fd5e4cbc9 Handle password configuration change on remote servers
Fix https://github.com/GNS3/gns3-gui/issues/1942
2017-03-22 18:29:08 +01:00
Julien Duponchelle bfb82a9618 The gns3_controller.conf is located in the same directory of gns3_server.conf
Fix #701
2016-09-30 17:34:28 +02:00
Aren Abkarian 62377315dd English typo
Signed-off-by: Julien Duponchelle <julien@gns3.net>
2016-09-07 20:38:24 +02:00
Julien Duponchelle 436543d8b8 English fix profil => profile 2016-09-07 17:44:51 +02:00
Julien Duponchelle 5bb1abb2a9 Support for profil settings 2016-08-22 17:21:03 +02:00
Julien Duponchelle 182a979e71 Generic class for watch file change 2016-06-10 17:51:19 +02:00
Julien Duponchelle d8005f6d4f Cleanup unused code 2016-04-19 11:51:02 +02:00
Julien Duponchelle 58d4a529d4 Rename hypervisor to compute
Fix #487
2016-04-15 17:59:59 +02:00
Julien Duponchelle dd2fdcc574 Merge branch '1.5' into networkv2 2016-03-16 16:35:23 +01:00
Julien Duponchelle 3296b97f59 Rename modules => hypervisor 2016-03-08 16:12:46 +01:00
Julien Duponchelle 04b02171bb Support /etc/gns3/gns3_server.conf for the config
It's better for a server deployment
2016-02-25 15:07:55 +01:00
Julien Duponchelle c6bbc34a56 Allow user to change the configuration file
Fix #251
2015-07-03 11:10:12 +02:00
Julien Duponchelle 06e193231c Fix double loading of config from working directory 2015-07-03 10:53:41 +02:00
Julien Duponchelle caf7af7ad5 Support server config in current working directory 2015-07-01 17:30:52 +02:00
Julien Duponchelle 26df776f4c Move configuration to the GNS3 directory 2015-06-24 11:57:42 +02:00
Julien Duponchelle bd4b6396a8 Ensure in test we didn't load the local configuration 2015-06-09 16:32:36 +02:00
Julien Duponchelle 4b21135ba7 Turn off configuration parser interpolation 2015-05-05 11:53:33 +02:00
Julien Duponchelle a3f00e1f45 Catch configuration file parsing errors
Fix #176
2015-05-05 11:44:35 +02:00
Julien Duponchelle 151788e48a Force utf-8 configuraton files reading
Fix #170
2015-05-01 17:49:16 +02:00
Julien Duponchelle 964ea0f577 Fix random behavior in tests 2015-03-17 15:40:58 +01:00
Julien Duponchelle 54bccb0628 Restore configuration live reload
Closes #94
2015-03-17 10:22:18 +01:00
Julien Duponchelle bcb1ce02ab Refactor config management in tests 2015-03-16 15:03:41 +01:00
Jeremy 03796ca729 Server handler to shutdown a local server. 2015-03-12 18:44:05 -06:00
grossmj 4c68fd0d52 Renames server.conf and server.ini to gns3_server.conf and gns3_server.ini respectively. 2015-03-10 11:00:32 -06:00