]> git.giorgioravera.it Git - network-manager.git/commitdiff
minor changes to TODO
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 16 Mar 2026 22:06:11 +0000 (23:06 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 16 Mar 2026 22:06:11 +0000 (23:06 +0100)
TODO.md
backend/bootstrap.py
backend/db/aliases.py

diff --git a/TODO.md b/TODO.md
index 3cfc4c124fec871bfe66724b857cd7f0dcac57f9..ad5962668e984949e729b2d00a88538ce5a08d16 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -6,19 +6,19 @@
 ### ๐Ÿ”„ DB management at startup
 
 - [X] **If the database is empty**
-  - [ ] Import initial YAML
+  - [ ] Import initial JSON
   - [X] Populate the database
 
 - [X] **If the database exists**
-  - [ ] Ignore YAML **unless the repository file has changed**
-  - [ ] If YAML has changed โ†’ update the DB
+  - [ ] Ignore JSON **unless the repository file has changed**
+  - [ ] If JSON has changed โ†’ update the DB
 
 ---
 
 ### ๐Ÿ› ๏ธ Updates made by the Webapp
 
 - [X] Apply changes to the database
-- [ ] Regenerate YAML from the DB
+- [X] Regenerate JSON from the DB
 - [ ] Perform **commit + push** on Git
 - [ ] Regenerate **from scratch**:
   - [ ] **BIND (DNS)** configuration
 
 ---
 
-### ๐Ÿ” YAML โ†” DB Periodic Consistency
-
-- [ ] Calculate YAML **expected checksum**
-- [ ] Compare with **actual checksum**
-- [ ] Determine which element has changed
-
-#### Synchronization rules
-- [ ] YAML changed โ†’ update DB
-- [ ] DB changed โ†’ regenerate YAML
-
----
-
 ## ๐Ÿงฉ Configuration Generation
 
 ### ๐Ÿงช BIND (DNS)
@@ -56,7 +44,7 @@
 - [ ] Syntax validation (`named-checkconf`, `named-checkzone`)
 - [ ] Rollback management in case of errors
 - [ ] Update external DNS
-  - [ ] Dedicated file
+  - [X] Dedicated file
   - [ ] OVH
   - [ ] Cloudflare
 
 
 ### ๐Ÿ”ง Backup & Recovery
 - [X] Backup generation
+- [X] Backup restore
+- [ ] Backup/Restore from web
 - [ ] Periodic backup of SQLite DB
 - [ ] Remote Git repository backup
 - [ ] Backup of generated configurations
index 4515acb7af35f9e682db0743a037b62da02768f4..5382098f767355445b1124afa3d7f652afe5025d 100644 (file)
@@ -64,7 +64,7 @@ def print_goodbye(logger):
 # ================================
 # Create DB if needed
 # ================================
-def docker_create_db(logger):
+def create_db(logger):
     # Reset database if requested
     if settings.DB_RESET and os.path.exists(settings.DB_FILE):
         logger.info("Removing existing database: %s", settings.DB_FILE)
@@ -95,7 +95,7 @@ def bootstrap():
     print_welcome(logger)
 
     # Create or update database
-    docker_create_db(logger)
+    create_db(logger)
 
     #os.makedirs(DATA_DIR, exist_ok=True)
     #os.makedirs(BIND_DIR, exist_ok=True)
index 3c1e2f3e61aa7fa2c3b5e10a3bfc104597468ad4..65cc0b75b609a9b1e403893dee57914965c36260 100644 (file)
@@ -81,7 +81,7 @@ def add_alias(data: Dict[str, Any]) -> int:
     try:
         cur = conn.execute(
             """
-                       INSERT INTO aliases (name, target, note, ssl_enabled, visibility) 
+                       INSERT INTO aliases (name, target, note, ssl_enabled, visibility)
                        VALUES (?, ?, ?, ?, ?)
                        """,
             (