forked from sonic-net/sonic-utilities
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db_migrator] Migrate DNS configuratuion (sonic-net#2893)
What I did sonic-net/sonic-buildimage#14549 This PR has introduced DNS configuration to CONFIG_DB, we need to migrate original CONFIG_DB to support DNS configuration during upgrading SONiC. How I did it If there's no DNS_NAMESERVER table in CONFIG_DB, read DNS_NAMESERVER table from minigraph and update CONFIG_DB. How to verify it Run unit test for db migrator.
- Loading branch information
1 parent
484e7aa
commit e5d9b9b
Showing
4 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/db_migrator_input/config_db/dns-nameserver-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"DNS_NAMESERVER|1.1.1.1": { | ||
"state": "enabled" | ||
}, | ||
"DNS_NAMESERVER|2001:1001:110:1001::1": { | ||
"state": "enabled" | ||
}, | ||
"VERSIONS|DATABASE": { | ||
"VERSION": "version_4_0_4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"VERSIONS|DATABASE": { | ||
"VERSION": "version_4_0_3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters