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.
Migrate AAA table in db_migrator (sonic-net#3284)
Migrate AAA table in db_migrator #### Why I did it per-command AAA need enable in warm-upgrade case #### How I did it Add db_migrator code to migrate AAA table #### How to verify it Pass all test case. Add new test case. #### Which release branch to backport (provide reason below if selected) N/A #### Description for the changelog Migrate AAA table in db_migrator #### A picture of a cute animal (not mandatory but encouraged)
- Loading branch information
Showing
20 changed files
with
304 additions
and
0 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
6 changes: 6 additions & 0 deletions
6
tests/db_migrator_input/config_db/per_command_aaa_disable.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,6 @@ | ||
{ | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/db_migrator_input/config_db/per_command_aaa_disable_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,6 @@ | ||
{ | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/db_migrator_input/config_db/per_command_aaa_disable_golden.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,8 @@ | ||
{ | ||
"TACPLUS": { | ||
"global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/db_migrator_input/config_db/per_command_aaa_enable.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,9 @@ | ||
{ | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/db_migrator_input/config_db/per_command_aaa_enable_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,12 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/db_migrator_input/config_db/per_command_aaa_enable_golden.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,19 @@ | ||
{ | ||
"AAA": { | ||
"accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"authorization": { | ||
"login": "tacacs+" | ||
} | ||
}, | ||
"TACPLUS": { | ||
"global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/db_migrator_input/config_db/per_command_aaa_no_authentication.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,9 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/db_migrator_input/config_db/per_command_aaa_no_authentication_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,12 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/db_migrator_input/config_db/per_command_aaa_no_authentication_golden.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,19 @@ | ||
{ | ||
"AAA": { | ||
"accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"authorization": { | ||
"login": "tacacs+" | ||
} | ||
}, | ||
"TACPLUS": { | ||
"global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/db_migrator_input/config_db/per_command_aaa_no_change.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,15 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "local" | ||
}, | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"AAA|authorization": { | ||
"login": "local" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/db_migrator_input/config_db/per_command_aaa_no_change_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,15 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "local" | ||
}, | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"AAA|authorization": { | ||
"login": "local" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/db_migrator_input/config_db/per_command_aaa_no_change_golden.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,19 @@ | ||
{ | ||
"AAA": { | ||
"accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"authorization": { | ||
"login": "tacacs+" | ||
} | ||
}, | ||
"TACPLUS": { | ||
"global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/db_migrator_input/config_db/per_command_aaa_no_passkey.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,8 @@ | ||
{ | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/db_migrator_input/config_db/per_command_aaa_no_passkey_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 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/db_migrator_input/config_db/per_command_aaa_no_passkey_golden.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,15 @@ | ||
{ | ||
"AAA": { | ||
"accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"authentication": { | ||
"login": "tacacs+" | ||
} | ||
}, | ||
"TACPLUS": { | ||
"global": { | ||
"auth_type": "login" | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
tests/db_migrator_input/config_db/per_command_aaa_no_tacplus.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,5 @@ | ||
{ | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/db_migrator_input/config_db/per_command_aaa_no_tacplus_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,12 @@ | ||
{ | ||
"AAA|accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"AAA|authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"TACPLUS|global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/db_migrator_input/config_db/per_command_aaa_no_tacplus_golden.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,19 @@ | ||
{ | ||
"AAA": { | ||
"accounting": { | ||
"login": "tacacs+,local" | ||
}, | ||
"authentication": { | ||
"login": "tacacs+" | ||
}, | ||
"authorization": { | ||
"login": "tacacs+" | ||
} | ||
}, | ||
"TACPLUS": { | ||
"global": { | ||
"auth_type": "login", | ||
"passkey": "testpasskey" | ||
} | ||
} | ||
} |
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