-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding local-users-passwords-reset feature service, YANG model and it…
…s tests
- Loading branch information
Showing
6 changed files
with
54 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
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
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
5 changes: 5 additions & 0 deletions
5
src/sonic-yang-models/tests/yang_model_tests/tests/local-users-passwords-reset.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 @@ | ||
{ | ||
"LOCAL_USERS_PASSWORDS_RESET_TEST_STATE": { | ||
"desc": "Configure Local users' passwords reset feature state." | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/sonic-yang-models/tests/yang_model_tests/tests_config/local-users-passwords-reset.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 @@ | ||
{ | ||
"LOCAL_USERS_PASSWORDS_RESET_TEST_STATE": { | ||
"sonic-local-users-passwords-reset:sonic-local-users-passwords-reset": { | ||
"sonic-local-users-passwords-reset:LOCAL_USERS_PASSWORDS_RESET": { | ||
"global": { | ||
"state": "enabled" | ||
} | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/sonic-yang-models/yang-models/sonic-local-users-passwords-reset.yang
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,26 @@ | ||
module local-users-passwords-reset { | ||
yang-version 1.1; | ||
namespace "http://github.com/sonic-net/local-users-passwords-reset"; | ||
|
||
import sonic-types { | ||
prefix stypes; | ||
} | ||
|
||
description "LONG_RESET_BUTTON YANG Module for SONiC-based OS"; | ||
revision 2024-01-04 { | ||
description "First Revision"; | ||
} | ||
|
||
container sonic-local-users-passwords-reset { | ||
container LOCAL_USERS_PASSWORDS_RESET { | ||
description "LOCAL_USERS_PASSWORDS_RESET part of config_db.json"; | ||
container global { | ||
leaf state { | ||
type stypes:admin_mode; | ||
description "Local users' passwords reset feature state"; | ||
default disabled; | ||
} | ||
} /* end of container global */ | ||
} /* end of container LOCAL_USERS_PASSWORDS_RESET */ | ||
} /* end of top level container */ | ||
} |